Merge branch 'staging'
[jackhill/guix/guix.git] / gnu / packages / python-web.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
3 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
4 ;;; Copyright © 2017 Christopher Baines <mail@cbaines.net>
5 ;;; Copyright © 2016, 2017 Danny Milosavljevic <dannym+a@scratchpost.org>
6 ;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
7 ;;; Copyright © 2016, 2017 Marius Bakke <mbakke@fastmail.com>
8 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
9 ;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
10 ;;; Copyright © 2016, 2017 Julien Lepiller <julien@lepiller.eu>
11 ;;; Copyright © 2016, 2017 ng0 <ng0@n0.is>
12 ;;; Copyright © 2014, 2017 Eric Bavier <bavier@member.fsf.org>
13 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
14 ;;; Copyright © 2015 Cyril Roelandt <tipecaml@gmail.com>
15 ;;; Copyright © 2015, 2016, 2017, 2019 Leo Famulari <leo@famulari.name>
16 ;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
17 ;;; Copyright © 2016, 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
18 ;;; Copyright © 2015, 2017 Ben Woodcroft <donttrustben@gmail.com>
19 ;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
20 ;;; Copyright © 2017 Adriano Peluso <catonano@gmail.com>
21 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
22 ;;; Copyright © 2016 David Craven <david@craven.ch>
23 ;;; Copyright © 2017 Oleg Pykhalov <go.wigust@gmail.com>
24 ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
25 ;;; Copyright © 2017 Mark Meyer <mark@ofosos.org>
26 ;;; Copyright © 2018 Tomáš Čech <sleep_walker@gnu.org>
27 ;;; Copyright © 2018 Nicolas Goaziou <mail@nicolasgoaziou.fr>
28 ;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com>
29 ;;; Copyright © 2018 Maxim Cournoyer <maxim.cournoyer@gmail.com>
30 ;;; Copyright © 2019 Vagrant Cascadian <vagrant@debian.org>
31 ;;; Copyright © 2019 Brendan Tildesley <mail@brendan.scot>
32 ;;;
33 ;;; This file is part of GNU Guix.
34 ;;;
35 ;;; GNU Guix is free software; you can redistribute it and/or modify it
36 ;;; under the terms of the GNU General Public License as published by
37 ;;; the Free Software Foundation; either version 3 of the License, or (at
38 ;;; your option) any later version.
39 ;;;
40 ;;; GNU Guix is distributed in the hope that it will be useful, but
41 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
42 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
43 ;;; GNU General Public License for more details.
44 ;;;
45 ;;; You should have received a copy of the GNU General Public License
46 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
47
48 (define-module (gnu packages python-web)
49 #:use-module (guix packages)
50 #:use-module (guix download)
51 #:use-module (guix git-download)
52 #:use-module (guix build-system python)
53 #:use-module (guix utils)
54 #:use-module (gnu packages)
55 #:use-module (gnu packages check)
56 #:use-module (gnu packages compression)
57 #:use-module (gnu packages curl)
58 #:use-module (gnu packages databases)
59 #:use-module (gnu packages django)
60 #:use-module (gnu packages groff)
61 #:use-module (gnu packages libffi)
62 #:use-module (gnu packages pkg-config)
63 #:use-module (gnu packages python)
64 #:use-module (gnu packages python-crypto)
65 #:use-module (gnu packages python-xyz)
66 #:use-module (gnu packages sphinx)
67 #:use-module (gnu packages tls)
68 #:use-module (gnu packages time)
69 #:use-module (gnu packages web)
70 #:use-module (gnu packages xml)
71 #:use-module ((guix licenses) #:prefix license:)
72 #:use-module (srfi srfi-1))
73
74 (define-public python-aiohttp
75 (package
76 (name "python-aiohttp")
77 (version "3.4.4")
78 (source
79 (origin
80 (method url-fetch)
81 (uri (pypi-uri "aiohttp" version))
82 (sha256
83 (base32
84 "1ykm6kdjkrg556j0zd7dx2l1rsrbh0d9g27ivr6dmaahz9pyrbsi"))))
85 (build-system python-build-system)
86 (arguments
87 `(#:tests? #f)) ;missing pytest-timeout
88 (propagated-inputs
89 `(("python-aiodns" ,python-aiodns)
90 ("python-async-timeout" ,python-async-timeout)
91 ("python-attrs" ,python-attrs)
92 ("python-chardet" ,python-chardet)
93 ("python-idna-ssl" ,python-idna-ssl)
94 ("python-multidict" ,python-multidict)
95 ("python-yarl" ,python-yarl)))
96 (home-page "https://github.com/aio-libs/aiohttp/")
97 (synopsis "Async HTTP client/server framework (asyncio)")
98 (description "@code{aiohttp} is an asynchronous HTTP client/server
99 framework.
100
101 Its main features are:
102 @itemize
103 @item Supports both client and server side of HTTP protocol.
104 @item Supports both client and server Web-Sockets out-of-the-box without the
105 Callback Hell.
106 @item Web-server has middlewares and pluggable routing.
107 @end itemize")
108 (license license:asl2.0)))
109
110 (define-public python-aiohttp-socks
111 (package
112 (name "python-aiohttp-socks")
113 (version "0.2.2")
114 (source
115 (origin
116 (method url-fetch)
117 (uri (pypi-uri "aiohttp_socks" version))
118 (sha256
119 (base32
120 "0473702jk66xrgpm28wbdgpnak4v0dh2qmdjw7ky7hf3lwwqkggf"))))
121 (build-system python-build-system)
122 (propagated-inputs
123 `(("python-aiohttp" ,python-aiohttp)))
124 (home-page "https://github.com/romis2012/aiohttp-socks")
125 (synopsis "SOCKS proxy connector for aiohttp")
126 (description "This package provides a SOCKS proxy connector for
127 aiohttp. It supports SOCKS4(a) and SOCKS5.")
128 (license license:asl2.0)))
129
130 (define-public python-aiodns
131 (package
132 (name "python-aiodns")
133 (version "1.1.1")
134 (source
135 (origin
136 (method url-fetch)
137 (uri (pypi-uri "aiodns" version))
138 (sha256
139 (base32
140 "1snr5paql8dgvc676n8xq460wypjsb1xj53cf3px1s4wczf7lryq"))))
141 (build-system python-build-system)
142 (inputs
143 `(("python-pycares" ,python-pycares)))
144 (arguments
145 `(#:tests? #f)) ;tests require internet access
146 (home-page "http://github.com/saghul/aiodns")
147 (synopsis "Simple DNS resolver for asyncio")
148 (description "@code{aiodns} provides a simple way for doing
149 asynchronous DNS resolutions with a synchronous looking interface by
150 using @url{https://github.com/saghul/pycares,pycares}.")
151 (license license:expat)))
152
153 (define-public python-aiorpcx
154 (package
155 (name "python-aiorpcx")
156 (version "0.10.2")
157 (source
158 (origin
159 (method url-fetch)
160 (uri (pypi-uri "aiorpcX" version))
161 (sha256
162 (base32
163 "1p88k15jh0d2a18pnnbfcamsqi2bxvmmhpizmdlxfdxf8vy5ggyj"))))
164 (build-system python-build-system)
165 (propagated-inputs
166 `(("python-attrs" ,python-attrs)))
167 (home-page "https://github.com/kyuupichan/aiorpcX")
168 (synopsis "Generic asyncio RPC implementation")
169 (description
170 "aiorpcX is a generic asyncio library implementation of RPC suitable for
171 an application that is a client, server or both.
172
173 The package includes a module with full coverage of JSON RPC versions 1.0 and
174 2.0, JSON RPC protocol auto-detection, and arbitrary message framing. It also
175 comes with a SOCKS proxy client.")
176 (license (list license:expat license:bsd-2))))
177
178 (define-public python-falcon
179 (package
180 (name "python-falcon")
181 (version "1.4.1")
182 (source
183 (origin
184 (method url-fetch)
185 (uri (pypi-uri "falcon" version))
186 (sha256
187 (base32
188 "1i0vmqsk24z4biirqhpvas9h28wy7nmpy3jvnb6rz2imq04zd09r"))))
189 (build-system python-build-system)
190 (arguments
191 `(#:phases
192 (modify-phases %standard-phases
193 (replace 'check
194 (lambda _
195 (invoke "pytest"))))))
196 (propagated-inputs
197 `(("python-mimeparse" ,python-mimeparse)
198 ("python-six" ,python-six)))
199 (native-inputs
200 `(("python-cython" ,python-cython) ;for faster binaries
201 ("python-pytest" ,python-pytest)
202 ("python-pyyaml" ,python-pyyaml)
203 ("python-requests" ,python-requests)
204 ("python-testtools" ,python-testtools)
205 ("python-jsonschema" ,python-jsonschema)
206 ("python-msgpack" ,python-msgpack)))
207 (home-page "https://falconframework.org")
208 (synopsis
209 "Web framework for building APIs and application backends")
210 (description
211 "Falcon is a web API framework for building microservices, application
212 backends and higher-level frameworks. Among its features are:
213 @itemize
214 @item Optimized and extensible code base
215 @item Routing via URI templates and REST-inspired resource
216 classes
217 @item Access to headers and bodies through request and response
218 classes
219 @item Request processing via middleware components and hooks
220 @item Idiomatic HTTP error responses
221 @item Straightforward exception handling
222 @item Unit testing support through WSGI helpers and mocks
223 @item Compatible with both CPython and PyPy
224 @item Cython support for better performance when used with CPython
225 @end itemize")
226 (license license:asl2.0)))
227
228 (define-public python2-falcon
229 (package-with-python2 python-falcon))
230
231 (define-public python-falcon-cors
232 (package
233 (name "python-falcon-cors")
234 (version "1.1.7")
235 (source
236 (origin
237 (method url-fetch)
238 (uri (pypi-uri "falcon-cors" version))
239 (sha256
240 (base32
241 "12pym7hwsbd8b0c1azn95nas8gm3f1qpr6lpyx0958xm65ffr20p"))))
242 (build-system python-build-system)
243 (native-inputs
244 `(("python-falcon" ,python-falcon)))
245 (home-page
246 "https://github.com/lwcolton/falcon-cors")
247 (synopsis "Falcon @dfn{cross-origin resource sharing} (CORS) library")
248 (description "This middleware provides @dfn{cross-origin resource
249 sharing} (CORS) support for Falcon. It allows applying a specially crafted
250 CORS object to the incoming requests, enabling the ability to serve resources
251 over a different origin than that of the web application.")
252 (license license:asl2.0)))
253
254 (define-public python2-falcon-cors
255 (package-with-python2 python-falcon-cors))
256
257 (define-public python-furl
258 (package
259 (name "python-furl")
260 (version "0.5.6")
261 (source
262 (origin
263 (method url-fetch)
264 (uri (pypi-uri "furl" version))
265 (sha256
266 (base32
267 "0lzpfpm686hvz3sr1mcrnd1b3lgmnw8v59gb43wfi98r3b671pqc"))))
268 (build-system python-build-system)
269 (propagated-inputs
270 `(("python-six" ,python-six)
271 ("python-orderedmultidict" ,python-orderedmultidict)))
272 (native-inputs
273 `(("python-pycodestyle" ,python-pycodestyle)))
274 (home-page "https://github.com/gruns/furl")
275 (synopsis "URL manipulation in Python")
276 (description "Furl provides an easy-to-use alternative to the
277 @code{urllib} and @code{urlparse} modules for manipulating URLs.")
278 (license license:unlicense)))
279
280 (define-public python2-furl
281 (package-with-python2 python-furl))
282
283 (define-public python-httplib2
284 (package
285 (name "python-httplib2")
286 (version "0.9.2")
287 (source
288 (origin
289 (method url-fetch)
290 (uri (pypi-uri "httplib2" version))
291 (sha256
292 (base32
293 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
294 (build-system python-build-system)
295 (home-page "https://github.com/jcgregorio/httplib2")
296 (synopsis "Comprehensive HTTP client library")
297 (description
298 "A comprehensive HTTP client library supporting many features left out of
299 other HTTP libraries.")
300 (license license:expat)))
301
302 (define-public python2-httplib2
303 (package-with-python2 python-httplib2))
304
305 (define-public python-html2text
306 (package
307 (name "python-html2text")
308 (version "2018.1.9")
309 (source
310 (origin
311 (method url-fetch)
312 (uri (pypi-uri "html2text" version))
313 (sha256
314 (base32
315 "1m6d7ciq30adc3d1n8g6r46072n7q8kdy039pqvnnmp763xi8xb2"))))
316 (build-system python-build-system)
317 (home-page "https://pypi.org/project/html2text/")
318 (synopsis "Convert HTML into plain text")
319 (description "html2text takes HTML and converts it into plain ASCII text
320 which is also valid markdown. html2text was originally written by Aaron
321 Swartz.")
322 (license license:gpl3+)))
323
324 (define-public python2-html2text
325 (package-with-python2 python-html2text))
326
327 (define-public python-mechanicalsoup
328 (package
329 (name "python-mechanicalsoup")
330 (version "0.11.0")
331 (source
332 (origin
333 (method url-fetch)
334 (uri (pypi-uri "MechanicalSoup" version))
335 (sha256
336 (base32 "0k59wwk75q7nz6i6gynvzhagy02ql0bv7py3qqcwgjw7607yq4i7"))))
337 (build-system python-build-system)
338 (arguments
339 ;; TODO: Enable tests when python-flake8@3.5 hits master.
340 `(#:tests? #f))
341 (propagated-inputs
342 `(("python-beautifulsoup4" ,python-beautifulsoup4)
343 ("python-lxml" ,python-lxml)
344 ("python-requests" ,python-requests)
345 ("python-six" ,python-six)))
346 ;; (native-inputs
347 ;; ;; For tests.
348 ;; `(("python-pytest-flake8" ,python-pytest-flake8)
349 ;; ("python-pytest-httpbin" ,python-pytest-httpbin)
350 ;; ("python-pytest-mock" ,python-pytest-mock)
351 ;; ("python-pytest-runner" ,python-pytest-runner)
352 ;; ("python-requests-mock" ,python-requests-mock)))
353 (home-page "https://mechanicalsoup.readthedocs.io/")
354 (synopsis "Python library for automating website interaction")
355 (description
356 "MechanicalSoup is a Python library for automating interaction with
357 websites. It automatically stores and sends cookies, follows redirects, and can
358 follow links and submit forms. It doesn’t do JavaScript.")
359 (license license:expat)))
360
361 (define-public python2-mechanicalsoup
362 (package-with-python2 python-mechanicalsoup))
363
364 (define-public python-sockjs-tornado
365 (package
366 (name "python-sockjs-tornado")
367 (version "1.0.6")
368 (source
369 (origin
370 (method url-fetch)
371 (uri (pypi-uri "sockjs-tornado" version))
372 (sha256
373 (base32
374 "15dgv6hw6c7h3m310alw1h6p5443lrm9pyqhcv2smc13fz1v04pc"))))
375 (build-system python-build-system)
376 (arguments
377 `(;; There are no tests, and running the test phase requires missing
378 ;; dependencies
379 #:tests? #f))
380 (propagated-inputs
381 `(("python-tornado" ,python-tornado)))
382 (home-page "https://github.com/mrjoes/sockjs-tornado/")
383 (synopsis
384 "SockJS Python server implementation on top of the Tornado framework")
385 (description
386 "SockJS-tornado provides the server-side counterpart to a SockJS client
387 library, through the Tornado framework.
388
389 SockJS provides a low-latency, full-duplex, cross-domain communication channel
390 between a web browser and web server.")
391 (license license:expat)))
392
393 (define-public python2-sockjs-tornado
394 (package-with-python2 python-sockjs-tornado))
395
396 (define-public python-flask-babel
397 (package
398 (name "python-flask-babel")
399 (version "0.11.2")
400 (source
401 (origin
402 (method url-fetch)
403 (uri (pypi-uri "Flask-Babel" version))
404 (sha256
405 (base32
406 "0ff9n165vhf1nhv6807ckhpp224jw7k7sd7jz5kfh3sbpl85gmy0"))))
407 (build-system python-build-system)
408 (propagated-inputs
409 `(("python-flask" ,python-flask)
410 ("python-babel" ,python-babel)
411 ("python-jinja2" ,python-jinja2)
412 ("python-pytz" ,python-pytz)))
413 (home-page "https://github.com/python-babel/flask-babel")
414 (synopsis "Add i18n/l10n support to Flask applications")
415 (description "This package implements internationalization and localization
416 support for Flask. This is based on the Python babel module as well as pytz -
417 both of which are installed automatically if you install this library.")
418 (license license:bsd-3)))
419
420 (define-public python2-flask-babel
421 (package-with-python2 python-flask-babel))
422
423 (define-public python-html5lib
424 (package
425 (name "python-html5lib")
426 (version "1.0.1")
427 (source
428 (origin
429 (method url-fetch)
430 (uri (pypi-uri "html5lib" version))
431 (sha256
432 (base32
433 "0dipzfrycv6j1jw82v9b7d8lzggx3x8xngx6l4xrqkxwvg7hvjv6"))))
434 (build-system python-build-system)
435 (propagated-inputs
436 `(("python-six" ,python-six)
437 ("python-webencodings" ,python-webencodings)))
438 (arguments
439 `(#:test-target "check"))
440 (home-page
441 "https://github.com/html5lib/html5lib-python")
442 (synopsis
443 "Python HTML parser based on the WHATWG HTML specifcation")
444 (description
445 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
446 and written in Python.")
447 (license license:expat)))
448
449 (define-public python2-html5lib
450 (package-with-python2 python-html5lib))
451
452 ;; Needed for python-bleach, a dependency of python-notebook
453 (define-public python-html5lib-0.9
454 (package
455 (inherit python-html5lib)
456 (version "0.999")
457 (source
458 (origin
459 (method url-fetch)
460 (uri (pypi-uri "html5lib" version))
461 (sha256
462 (base32
463 "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
464
465 (define-public python2-html5lib-0.9
466 (package-with-python2 python-html5lib-0.9))
467
468 (define-public python-html5-parser
469 (package
470 (name "python-html5-parser")
471 (version "0.4.5")
472 (source (origin
473 (method url-fetch)
474 (uri (pypi-uri "html5-parser" version))
475 (sha256
476 (base32
477 "01mx33sx4dhl4kj6wc48nj6jz7ry60rkhjv0s6k8h5xmjf5yy0x9"))))
478 (build-system python-build-system)
479 (native-inputs
480 `(("pkg-config" ,pkg-config)))
481 (inputs
482 `(("libxml2" ,libxml2)))
483 (propagated-inputs
484 `(("python-lxml" ,python-lxml)
485 ("python-beautifulsoup4" ,python-beautifulsoup4)))
486 (home-page "https://html5-parser.readthedocs.io")
487 (synopsis "Fast C-based HTML5 parsing for Python")
488 (description "This package provides a fast implementation of the HTML5
489 parsing spec for Python. Parsing is done in C using a variant of the gumbo
490 parser. The gumbo parse tree is then transformed into an lxml tree, also in
491 C, yielding parse times that can be a thirtieth of the html5lib parse times.")
492 ;; src/as-python-tree.[c|h] are licensed GPL3. The other files
493 ;; indicate ASL2.0, including the LICENSE file for the whole project.
494 (license (list license:asl2.0 license:gpl3))))
495
496 (define-public python2-html5-parser
497 (package-with-python2 python-html5-parser))
498
499 (define-public python-pycurl
500 (package
501 (name "python-pycurl")
502 (version "7.43.0.2")
503 (source
504 (origin
505 (method url-fetch)
506 (uri (string-append "https://dl.bintray.com/pycurl/pycurl/pycurl-"
507 version ".tar.gz"))
508 (sha256
509 (base32 "1915kb04k1j4y6k1dx1sgnbddxrl9r1n4q928if2lkrdm73xy30g"))))
510 (build-system python-build-system)
511 (arguments
512 ;; The tests attempt to access external web servers, so we cannot run
513 ;; them. Furthermore, they are skipped altogether when using Python 2.
514 '(#:tests? #f
515 #:phases (modify-phases %standard-phases
516 (add-before 'build 'configure-tls-backend
517 (lambda _
518 ;; XXX: PycURL fails to automatically determine which TLS
519 ;; backend to use when cURL is built with --disable-static.
520 ;; See setup.py and <https://github.com/pycurl/pycurl/pull/147>.
521 (setenv "PYCURL_SSL_LIBRARY" "gnutls")
522 #t)))))
523 (native-inputs
524 `(("python-nose" ,python-nose)
525 ("python-bottle" ,python-bottle)))
526 (inputs
527 `(("curl" ,curl)
528 ("gnutls" ,gnutls)))
529 (home-page "http://pycurl.io/")
530 (synopsis "Lightweight Python wrapper around libcurl")
531 (description "Pycurl is a lightweight wrapper around libcurl. It provides
532 high-speed transfers via libcurl and frequently outperforms alternatives.")
533
534 ;; Per 'README.rst', this is dual-licensed: users can redistribute pycurl
535 ;; under the terms of LGPLv2.1+ or Expat.
536 (license (list license:lgpl2.1+ license:expat))))
537
538 (define-public python2-pycurl
539 (package-with-python2 python-pycurl))
540
541 (define-public python-webencodings
542 (package
543 (name "python-webencodings")
544 (version "0.5.1")
545 (source (origin
546 (method url-fetch)
547 (uri (pypi-uri "webencodings" version))
548 (sha256
549 (base32
550 "08qrgrc4hrximb2gqnl69g01s93rhf2842jfxdjljc1dbwj1qsmk"))))
551 (build-system python-build-system)
552 (arguments
553 '(#:phases
554 (modify-phases %standard-phases
555 (replace 'check
556 (lambda _
557 (invoke "py.test" "-v" "webencodings/tests.py")
558 #t)))))
559 (native-inputs
560 `(("python-pytest" ,python-pytest)))
561 (home-page "https://github.com/SimonSapin/python-webencodings")
562 (synopsis "Character encoding aliases for legacy web content")
563 (description
564 "In order to be compatible with legacy web content when interpreting
565 something like @code{Content-Type: text/html; charset=latin1}, tools need
566 to use a particular set of aliases for encoding labels as well as some
567 overriding rules. For example, @code{US-ASCII} and @code{iso-8859-1} on
568 the web are actually aliases for @code{windows-1252}, and a @code{UTF-8}
569 or @code{UTF-16} BOM takes precedence over any other encoding declaration.
570 The WHATWG @url{https://encoding.spec.whatwg.org/,Encoding} standard
571 defines all such details so that implementations do not have to
572 reverse-engineer each other.
573
574 This module implements the Encoding standard and has encoding labels and
575 BOM detection, but the actual implementation for encoders and decoders
576 is Python’s.")
577 (license license:bsd-3)))
578
579 (define-public python2-webencodings
580 (package-with-python2 python-webencodings))
581
582 (define-public python-openid
583 (package
584 (name "python-openid")
585 (version "3.1.0")
586 (source
587 (origin
588 (method url-fetch)
589 (uri (pypi-uri "python3-openid" version))
590 (sha256
591 (base32
592 "00l5hrjh19740w00b3fnsqldnla41wbr2rics09dl4kyd1fkd3b2"))))
593 (build-system python-build-system)
594 (arguments
595 `(#:phases
596 (modify-phases %standard-phases
597 (replace 'check
598 (lambda _
599 (invoke "coverage" "run" "-m"
600 "unittest" "openid.test.test_suite"))))))
601 (properties `((python2-variant . ,(delay python2-openid))))
602 (propagated-inputs
603 `(("python-defusedxml" ,python-defusedxml)))
604 (native-inputs
605 `(("python-coverage" ,python-coverage)
606 ("python-psycopg2" ,python-psycopg2)
607 ("python-django" ,python-django)))
608 (home-page "https://github.com/necaris/python3-openid")
609 (synopsis "OpenID support for servers and consumers")
610 (description "This library provides OpenID authentication for Python, both
611 for clients and servers.")
612 (license license:asl2.0)))
613
614 (define-public python2-openid
615 (package
616 (name "python2-openid")
617 (version "2.2.5")
618 (source
619 (origin
620 (method url-fetch)
621 (uri (pypi-uri "python-openid" version))
622 (sha256
623 (base32
624 "1vvhxlghjan01snfdc4k7ykd80vkyjgizwgg9bncnin8rqz1ricj"))))
625 (build-system python-build-system)
626 (arguments
627 ;; Python 3 support is in `python3-openid`, a separate package.
628 `(#:python ,python-2
629 ;; Tests aren't initialized correctly.
630 #:tests? #f))
631 (home-page "https://github.com/openid/python-openid")
632 (synopsis "OpenID support for servers and consumers")
633 (description "This library provides OpenID authentication for Python, both
634 for clients and servers.")
635 (license license:asl2.0)))
636
637 (define-public python-cssutils
638 (package
639 (name "python-cssutils")
640 (version "1.0.2")
641 (source
642 (origin
643 (method url-fetch)
644 (uri (pypi-uri "cssutils" version))
645 (sha256
646 (base32
647 "1bxchrbqzapwijap0yhlxdil1w9bmwvgx77aizlkhc2mcxjg1z52"))))
648 (build-system python-build-system)
649 (native-inputs
650 `(("unzip" ,unzip))) ; for unpacking the source
651 (arguments
652 `(#:tests? #f)) ; tests require python-pbr < 1.7.0
653 (home-page "http://cthedot.de/cssutils/")
654 (synopsis
655 "CSS Cascading Style Sheets library for Python")
656 (description
657 "Cssutils is a Python package for parsing and building CSS
658 Cascading Style Sheets. Currently it provides a DOM only and no rendering
659 options.")
660 (license license:lgpl3+)))
661
662 (define-public python2-cssutils
663 (package-with-python2 python-cssutils))
664
665 (define-public python-css-parser
666 (package
667 (inherit python-cssutils)
668 (name "python-css-parser")
669 (version "1.0.4")
670 (source
671 (origin
672 (method url-fetch)
673 (uri (pypi-uri "css-parser" version ".tar.gz"))
674 (sha256
675 (base32
676 "0i4xfykiffxzr4f6y0m2ggqvx1rzam6pw6krlr5k6ldf29akbay7"))))
677 (home-page "https://github.com/ebook-utils/css-parser")
678 (synopsis "Fork of cssutils modified for parsing ebooks")
679 (description
680 "Css-parser is a fork of cssutils 1.0.2, updated and modified for parsing
681 ebooks, due to cssutils not receiving updates as of 1.0.2.")
682 (license license:lgpl3+)))
683
684 (define-public python2-css-parser
685 (package-with-python2 python-css-parser))
686
687 (define-public python-cssselect
688 (package
689 (name "python-cssselect")
690 (version "0.9.2")
691 (source
692 (origin
693 (method url-fetch)
694 (uri (pypi-uri "cssselect" version))
695 (sha256
696 (base32
697 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
698 (build-system python-build-system)
699 (arguments
700 ;; tests fail with message
701 ;; AttributeError: 'module' object has no attribute 'tests'
702 `(#:tests? #f))
703 (home-page
704 "https://pythonhosted.org/cssselect/")
705 (synopsis
706 "CSS3 selector parser and translator to XPath 1.0")
707 (description
708 "Cssselect ia a Python module that parses CSS3 Selectors and translates
709 them to XPath 1.0 expressions. Such expressions can be used in lxml or
710 another XPath engine to find the matching elements in an XML or HTML document.")
711 (license license:bsd-3)))
712
713 (define-public python2-cssselect
714 (package-with-python2 python-cssselect))
715
716 (define-public python-openid-cla
717 (package
718 (name "python-openid-cla")
719 (version "1.2")
720 (source
721 (origin
722 (method url-fetch)
723 (uri (pypi-uri "python-openid-cla" version))
724 (sha256
725 (base32
726 "102hy2qisvjxp5s0v9lvwqi4f2dk0dhns40vjgn008yxc7k0h3cr"))))
727 (build-system python-build-system)
728 (arguments '(#:tests? #f)) ; No tests.
729 (home-page "https://github.com/puiterwijk/python-openid-cla/")
730 (synopsis "Implementation of the OpenID CLA extension for python-openid")
731 (description "@code{openid-cla} is an implementation of the OpenID
732 contributor license agreement extension for python-openid.")
733 (license license:bsd-3)))
734
735 (define-public python2-openid-cla
736 (package-with-python2 python-openid-cla))
737
738 (define-public python-openid-teams
739 (package
740 (name "python-openid-teams")
741 (version "1.1")
742 (source
743 (origin
744 (method url-fetch)
745 (uri (pypi-uri "python-openid-teams" version))
746 (sha256
747 (base32
748 "05zrh78alav24rxkbqlpbad6d3x2nljk6z6j7kflxf3vdqa7w969"))))
749 (build-system python-build-system)
750 (arguments '(#:tests? #f)) ; No tests.
751 (home-page "https://github.com/puiterwijk/python-openid-teams/")
752 (synopsis "Implementation of the OpenID teams extension for python-openid")
753 (description
754 "@code{openid-teams} is an implementation of the OpenID
755 teams extension for python-openid.")
756 (license license:bsd-3)))
757
758 (define-public python2-openid-teams
759 (package-with-python2 python-openid-teams))
760
761 (define-public python-tornado
762 (package
763 (name "python-tornado")
764 (version "5.1.1")
765 (source
766 (origin
767 (method url-fetch)
768 (uri (pypi-uri "tornado" version))
769 (sha256
770 (base32
771 "02clqk2116jbnq8lnaqmdw3p52nqrd9ib59r4xz2ll43fpcmhlaf"))))
772 (build-system python-build-system)
773 (arguments
774 '(;; FIXME: Two tests error out with:
775 ;; AssertionError: b'Error in atexit._run_exitfuncs:\nFileNotF[44 chars]ry\n' != b''
776 ;; #:phases
777 ;; (modify-phases %standard-phases
778 ;; (replace 'check
779 ;; (lambda _
780 ;; ;; 'setup.py test' hits an AssertionError on BSD-specific
781 ;; ;; "tornado/platform/kqueue.py". This is the supported method:
782 ;; (invoke "python" "-m" "tornado.test.runtests")
783 ;; #t)))
784 #:tests? #f))
785 (native-inputs
786 `(("python-certifi" ,python-certifi)))
787 (home-page "https://www.tornadoweb.org/")
788 (synopsis "Python web framework and asynchronous networking library")
789 (description
790 "Tornado is a Python web framework and asynchronous networking library,
791 originally developed at FriendFeed. By using non-blocking network I/O,
792 Tornado can scale to tens of thousands of open connections, making it ideal
793 for long polling, WebSockets, and other applications that require a long-lived
794 connection to each user.")
795 (license license:asl2.0)
796 (properties `((python2-variant . ,(delay python2-tornado))))))
797
798 (define-public python2-tornado
799 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
800 (package (inherit tornado)
801 (propagated-inputs
802 `(("python2-backport-ssl-match-hostname"
803 ,python2-backport-ssl-match-hostname)
804 ("python2-backports-abc" ,python2-backports-abc)
805 ("python2-singledispatch" ,python2-singledispatch)
806 ,@(package-propagated-inputs tornado))))))
807
808 (define-public python-tornado-http-auth
809 (package
810 (name "python-tornado-http-auth")
811 (version "1.1.0")
812 (source
813 (origin
814 (method url-fetch)
815 (uri (pypi-uri "tornado-http-auth" version))
816 (sha256
817 (base32
818 "0znrgqd7k2s4ia474xizi6h3061zj4sn5n6cq76bkwl3wwshifn5"))))
819 (build-system python-build-system)
820 (propagated-inputs
821 `(("python-tornado" ,python-tornado)))
822 (home-page
823 "https://github.com/gvalkov/tornado-http-auth")
824 (synopsis
825 "Digest and basic authentication module for Tornado")
826 (description
827 "Provides support for adding authentication to services using the Tornado
828 web framework, either via the basic or digest authentication schemes.")
829 (license license:asl2.0)))
830
831 (define-public python-terminado
832 (package
833 (name "python-terminado")
834 (version "0.8.1")
835 (source
836 (origin
837 (method url-fetch)
838 (uri (pypi-uri "terminado" version))
839 (sha256
840 (base32
841 "0yh69k6579g848rmjyllb5h75pkvgcy27r1l3yzgkf33wnnzkasm"))))
842 (build-system python-build-system)
843 (propagated-inputs
844 `(("python-tornado" ,python-tornado)
845 ("python-ptyprocess" ,python-ptyprocess)))
846 (native-inputs
847 `(("python-nose" ,python-nose)))
848 (arguments
849 `(#:phases
850 (modify-phases %standard-phases
851 (replace 'check
852 (lambda _ (invoke "nosetests") #t)))))
853 (home-page "https://github.com/takluyver/terminado")
854 (synopsis "Terminals served to term.js using Tornado websockets")
855 (description "This package provides a Tornado websocket backend for the
856 term.js Javascript terminal emulator library.")
857 (license license:bsd-2)
858 (properties `((python2-variant . ,(delay python2-terminado))))))
859
860 (define-public python2-terminado
861 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
862 (package (inherit terminado)
863 (propagated-inputs
864 `(("python2-backport-ssl-match-hostname"
865 ,python2-backport-ssl-match-hostname)
866 ("python2-futures" ,python2-futures)
867 ,@(package-propagated-inputs terminado))))))
868
869 (define-public python-wsgi-intercept
870 (package
871 (name "python-wsgi-intercept")
872 (version "1.2.2")
873 (source (origin
874 (method url-fetch)
875 (uri (pypi-uri "wsgi_intercept" version))
876 (sha256
877 (base32
878 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
879 (build-system python-build-system)
880 (propagated-inputs
881 `(("python-six" ,python-six)))
882 (native-inputs
883 `(("python-pytest" ,python-pytest)
884 ("python-httplib2" ,python-httplib2)
885 ("python-requests" ,python-requests)
886 ("python-urllib3" ,python-urllib3)))
887 (synopsis "Puts a WSGI application in place of a real URI for testing")
888 (description "Wsgi_intercept installs a WSGI application in place of a real
889 URI for testing. Testing a WSGI application normally involves starting a
890 server at a local host and port, then pointing your test code to that address.
891 Instead, this library lets you intercept calls to any specific host/port
892 combination and redirect them into a WSGI application importable by your test
893 program. Thus, you can avoid spawning multiple processes or threads to test
894 your Web app.")
895 (home-page "https://github.com/cdent/wsgi-intercept")
896 (license license:expat)))
897
898 (define-public python-webob
899 (package
900 (name "python-webob")
901 (version "1.5.1")
902 (source
903 (origin
904 (method url-fetch)
905 (uri (pypi-uri "WebOb" version))
906 (sha256
907 (base32
908 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
909 (build-system python-build-system)
910 (native-inputs
911 `(("python-nose" ,python-nose)))
912 (home-page "https://webob.org/")
913 (synopsis "WSGI request and response object")
914 (description
915 "WebOb provides wrappers around the WSGI request environment, and an
916 object to help create WSGI responses.")
917 (license license:expat)))
918
919 (define-public python2-webob
920 (package-with-python2 python-webob))
921
922 (define-public python-zope-event
923 (package
924 (name "python-zope-event")
925 (version "4.1.0")
926 (source
927 (origin
928 (method url-fetch)
929 (uri (pypi-uri "zope.event" version))
930 (sha256
931 (base32
932 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
933 (build-system python-build-system)
934 (home-page "https://pypi.python.org/pypi/zope.event")
935 (synopsis "Event publishing system for Python")
936 (description "Zope.event provides an event publishing API, intended for
937 use by applications which are unaware of any subscribers to their events. It
938 is a simple event-dispatching system on which more sophisticated event
939 dispatching systems can be built.")
940 (license license:zpl2.1)))
941
942 (define-public python2-zope-event
943 (package-with-python2 python-zope-event))
944
945 (define-public python-zope-interface
946 (package
947 (name "python-zope-interface")
948 (version "4.6.0")
949 (source
950 (origin
951 (method url-fetch)
952 (uri (pypi-uri "zope.interface" version))
953 (sha256
954 (base32
955 "1rgh2x3rcl9r0v0499kf78xy86rnmanajf4ywmqb943wpk50sg8v"))))
956 (build-system python-build-system)
957 (native-inputs
958 `(("python-zope-event" ,python-zope-event)))
959 (home-page "https://github.com/zopefoundation/zope.interface")
960 (synopsis "Python implementation of the \"design by contract\"
961 methodology")
962 (description "Zope.interface provides an implementation of \"object
963 interfaces\" for Python. Interfaces are a mechanism for labeling objects as
964 conforming to a given API or contract.")
965 (license license:zpl2.1)))
966
967 (define-public python2-zope-interface
968 (package-with-python2 python-zope-interface))
969
970 (define-public python-zope-exceptions
971 (package
972 (name "python-zope-exceptions")
973 (version "4.0.8")
974 (source
975 (origin
976 (method url-fetch)
977 (uri (pypi-uri "zope.exceptions" version))
978 (sha256
979 (base32
980 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
981 (build-system python-build-system)
982 (arguments
983 '(#:tests? #f)) ; circular dependency with zope.testrunner
984 (propagated-inputs
985 `(("python-zope-interface" ,python-zope-interface)))
986 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
987 (synopsis "Zope exceptions")
988 (description "Zope.exceptions provides general-purpose exception types
989 that have uses outside of the Zope framework.")
990 (license license:zpl2.1)))
991
992 (define-public python2-zope-exceptions
993 (package-with-python2 python-zope-exceptions))
994
995 (define-public python-zope-testing
996 (package
997 (name "python-zope-testing")
998 (version "4.6.2")
999 (source
1000 (origin
1001 (method url-fetch)
1002 (uri (pypi-uri "zope.testing" version))
1003 (sha256
1004 (base32
1005 "0iiq54hjhkk2gpvzfjac70vyn4r0kw0ngvicshxbdwrkgf2gjq3g"))
1006 (modules '((guix build utils)))
1007 (snippet
1008 '(begin
1009 ;; Remove pre-compiled .pyc files backup files from source.
1010 (for-each delete-file (find-files "." "(\\.pyc|~)$"))
1011 #t))))
1012 (build-system python-build-system)
1013 (home-page "https://pypi.python.org/pypi/zope.testing")
1014 (synopsis "Zope testing helpers")
1015 (description "Zope.testing provides a number of testing utilities for HTML
1016 forms, HTTP servers, regular expressions, and more.")
1017 (license license:zpl2.1)))
1018
1019 (define-public python2-zope-testing
1020 (package-with-python2 python-zope-testing))
1021
1022 (define-public python-zope-testrunner
1023 (package
1024 (name "python-zope-testrunner")
1025 (version "4.4.9")
1026 (source
1027 (origin
1028 (method url-fetch)
1029 (uri (pypi-uri "zope.testrunner" version ".zip"))
1030 (sha256
1031 (base32
1032 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
1033 (build-system python-build-system)
1034 (arguments
1035 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
1036 (native-inputs
1037 `(("python-six" ,python-six)
1038 ;("python-zope-interface" ,python-zope-interface)
1039 ("python-zope-exceptions" ,python-zope-exceptions)
1040 ("python-zope-testing" ,python-zope-testing)
1041 ("unzip" ,unzip)))
1042 (propagated-inputs
1043 `(("python-zope-interface" ,python-zope-interface)))
1044 (home-page "https://pypi.python.org/pypi/zope.testrunner")
1045 (synopsis "Zope testrunner script")
1046 (description "Zope.testrunner provides a script for running Python
1047 tests.")
1048 (license license:zpl2.1)))
1049
1050 (define-public python2-zope-testrunner
1051 (let ((base (package-with-python2 python-zope-testrunner)))
1052 (package
1053 (inherit base)
1054 (native-inputs
1055 (append (package-native-inputs base)
1056 `(("python2-subunit" ,python2-subunit)
1057 ("python2-mimeparse" ,python2-mimeparse)))))))
1058
1059 (define-public python-zope-i18nmessageid
1060 (package
1061 (name "python-zope-i18nmessageid")
1062 (version "4.0.3")
1063 (source
1064 (origin
1065 (method url-fetch)
1066 (uri (pypi-uri "zope.i18nmessageid" version))
1067 (sha256
1068 (base32
1069 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
1070 (build-system python-build-system)
1071 (home-page "https://pypi.python.org/pypi/zope.i18nmessageid")
1072 (synopsis "Message identifiers for internationalization")
1073 (description "Zope.i18nmessageid provides facilities for declaring
1074 internationalized messages within program source text.")
1075 (license license:zpl2.1)))
1076
1077 (define-public python2-zope-i18nmessageid
1078 (package-with-python2 python-zope-i18nmessageid))
1079
1080 (define-public python-zope-schema
1081 (package
1082 (name "python-zope-schema")
1083 (version "4.4.2")
1084 (source
1085 (origin
1086 (method url-fetch)
1087 (uri (pypi-uri "zope.schema" version))
1088 (sha256
1089 (base32
1090 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
1091 (build-system python-build-system)
1092 (arguments
1093 '(#:tests? #f)) ; FIXME: Tests can't find zope.event.
1094 (propagated-inputs
1095 `(("python-zope-event" ,python-zope-event)
1096 ("python-zope-exceptions" ,python-zope-exceptions)
1097 ("python-zope-interface" ,python-zope-interface)))
1098 (native-inputs
1099 `(("python-zope-testing" ,python-zope-testing)
1100 ("python-coverage" ,python-coverage)
1101 ("python-nose" ,python-nose)))
1102 (home-page "https://pypi.python.org/pypi/zope.schema")
1103 (synopsis "Zope data schemas")
1104 (description "Zope.scheme provides extensions to zope.interface for
1105 defining data schemas.")
1106 (license license:zpl2.1)))
1107
1108 (define-public python2-zope-schema
1109 (package-with-python2 python-zope-schema))
1110
1111 (define-public python-zope-configuration
1112 (package
1113 (name "python-zope-configuration")
1114 (version "4.0.3")
1115 (source (origin
1116 (method url-fetch)
1117 (uri (pypi-uri "zope.configuration" version))
1118 (sha256
1119 (base32
1120 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
1121 (build-system python-build-system)
1122 (arguments
1123 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
1124 (propagated-inputs
1125 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
1126 ("python-zope-schema" ,python-zope-schema)))
1127 (home-page "https://pypi.python.org/pypi/zope.configuration")
1128 (synopsis "Zope Configuration Markup Language")
1129 (description "Zope.configuration implements ZCML, the Zope Configuration
1130 Markup Language.")
1131 (license license:zpl2.1)))
1132
1133 (define-public python2-zope-configuration
1134 (package-with-python2 python-zope-configuration))
1135
1136 (define-public python-zope-proxy
1137 (package
1138 (name "python-zope-proxy")
1139 (version "4.1.6")
1140 (source
1141 (origin
1142 (method url-fetch)
1143 (uri (pypi-uri "zope.proxy" version))
1144 (sha256
1145 (base32
1146 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
1147 (build-system python-build-system)
1148 (arguments
1149 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
1150 (propagated-inputs
1151 `(("python-zope-interface" ,python-zope-interface)))
1152 (home-page "https://pypi.python.org/pypi/zope.proxy")
1153 (synopsis "Generic, transparent proxies")
1154 (description "Zope.proxy provides generic, transparent proxies for Python.
1155 Proxies are special objects which serve as mostly-transparent wrappers around
1156 another object, intervening in the apparent behavior of the wrapped object
1157 only when necessary to apply the policy (e.g., access checking, location
1158 brokering, etc.) for which the proxy is responsible.")
1159 (license license:zpl2.1)))
1160
1161 (define-public python2-zope-proxy
1162 (package-with-python2 python-zope-proxy))
1163
1164 (define-public python-zope-location
1165 (package
1166 (name "python-zope-location")
1167 (version "4.0.3")
1168 (source
1169 (origin
1170 (method url-fetch)
1171 (uri (pypi-uri "zope.location" version))
1172 (sha256
1173 (base32
1174 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
1175 (build-system python-build-system)
1176 (arguments
1177 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
1178 (propagated-inputs
1179 `(("python-zope-proxy" ,python-zope-proxy)
1180 ("python-zope-schema" ,python-zope-schema)))
1181 (home-page "https://pypi.python.org/pypi/zope.location/")
1182 (synopsis "Zope location library")
1183 (description "Zope.location implements the concept of \"locations\" in
1184 Zope3, which are are special objects that have a structural location.")
1185 (license license:zpl2.1)))
1186
1187 (define-public python2-zope-location
1188 (package-with-python2 python-zope-location))
1189
1190 (define-public python-zope-security
1191 (package
1192 (name "python-zope-security")
1193 (version "4.0.3")
1194 (source
1195 (origin
1196 (method url-fetch)
1197 (uri (pypi-uri "zope.security" version))
1198 (sha256
1199 (base32
1200 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
1201 (build-system python-build-system)
1202 (arguments
1203 '(#:tests? #f)) ; FIXME: Tests can't find zope.testrunner.
1204 (propagated-inputs
1205 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
1206 ("python-zope-proxy" ,python-zope-proxy)
1207 ("python-zope-schema" ,python-zope-schema)))
1208 (native-inputs
1209 `(("python-six" ,python-six)
1210 ("python-zope-component" ,python-zope-component)
1211 ("python-zope-configuration" ,python-zope-configuration)
1212 ("python-zope-location" ,python-zope-location)
1213 ("python-zope-testrunner" ,python-zope-testrunner)
1214 ("python-zope-testing" ,python-zope-testing)))
1215 (home-page "https://pypi.python.org/pypi/zope.security")
1216 (synopsis "Zope security framework")
1217 (description "Zope.security provides a generic mechanism to implement
1218 security policies on Python objects.")
1219 (license license:zpl2.1)))
1220
1221 (define-public python2-zope-security
1222 (let ((zope-security (package-with-python2 python-zope-security)))
1223 (package (inherit zope-security)
1224 (propagated-inputs
1225 `(("python2-zope-testrunner" ,python2-zope-testrunner)
1226 ,@(alist-delete
1227 "python-zope-testrunner"
1228 (package-propagated-inputs zope-security)))))))
1229
1230 (define-public python-zope-component
1231 (package
1232 (name "python-zope-component")
1233 (version "4.3.0")
1234 (source
1235 (origin
1236 (method url-fetch)
1237 (uri (pypi-uri "zope.component" version))
1238 (sha256
1239 (base32
1240 "1hlvzwj1kcfz1qms1dzhwsshpsf38z9clmyksb1gh41n8k3kchdv"))))
1241 (build-system python-build-system)
1242 (arguments
1243 ;; Skip tests due to circular dependency with python-zope-security.
1244 '(#:tests? #f))
1245 (native-inputs
1246 `(("python-zope-testing" ,python-zope-testing)))
1247 (propagated-inputs
1248 `(("python-zope-event" ,python-zope-event)
1249 ("python-zope-interface" ,python-zope-interface)
1250 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
1251 ("python-zope-configuration" ,python-zope-configuration)))
1252 (home-page "https://github.com/zopefoundation/zope.component")
1253 (synopsis "Zope Component Architecture")
1254 (description "Zope.component represents the core of the Zope Component
1255 Architecture. Together with the zope.interface package, it provides
1256 facilities for defining, registering and looking up components.")
1257 (license license:zpl2.1)))
1258
1259 (define-public python2-zope-component
1260 (package-with-python2 python-zope-component))
1261
1262 (define-public python-ndg-httpsclient
1263 (package
1264 (name "python-ndg-httpsclient")
1265 (version "0.5.1")
1266 (source (origin
1267 (method url-fetch)
1268 (uri (pypi-uri "ndg_httpsclient" version))
1269 (sha256
1270 (base32
1271 "0412b7i1s4vj7lz9r72nmb28h9syd4q2x89bdirkkc3a6z8awbyp"))))
1272 (build-system python-build-system)
1273 (arguments
1274 '(;; The tests appear to require networking.
1275 #:tests? #f))
1276 (propagated-inputs
1277 `(("python-pyopenssl" ,python-pyopenssl)))
1278 (synopsis "HTTPS support for Python's httplib and urllib2")
1279 (description "This is a HTTPS client implementation for httplib and urllib2
1280 based on PyOpenSSL. PyOpenSSL provides a more fully-featured SSL implementation
1281 over the default provided with Python and, importantly, enables full
1282 verification of the SSL peer.")
1283 (home-page "https://github.com/cedadev/ndg_httpsclient/")
1284 (license license:bsd-3)))
1285
1286 ;; python2-openssl requires special care, so package-with-python2 is
1287 ;; insufficient.
1288 (define-public python2-ndg-httpsclient
1289 (package (inherit python-ndg-httpsclient)
1290 (name "python2-ndg-httpsclient")
1291 (arguments
1292 (substitute-keyword-arguments (package-arguments python-ndg-httpsclient)
1293 ((#:python _) python-2)))
1294 (propagated-inputs
1295 `(("python2-pyopenssl" ,python2-pyopenssl)))))
1296
1297 (define-public python-websocket-client
1298 (package
1299 (name "python-websocket-client")
1300 (version "0.54.0")
1301 (source
1302 (origin
1303 (method url-fetch)
1304 (uri (pypi-uri "websocket_client" version))
1305 (sha256
1306 (base32
1307 "0j88zmikaypf38lvpkf4aaxrjp9j07dmy5ghj7kli0fv3p4n45g5"))))
1308 (build-system python-build-system)
1309 (propagated-inputs
1310 `(("python-six" ,python-six)))
1311 (home-page "https://github.com/liris/websocket-client")
1312 (synopsis "WebSocket client for Python")
1313 (description "The Websocket-client module provides the low level APIs for
1314 WebSocket usage in Python programs.")
1315 (properties `((python2-variant . ,(delay python2-websocket-client))))
1316 (license license:lgpl2.1+)))
1317
1318 (define-public python2-websocket-client
1319 (let ((base (package-with-python2
1320 (strip-python2-variant python-websocket-client))))
1321 (package
1322 (inherit base)
1323 (native-inputs
1324 `(("python2-backport-ssl-match-hostname"
1325 ,python2-backport-ssl-match-hostname)
1326 ,@(package-native-inputs base))))))
1327
1328 (define-public python-requests
1329 (package
1330 (name "python-requests")
1331 (version "2.22.0")
1332 (source (origin
1333 (method url-fetch)
1334 (uri (pypi-uri "requests" version))
1335 (sha256
1336 (base32
1337 "1d5ybh11jr5sm7xp6mz8fyc7vrp4syifds91m7sj60xalal0gq0i"))))
1338 (build-system python-build-system)
1339 (propagated-inputs
1340 `(("python-certifi" ,python-certifi)
1341 ("python-chardet" ,python-chardet)
1342 ("python-idna" ,python-idna)
1343 ("python-urllib3" ,python-urllib3)))
1344 (arguments
1345 ;; FIXME: Some tests require network access.
1346 '(#:tests? #f))
1347 (home-page "http://python-requests.org/")
1348 (synopsis "Python HTTP library")
1349 (description
1350 "Requests is a Python HTTP client library. It aims to be easier to use
1351 than Python’s urllib2 library.")
1352 (license license:asl2.0)))
1353
1354 ;; Some software requires an older version of Requests, notably Docker
1355 ;; Compose.
1356 (define-public python-requests-2.7
1357 (package (inherit python-requests)
1358 (version "2.7.0")
1359 (source (origin
1360 (method url-fetch)
1361 (uri (pypi-uri "requests" version))
1362 (sha256
1363 (base32
1364 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
1365
1366 (define-public python2-requests
1367 (package-with-python2 python-requests))
1368
1369 (define-public python-requests-mock
1370 (package
1371 (name "python-requests-mock")
1372 (version "1.3.0")
1373 (source
1374 (origin
1375 (method url-fetch)
1376 (uri (pypi-uri "requests-mock" version))
1377 (sha256
1378 (base32
1379 "0jr997dvk6zbmhvbpcv3rajrgag69mcsm1ai3w3rgk2jdh6rg1mx"))))
1380 (build-system python-build-system)
1381 (propagated-inputs
1382 `(("python-requests" ,python-requests)
1383 ("python-six" ,python-six)))
1384 (native-inputs
1385 `(("python-pbr" ,python-pbr)
1386 ("python-discover" ,python-discover)
1387 ("python-docutils" ,python-docutils)
1388 ("python-fixtures" ,python-fixtures)
1389 ("python-mock" ,python-mock)
1390 ("python-sphinx" ,python-sphinx)
1391 ("python-testrepository" ,python-testrepository)
1392 ("python-testtools" ,python-testtools)))
1393 (home-page "https://requests-mock.readthedocs.org/")
1394 (synopsis "Mock out responses from the requests package")
1395 (description
1396 "This module provides a building block to stub out the HTTP requests
1397 portions of your testing code.")
1398 (properties `((python2-variant . ,(delay python2-requests-mock))))
1399 (license license:asl2.0)))
1400
1401 (define-public python2-requests-mock
1402 (package (inherit (package-with-python2
1403 (strip-python2-variant python-requests-mock)))
1404 (arguments
1405 `(#:python ,python-2
1406 ;; FIXME: 'subunit.run discover: error: no such option: --list'
1407 #:tests? #f))))
1408
1409 (define-public python-requests-toolbelt
1410 (package
1411 (name "python-requests-toolbelt")
1412 (version "0.8.0")
1413 (source (origin
1414 (method url-fetch)
1415 (uri (pypi-uri "requests-toolbelt" version))
1416 (sha256
1417 (base32
1418 "1dc7l42i4080r8i4m9fj51jx367lqkai170vrv7wd93gdj9k39gn"))))
1419 (build-system python-build-system)
1420 (native-inputs
1421 `(("python-betamax" ,python-betamax)
1422 ("python-mock" ,python-mock)
1423 ("python-pytest" ,python-pytest)))
1424 (propagated-inputs
1425 `(("python-requests" ,python-requests)))
1426 (synopsis "Extensions to python-requests")
1427 (description "This is a toolbelt of useful classes and functions to be used
1428 with python-requests.")
1429 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
1430 (license license:asl2.0)))
1431
1432 (define-public python2-requests-toolbelt
1433 (package-with-python2 python-requests-toolbelt))
1434
1435 (define-public python-oauthlib
1436 (package
1437 (name "python-oauthlib")
1438 (version "3.0.1")
1439 (source (origin
1440 (method url-fetch)
1441 (uri (pypi-uri "oauthlib" version))
1442 (sha256
1443 (base32
1444 "163jg4a8f7c5ki655grrr47kgljy12wri3qly7ijf64sk1fjrqqc"))))
1445 (build-system python-build-system)
1446 (arguments
1447 `(#:phases (modify-phases %standard-phases
1448 (replace 'check
1449 (lambda _
1450 (invoke "pytest" "-vv"))))))
1451 (native-inputs
1452 `(("python-pytest" ,python-pytest)
1453 ("python-pytest-cov" ,python-pytest-cov)
1454 ("python-mock" ,python-mock)))
1455 (propagated-inputs
1456 `(("python-cryptography" ,python-cryptography)
1457 ("python-pyjwt" ,python-pyjwt)
1458 ("python-blinker" ,python-blinker)))
1459 (home-page "https://github.com/oauthlib/oauthlib")
1460 (synopsis "OAuth implementation for Python")
1461 (description
1462 "Oauthlib is a generic, spec-compliant, thorough implementation of the
1463 OAuth request-signing logic.")
1464 (license license:bsd-3)))
1465
1466 (define-public python2-oauthlib
1467 (package-with-python2 python-oauthlib))
1468
1469 (define-public python-rauth
1470 (package
1471 (name "python-rauth")
1472 (version "0.7.3")
1473 (source
1474 (origin
1475 (method url-fetch)
1476 (uri (pypi-uri "rauth" version))
1477 (sha256
1478 (base32
1479 "02kv8w8l98ky223avyq7vw7x1f2ya9chrm59r77ylq45qb0xnk2j"))))
1480 (build-system python-build-system)
1481 (arguments
1482 `(#:test-target "check"))
1483 (propagated-inputs
1484 `(("python-requests" ,python-requests)))
1485 (home-page "https://github.com/litl/rauth")
1486 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
1487 (description
1488 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
1489 provides service wrappers for convenient connection initialization and
1490 authenticated session objects providing things like keep-alive.")
1491 (license license:expat)
1492 (properties `((python2-variant . ,(delay python2-rauth))))))
1493
1494 (define-public python2-rauth
1495 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
1496 (package
1497 (inherit base)
1498 (native-inputs `(("python2-unittest2" ,python2-unittest2)
1499 ,@(package-native-inputs base))))))
1500
1501 (define-public python-urllib3
1502 (package
1503 (name "python-urllib3")
1504 (version "1.25.3")
1505 (source
1506 (origin
1507 (method url-fetch)
1508 (uri (pypi-uri "urllib3" version))
1509 (sha256
1510 (base32
1511 "0cij8qcvvpj62g1q8n785qjkdymfh4b7vf45si4sw64l41rr3rfv"))))
1512 (build-system python-build-system)
1513 (arguments `(#:tests? #f))
1514 (propagated-inputs
1515 `(;; These 5 inputs are used to build urrlib3[secure]
1516 ("python-certifi" ,python-certifi)
1517 ("python-cryptography" ,python-cryptography)
1518 ("python-idna" ,python-idna)
1519 ("python-ipaddress" ,python-ipaddress)
1520 ("python-pyopenssl" ,python-pyopenssl)
1521 ("python-pysocks" ,python-pysocks)))
1522 (home-page "https://urllib3.readthedocs.io/")
1523 (synopsis "HTTP library with thread-safe connection pooling")
1524 (description
1525 "Urllib3 supports features left out of urllib and urllib2 libraries. It
1526 can reuse the same socket connection for multiple requests, it can POST files,
1527 supports url redirection and retries, and also gzip and deflate decoding.")
1528 (license license:expat)))
1529
1530 (define-public python2-urllib3
1531 (package-with-python2 python-urllib3))
1532
1533 (define-public awscli
1534 (package
1535 (name "awscli")
1536 (version "1.14.41")
1537 (source
1538 (origin
1539 (method url-fetch)
1540 (uri (pypi-uri name version))
1541 (sha256
1542 (base32
1543 "0sispclx263lybbk19zp1n9yhg8xxx4jddypzgi24vpjaqnsbwlc"))))
1544 (build-system python-build-system)
1545 (arguments
1546 ;; FIXME: The 'pypi' release does not contain tests.
1547 '(#:tests? #f
1548 #:phases
1549 (modify-phases %standard-phases
1550 (add-after 'unpack 'fix-reference-to-groff
1551 (lambda _
1552 (substitute* "awscli/help.py"
1553 (("if not self._exists_on_path\\('groff'\\):") "")
1554 (("raise ExecutableNotFoundError\\('groff'\\)") "")
1555 (("cmdline = \\['groff'")
1556 (string-append "cmdline = ['" (which "groff") "'")))
1557 #t)))))
1558 (propagated-inputs
1559 `(("python-colorama" ,python-colorama)
1560 ("python-botocore" ,python-botocore)
1561 ("python-s3transfer" ,python-s3transfer)
1562 ("python-docutils" ,python-docutils)
1563 ("python-pyyaml" ,python-pyyaml)
1564 ("python-rsa" ,python-rsa)))
1565 (inputs
1566 `(("groff" ,groff)))
1567 (home-page "https://aws.amazon.com/cli/")
1568 (synopsis "Command line client for AWS")
1569 (description "AWS CLI provides a unified command line interface to the
1570 Amazon Web Services (AWS) API.")
1571 (license license:asl2.0)))
1572
1573 (define-public python-wsgiproxy2
1574 (package
1575 (name "python-wsgiproxy2")
1576 (version "0.4.5")
1577 (source
1578 (origin
1579 (method url-fetch)
1580 (uri (pypi-uri "WSGIProxy2" version ".tar.gz"))
1581 (sha256
1582 (base32
1583 "19d9dva282vfjs784i0zkxp078lxfz4h3f621z30ij9wbf5rba6a"))))
1584 (build-system python-build-system)
1585 (native-inputs
1586 `(("python-webtest" ,python-webtest)))
1587 (propagated-inputs
1588 `(("python-requests" ,python-requests)
1589 ("python-six" ,python-six)
1590 ("python-urllib3" ,python-urllib3)
1591 ("python-webob" ,python-webob)))
1592 (home-page "https://github.com/gawel/WSGIProxy2/")
1593 (synopsis "WSGI Proxy with various http client backends")
1594 (description "WSGI turns HTTP requests into WSGI function calls.
1595 WSGIProxy turns WSGI function calls into HTTP requests.
1596 It also includes code to sign requests and pass private data,
1597 and to spawn subprocesses to handle requests.")
1598 (license license:expat)))
1599
1600 (define-public python2-wsgiproxy2
1601 (package-with-python2 python-wsgiproxy2))
1602
1603 (define-public python-pastedeploy
1604 (package
1605 (name "python-pastedeploy")
1606 (version "1.5.2")
1607 (source
1608 (origin
1609 (method url-fetch)
1610 (uri (pypi-uri "PasteDeploy" version))
1611 (sha256
1612 (base32
1613 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
1614 (build-system python-build-system)
1615 (native-inputs
1616 `(("python-nose" ,python-nose)))
1617 (home-page "http://pythonpaste.org/deploy/")
1618 (synopsis
1619 "Load, configure, and compose WSGI applications and servers")
1620 (description
1621 "This tool provides code to load WSGI applications and servers from URIs;
1622 these URIs can refer to Python Eggs for INI-style configuration files. Paste
1623 Script provides commands to serve applications based on this configuration
1624 file.")
1625 (license license:expat)))
1626
1627 (define-public python2-pastedeploy
1628 (package-with-python2 python-pastedeploy))
1629
1630 (define-public python-webtest
1631 (package
1632 (name "python-webtest")
1633 (version "2.0.33")
1634 (source
1635 (origin
1636 (method url-fetch)
1637 (uri (pypi-uri "WebTest" version))
1638 (sha256
1639 (base32
1640 "1l3z0cwqslsf4rcrhi2gr8kdfh74wn2dw76376i4g9i38gz8wd21"))))
1641 (build-system python-build-system)
1642 (arguments
1643 ;; Tests require python-pyquery, which creates a circular dependency.
1644 `(#:tests? #f))
1645 (propagated-inputs
1646 `(("python-waitress" ,python-waitress)
1647 ("python-webob" ,python-webob)
1648 ("python-six" ,python-six)
1649 ("python-beautifulsoup4" ,python-beautifulsoup4)))
1650 (home-page "http://webtest.pythonpaste.org/")
1651 (synopsis "Helper to test WSGI applications")
1652 (description "Webtest allows you to test your Python web applications
1653 without starting an HTTP server. It supports anything that supports the
1654 minimum of WSGI.")
1655 (license license:expat)))
1656
1657 (define-public python2-webtest
1658 (package-with-python2 python-webtest))
1659
1660 (define-public python-flask
1661 (package
1662 (name "python-flask")
1663 (version "1.0.3")
1664 (source (origin
1665 (method url-fetch)
1666 (uri (pypi-uri "Flask" version))
1667 (sha256
1668 (base32
1669 "1wxnhjlxwwjhjxmghykjhllpahv5pkdc5hln4ab6nab43s26sz5d"))))
1670 (build-system python-build-system)
1671 (arguments
1672 '(#:phases
1673 (modify-phases %standard-phases
1674 (replace 'check
1675 (lambda _
1676 (invoke "python" "-m" "pytest"))))))
1677 (native-inputs
1678 `(("python-pytest" ,python-pytest)))
1679 (propagated-inputs
1680 `(("python-itsdangerous" ,python-itsdangerous)
1681 ("python-jinja2" ,python-jinja2)
1682 ("python-click" ,python-click)
1683 ("python-werkzeug" ,python-werkzeug)))
1684 (home-page "https://www.palletsprojects.com/p/flask/")
1685 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
1686 (description "Flask is a micro web framework based on the Werkzeug toolkit
1687 and Jinja2 template engine. It is called a micro framework because it does not
1688 presume or force a developer to use a particular tool or library.")
1689 (license license:bsd-3)))
1690
1691 (define-public python2-flask
1692 (package-with-python2 python-flask))
1693
1694 (define-public python-flask-wtf
1695 (package
1696 (name "python-flask-wtf")
1697 (version "0.13.1")
1698 (source
1699 (origin
1700 (method url-fetch)
1701 (uri (pypi-uri "Flask-WTF" version))
1702 (sha256
1703 (base32
1704 "04l5743j2dici46038sqlzvf0xzpg8rf7s9ld2x24xv7f4idg990"))))
1705 (build-system python-build-system)
1706 (arguments
1707 '(#:phases
1708 (modify-phases %standard-phases
1709 (add-before 'check 'drop-failing-test
1710 (lambda _
1711 ;; FIXME: This file tries resolving an external server, which
1712 ;; fails. Try to patch out the offending section instead of
1713 ;; deleting the whole thing.
1714 (delete-file "tests/test_recaptcha.py")
1715 #t)))))
1716 (propagated-inputs
1717 `(("python-flask-babel" ,python-flask-babel)
1718 ("python-babel" ,python-babel)
1719 ("python-wtforms" ,python-wtforms)))
1720 (native-inputs
1721 `(("python-nose" ,python-nose)))
1722 (home-page "https://github.com/lepture/flask-wtf")
1723 (synopsis "Simple integration of Flask and WTForms")
1724 (description "Flask-WTF integrates Flask and WTForms, including CSRF, file
1725 upload, and reCAPTCHA.")
1726 (license license:bsd-3)))
1727
1728 (define-public python2-flask-wtf
1729 (package-with-python2 python-flask-wtf))
1730
1731 (define-public python-flask-multistatic
1732 (package
1733 (name "python-flask-multistatic")
1734 (version "1.0")
1735 (source
1736 (origin
1737 (method url-fetch)
1738 (uri (pypi-uri "flask-multistatic" version))
1739 (sha256
1740 (base32
1741 "0p4v50rwv64wcd0zlq7rzl4waprwr4hj19s3cgf1isywa7jcisgm"))))
1742 (build-system python-build-system)
1743 (propagated-inputs
1744 `(("python-flask" ,python-flask)))
1745 (home-page "https://pagure.io/flask-multistatic")
1746 (synopsis "Flask plugin to allow overriding static files")
1747 (description "@code{flask-multistatic} is a flask plugin that adds support
1748 for overriding static files.")
1749 (license license:gpl3+)))
1750
1751 (define-public python2-flask-multistatic
1752 (package-with-python2 python-flask-multistatic))
1753
1754 (define-public python-cookies
1755 (package
1756 (name "python-cookies")
1757 (version "2.2.1")
1758 (source (origin
1759 (method url-fetch)
1760 (uri (pypi-uri "cookies" version))
1761 (sha256
1762 (base32
1763 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
1764 (build-system python-build-system)
1765 (arguments
1766 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
1767 #:tests? #f))
1768 (native-inputs
1769 `(("python-pytest" ,python2-pytest)))
1770 (synopsis "HTTP cookie parser and renderer")
1771 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
1772 Python.")
1773 (home-page "https://gitlab.com/sashahart/cookies")
1774 (license license:expat)))
1775
1776 (define-public python2-cookies
1777 (package-with-python2 python-cookies))
1778
1779 (define-public python-responses
1780 (package
1781 (name "python-responses")
1782 (version "0.5.1")
1783 (source (origin
1784 (method url-fetch)
1785 (uri (pypi-uri "responses" version))
1786 (sha256
1787 (base32
1788 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
1789 (build-system python-build-system)
1790 (arguments
1791 `(;; Test suite is not distributed:
1792 ;; https://github.com/getsentry/responses/issues/38
1793 #:tests? #f))
1794 (native-inputs
1795 `(("python-mock" ,python-mock)))
1796 (propagated-inputs
1797 `(("python-requests" ,python-requests)
1798 ("python-cookies" ,python-cookies)
1799 ("python-six" ,python-six)))
1800 (home-page "https://github.com/getsentry/responses")
1801 (synopsis "Utility for mocking out the `requests` Python library")
1802 (description "A utility library for mocking out the `requests` Python
1803 library.")
1804 (license license:asl2.0)))
1805
1806 (define-public python2-responses
1807 (package-with-python2 python-responses))
1808
1809 (define-public python-grequests
1810 (package
1811 (name "python-grequests")
1812 (version "0.3.0")
1813 (source
1814 (origin
1815 (method url-fetch)
1816 (uri (pypi-uri "grequests" version))
1817 (sha256
1818 (base32
1819 "1j9icncllbkv7x5719b20mx670c6q1jrdx1sakskkarvx3pc8h8g"))))
1820 (build-system python-build-system)
1821 (propagated-inputs
1822 `(("python-gevent" ,python-gevent)
1823 ("python-requests" ,python-requests)))
1824 (native-inputs
1825 `(("python-nose" ,python-nose)))
1826 (home-page "https://github.com/kennethreitz/grequests")
1827 (synopsis "Python library for asynchronous HTTP requests")
1828 (description "GRequests is a Python library that allows you to use
1829 @code{Requests} with @code{Gevent} to make asynchronous HTTP Requests easily")
1830 (license license:bsd-2)))
1831
1832 (define-public python-geventhttpclient
1833 (package
1834 (name "python-geventhttpclient")
1835 (version "1.3.1")
1836 (source (origin
1837 (method url-fetch)
1838 (uri (pypi-uri "geventhttpclient" version))
1839 (sha256
1840 (base32
1841 "07d0q3wzmml75227r6y6mrl5a0zpf4v9gj0ni5rhbyzmaj4az1xx"))
1842 (modules '((guix build utils)))
1843 (snippet
1844 '(begin
1845 ;; Delete pre-compiled files.
1846 (for-each delete-file (find-files "src/geventhttpclient"
1847 ".*\\.pyc"))
1848 #t))))
1849 (build-system python-build-system)
1850 (arguments
1851 '(#:phases
1852 (modify-phases %standard-phases
1853 (add-after 'unpack 'delete-network-tests
1854 (lambda _
1855 (delete-file "src/geventhttpclient/tests/test_client.py")
1856 #t))
1857 (delete 'check)
1858 (add-after 'install 'check
1859 (lambda* (#:key inputs outputs #:allow-other-keys)
1860 (add-installed-pythonpath inputs outputs)
1861 (invoke "py.test" "src/geventhttpclient/tests" "-v"
1862 ;; Append the test modules to sys.path to avoid
1863 ;; namespace conflict which breaks SSL tests.
1864 "--import-mode=append")
1865 #t)))))
1866 (native-inputs
1867 `(("python-pytest" ,python-pytest)))
1868 (propagated-inputs
1869 `(("python-certifi" ,python-certifi)
1870 ("python-gevent" ,python-gevent)
1871 ("python-six" ,python-six)))
1872 (home-page "https://github.com/gwik/geventhttpclient")
1873 (synopsis "HTTP client library for gevent")
1874 (description "@code{python-geventhttpclient} is a high performance,
1875 concurrent HTTP client library for python using @code{gevent}.")
1876 (license license:expat)))
1877
1878 (define-public python2-geventhttpclient
1879 (package-with-python2 python-geventhttpclient))
1880
1881 (define-public python-requests-oauthlib
1882 (package
1883 (name "python-requests-oauthlib")
1884 (version "1.2.0")
1885 (source
1886 (origin
1887 (method url-fetch)
1888 (uri (pypi-uri "requests-oauthlib" version))
1889 (sha256
1890 (base32
1891 "0mrglgcvq7k48pf27s4gifdk0za8xmgpf55jy15yjj471qrk6rdx"))))
1892 (build-system python-build-system)
1893 (arguments
1894 `(#:phases
1895 (modify-phases %standard-phases
1896 ;; removes tests that require network access
1897 (add-before 'check 'pre-check
1898 (lambda _
1899 (delete-file "tests/test_core.py")
1900 #t)))))
1901 (native-inputs
1902 `(("python-pyjwt" ,python-pyjwt)
1903 ("python-requests-mock" ,python-requests-mock)
1904 ("python-mock" ,python-mock)))
1905 (propagated-inputs
1906 `(("python-oauthlib" ,python-oauthlib)
1907 ("python-requests" ,python-requests)))
1908 (home-page
1909 "https://github.com/requests/requests-oauthlib")
1910 (synopsis
1911 "OAuthlib authentication support for Requests")
1912 (description
1913 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
1914 provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
1915 (license license:isc)))
1916
1917 (define-public python2-requests-oauthlib
1918 (package-with-python2 python-requests-oauthlib))
1919
1920 (define-public python-url
1921 (package
1922 (name "python-url")
1923 (version "0.2.0")
1924 (source (origin
1925 (method url-fetch)
1926 (uri (pypi-uri "url" version))
1927 (sha256
1928 (base32
1929 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
1930 (build-system python-build-system)
1931 (propagated-inputs
1932 `(("python-publicsuffix" ,python-publicsuffix)))
1933 (native-inputs
1934 `(("python-coverage" ,python-coverage)
1935 ("python-nose" ,python-nose)))
1936 (arguments
1937 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
1938 (home-page "https://github.com/seomoz/url-py")
1939 (synopsis "URL Parsing")
1940 (description "Library for parsing urls.")
1941 (license license:expat)
1942 (properties `((python2-variant . ,(delay python2-url))))))
1943
1944 (define-public python2-url
1945 (let ((base (package-with-python2 (strip-python2-variant python-url))))
1946 (package (inherit base)
1947 (propagated-inputs
1948 `(("python2-publicsuffix" ,python2-publicsuffix))))))
1949
1950 (define-public python-cachecontrol
1951 (package
1952 (name "python-cachecontrol")
1953 (version "0.11.6")
1954 (source
1955 (origin
1956 (method url-fetch)
1957 ;; Pypi does not have tests.
1958 (uri (string-append
1959 "https://github.com/ionrock/cachecontrol/archive/v"
1960 version ".tar.gz"))
1961 (file-name (string-append name "-" version ".tar.gz"))
1962 (sha256
1963 (base32
1964 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
1965 (build-system python-build-system)
1966 (arguments
1967 `(#:phases
1968 (modify-phases %standard-phases
1969 (replace 'check
1970 (lambda _
1971 ;; Drop test that requires internet access.
1972 (delete-file "tests/test_regressions.py")
1973 (setenv "PYTHONPATH"
1974 (string-append (getcwd) "/build/lib:"
1975 (getenv "PYTHONPATH")))
1976 (invoke "py.test" "-vv")
1977 #t)))))
1978 (native-inputs
1979 `(("python-pytest" ,python-pytest)
1980 ("python-redis" ,python-redis)
1981 ("python-webtest" ,python-webtest)
1982 ("python-mock" ,python-mock)))
1983 (propagated-inputs
1984 `(("python-requests" ,python-requests)
1985 ("python-lockfile" ,python-lockfile)))
1986 (home-page "https://github.com/ionrock/cachecontrol")
1987 (synopsis "The httplib2 caching algorithms for use with requests")
1988 (description "CacheControl is a port of the caching algorithms in
1989 @code{httplib2} for use with @code{requests} session objects.")
1990 (license license:asl2.0)))
1991
1992 (define-public python2-cachecontrol
1993 (package-with-python2 python-cachecontrol))
1994
1995 (define-public python-betamax
1996 (package
1997 (name "python-betamax")
1998 (version "0.8.1")
1999 (source
2000 (origin
2001 (method url-fetch)
2002 (uri (pypi-uri "betamax" version))
2003 (sha256
2004 (base32
2005 "1hki1c2vs7adq7zr56wi6i5bhrkia4s2ywpv2c98ibnczz709w2v"))))
2006 (build-system python-build-system)
2007 (arguments
2008 '(;; Many tests fail because they require networking.
2009 #:tests? #f))
2010 (propagated-inputs
2011 `(("python-requests" ,python-requests)))
2012 (home-page "https://github.com/sigmavirus24/betamax")
2013 (synopsis "Record HTTP interactions with python-requests")
2014 (description "Betamax will record your test suite's HTTP interactions and
2015 replay them during future tests. It is designed to work with python-requests.")
2016 (license license:expat)))
2017
2018 (define-public python2-betamax
2019 (package-with-python2 python-betamax))
2020
2021 (define-public python-betamax-matchers
2022 (package
2023 (name "python-betamax-matchers")
2024 (version "0.4.0")
2025 (source
2026 (origin
2027 (method url-fetch)
2028 (uri (pypi-uri "betamax-matchers" version))
2029 (sha256
2030 (base32
2031 "07qpwjyq2i2aqhz5iwghnj4pqr2ys5n45v1vmpcfx9r5mhwrsq43"))))
2032 (build-system python-build-system)
2033 (propagated-inputs
2034 `(("python-betamax" ,python-betamax)
2035 ("python-requests-toolbelt" ,python-requests-toolbelt)))
2036 (home-page "https://github.com/sigmavirus24/betamax_matchers")
2037 (synopsis "VCR imitation for python-requests")
2038 (description "@code{betamax-matchers} provides a set of Matchers for
2039 Betamax.")
2040 (license license:asl2.0)))
2041
2042 (define-public python2-betamax-matchers
2043 (package-with-python2 python-betamax-matchers))
2044
2045 (define-public python-s3transfer
2046 (package
2047 (name "python-s3transfer")
2048 (version "0.1.13")
2049 (source (origin
2050 (method url-fetch)
2051 (uri (pypi-uri "s3transfer" version))
2052 (sha256
2053 (base32
2054 "1harvyn1s8v54n1w5h7c0lg4bgjh68aylhg28s8n174q53h1ip4h"))))
2055 (build-system python-build-system)
2056 (arguments
2057 `(#:phases
2058 (modify-phases %standard-phases
2059 (replace 'check
2060 (lambda _
2061 ;; 7 of the 'integration' tests require network access or login
2062 ;; credentials.
2063 (invoke "nosetests" "--exclude=integration")
2064 #t)))))
2065 (native-inputs
2066 `(("python-docutils" ,python-docutils)
2067 ("python-mock" ,python-mock)
2068 ("python-nose" ,python-nose)))
2069 (propagated-inputs
2070 `(("python-botocore" ,python-botocore)))
2071 (synopsis "Amazon S3 Transfer Manager")
2072 (description "S3transfer is a Python library for managing Amazon S3
2073 transfers.")
2074 (home-page "https://github.com/boto/s3transfer")
2075 (license license:asl2.0)
2076 (properties `((python2-variant . ,(delay python2-s3transfer))))))
2077
2078 (define-public python2-s3transfer
2079 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
2080 (package
2081 (inherit base)
2082 (native-inputs
2083 `(("python2-futures" ,python2-futures)
2084 ,@(package-native-inputs base))))))
2085
2086 (define-public python-slimit
2087 (package
2088 (name "python-slimit")
2089 (version "0.8.1")
2090 (source
2091 (origin
2092 (method url-fetch)
2093 (uri (pypi-uri "slimit" version ".zip"))
2094 (sha256
2095 (base32
2096 "02vj2x728rs1127q2nc27frrqra4fczivnb7gch6n5lzi7pxqczl"))))
2097 (build-system python-build-system)
2098 (native-inputs
2099 `(("unzip" ,unzip)))
2100 (propagated-inputs
2101 `(("python-ply" ,python-ply)))
2102 (home-page "https://slimit.readthedocs.io/")
2103 (synopsis "JavaScript minifier, parser and lexer written in Python")
2104 (description
2105 "SlimIt is a JavaScript minifier written in Python. It compiles
2106 JavaScript into more compact code so that it downloads and runs faster.
2107 SlimIt also provides a library that includes a JavaScript parser, lexer,
2108 pretty printer and a tree visitor.")
2109 (license license:expat)))
2110
2111 (define-public python-flask-restful
2112 (package
2113 (name "python-flask-restful")
2114 (version "0.3.7")
2115 (source
2116 (origin
2117 (method url-fetch)
2118 (uri (pypi-uri "Flask-RESTful" version))
2119 (sha256
2120 (base32
2121 "1a9cbwkr6krryyzq4sd3f415nkkc6dyfls5i3pgyibs94g0hw97q"))))
2122 (build-system python-build-system)
2123 (propagated-inputs
2124 `(("python-aniso8601" ,python-aniso8601)
2125 ("python-flask" ,python-flask)
2126 ("python-pycrypto" ,python-pycrypto)
2127 ("python-pytz" ,python-pytz)))
2128 (native-inputs
2129 `(;; Optional dependency of Flask. Tests need it.
2130 ("python-blinker" ,python-blinker)
2131 ("python-mock" ,python-mock) ; For tests
2132 ("python-nose" ,python-nose) ; For tests
2133 ("python-sphinx" ,python-sphinx)))
2134 (home-page
2135 "https://www.github.com/flask-restful/flask-restful/")
2136 (synopsis
2137 "Flask module for creating REST APIs")
2138 (description
2139 "This package contains a Flask module for creating REST APIs.")
2140 (license license:bsd-3)))
2141
2142 (define-public python-flask-basicauth
2143 (package
2144 (name "python-flask-basicauth")
2145 (version "0.2.0")
2146 (source
2147 (origin
2148 (method url-fetch)
2149 (uri (pypi-uri "Flask-BasicAuth" version))
2150 (sha256
2151 (base32
2152 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
2153 (build-system python-build-system)
2154 (propagated-inputs
2155 `(("python-flask" ,python-flask)))
2156 (home-page
2157 "https://github.com/jpvanhal/flask-basicauth")
2158 (synopsis
2159 "HTTP basic access authentication for Flask")
2160 (description
2161 "This package provides HTTP basic access authentication for Flask.")
2162 (license license:bsd-3)))
2163
2164 (define-public python-flask-sqlalchemy
2165 (package
2166 (name "python-flask-sqlalchemy")
2167 (version "2.1")
2168 (source
2169 (origin
2170 (method url-fetch)
2171 (uri (pypi-uri "Flask-SQLAlchemy" version))
2172 (sha256
2173 (base32
2174 "1i9ps5d5snih9xlqhrvmi3qfiygkmqzxh92n25kj4pf89kj4s965"))))
2175 (build-system python-build-system)
2176 (propagated-inputs
2177 `(("python-flask" ,python-flask)
2178 ("python-sqlalchemy" ,python-sqlalchemy)))
2179 (home-page
2180 "https://github.com/mitsuhiko/flask-sqlalchemy")
2181 (synopsis
2182 "Module adding SQLAlchemy support to your Flask application")
2183 (description
2184 "This package adds SQLAlchemy support to your Flask application.")
2185 (license license:bsd-3)))
2186
2187 (define-public python-flask-restplus
2188 (package
2189 (name "python-flask-restplus")
2190 (version "0.9.2")
2191 (source
2192 (origin
2193 (method url-fetch)
2194 (uri (pypi-uri "flask-restplus" version))
2195 (sha256
2196 (base32
2197 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
2198 (build-system python-build-system)
2199 (arguments
2200 '(#:tests? #f)) ; FIXME: 35/882 tests failing.
2201 ;; #:phases
2202 ;; (modify-phases %standard-phases
2203 ;; (replace 'check
2204 ;; (lambda _
2205 ;; (invoke "nosetests")
2206 ;; #t)))))
2207 (propagated-inputs
2208 `(("python-aniso8601" ,python-aniso8601)
2209 ("python-flask" ,python-flask)
2210 ("python-jsonschema" ,python-jsonschema)
2211 ("python-pytz" ,python-pytz)
2212 ("python-six" ,python-six)))
2213 (native-inputs
2214 `(("python-tzlocal" ,python-tzlocal)
2215 ("python-blinker" ,python-blinker)
2216 ("python-nose" ,python-nose)
2217 ("python-rednose" ,python-rednose)))
2218 (home-page "https://github.com/noirbizarre/flask-restplus")
2219 (synopsis "Framework for documented API development with Flask")
2220 (description "This package provides a framework for API development with
2221 the Flask web framework in Python. It is similar to package
2222 @code{python-flask-restful} but supports the @code{python-swagger}
2223 documentation builder.")
2224 (license license:expat)))
2225
2226 (define-public python-flask-restful-swagger
2227 (package
2228 (name "python-flask-restful-swagger")
2229 (version "0.19")
2230 (source
2231 (origin
2232 (method url-fetch)
2233 (uri (pypi-uri "flask-restful-swagger" version))
2234 (sha256
2235 (base32
2236 "16msl8hd5xjmj833bpy264v98cpl5hkw5bgl5gf5vgndxbv3rm6v"))))
2237 (build-system python-build-system)
2238 (propagated-inputs
2239 `(("python-flask-restful" ,python-flask-restful)))
2240 (home-page "https://github.com/rantav/flask-restful-swagger")
2241 (synopsis "Extract Swagger specs from Flask-Restful projects")
2242 (description "This package lets you extract Swagger API documentation
2243 specs from your Flask-Restful projects.")
2244 (license license:expat)))
2245
2246 (define-public python2-flask-restful-swagger
2247 (package-with-python2 python-flask-restful-swagger))
2248
2249 (define-public python-htmlmin
2250 (package
2251 (name "python-htmlmin")
2252 (version "0.1.12")
2253 (source
2254 (origin
2255 (method url-fetch)
2256 (uri (pypi-uri "htmlmin" version))
2257 (sha256
2258 (base32
2259 "0y51xhabw6x8jk8k93xl8vznshpz3jb6l28075r5sjip613fzhah"))))
2260 (arguments
2261 `(#:tests? #f)) ; no tests
2262 (build-system python-build-system)
2263 (home-page "https://htmlmin.readthedocs.org/en/latest/")
2264 (synopsis "HTML minifier")
2265 (description "@code{htmlmin} is an HTML minifier that just works.
2266 It comes with safe defaults and easily configurable options.")
2267 (license license:bsd-3)))
2268
2269 (define-public python2-htmlmin
2270 (package-with-python2 python-htmlmin))
2271
2272 (define-public python-flask-htmlmin
2273 (package
2274 (name "python-flask-htmlmin")
2275 (version "1.2")
2276 (source
2277 (origin
2278 (method url-fetch)
2279 (uri (pypi-uri "Flask-HTMLmin" version))
2280 (sha256
2281 (base32
2282 "1n6zlq72kakkw0z2jpq6nh74lfsmxybm4g053pwhc14fbr809348"))))
2283 (propagated-inputs
2284 `(("python-flask" ,python-flask)
2285 ("python-htmlmin" ,python-htmlmin)))
2286 (build-system python-build-system)
2287 (home-page "https://github.com/hamidfzm/Flask-HTMLmin")
2288 (synopsis "HTML response minifier for Flask")
2289 (description
2290 "Minify @code{text/html} MIME type responses when using @code{Flask}.")
2291 (license license:bsd-3)))
2292
2293 (define-public python2-flask-htmlmin
2294 (package-with-python2 python-flask-htmlmin))
2295
2296 (define-public python-jsmin
2297 (package
2298 (name "python-jsmin")
2299 (version "2.2.2")
2300 (source
2301 (origin
2302 (method url-fetch)
2303 (uri (pypi-uri "jsmin" version))
2304 (sha256
2305 (base32
2306 "0fsmqbjvpxvff0984x7c0y8xmf49ax9mncz48b9xjx8wrnr9kpxn"))))
2307 (build-system python-build-system)
2308 (home-page "https://github.com/tikitu/jsmin/")
2309 (synopsis "Python JavaScript minifier")
2310 (description
2311 "@code{jsmin} is a JavaScript minifier, usable from both Python code and
2312 on the command line.")
2313 (license license:expat)))
2314
2315 (define-public python-flask-login
2316 (package
2317 (name "python-flask-login")
2318 (version "0.4.1")
2319 (source
2320 (origin
2321 (method git-fetch)
2322 (uri (git-reference
2323 (url "https://github.com/maxcountryman/flask-login.git")
2324 (commit version)))
2325 (file-name (git-file-name name version))
2326 (sha256
2327 (base32 "1rj0qwyxapxnp84fi4lhmvh3d91fdiwz7hibw77x3d5i72knqaa9"))))
2328 (arguments
2329 `(#:phases
2330 (modify-phases %standard-phases
2331 (add-before 'check 'avoid-yanc
2332 ;; Work around '.nosetests-real: error: no such option: --with-yanc'.
2333 (lambda _
2334 (setenv "NOCOLOR" "set")
2335 #t)))))
2336 (build-system python-build-system)
2337 (propagated-inputs
2338 `(("python-flask" ,python-flask)))
2339 (native-inputs
2340 ;; For tests.
2341 `(("python-blinker" ,python-blinker)
2342 ("python-mock" ,python-mock)
2343 ("python-nose" ,python-nose)
2344 ("python-pep8" ,python-pep8)
2345 ("python-pyflakes" ,python-pyflakes)
2346 ("python-semantic-version" ,python-semantic-version)
2347 ("python-werkzeug" ,python-werkzeug)))
2348 (home-page "https://github.com/maxcountryman/flask-login")
2349 (synopsis "User session management for Flask")
2350 (description
2351 "@code{Flask-Login} provides user session management for Flask. It
2352 handles the common tasks of logging in, logging out, and remembering your
2353 users' sessions over extended periods of time.")
2354 (license license:expat)))
2355
2356 (define-public python2-flask-login
2357 (package-with-python2 python-flask-login))
2358
2359 (define-public python-oauth2client
2360 (package
2361 (name "python-oauth2client")
2362 (version "4.0.0")
2363 (source
2364 (origin
2365 (method url-fetch)
2366 (uri (pypi-uri "oauth2client" version))
2367 (sha256
2368 (base32
2369 "1irqqap2zibysf8dba8sklfqikia579srd0phm5n754ni0h59gl0"))))
2370 (build-system python-build-system)
2371 (arguments
2372 `(#:tests? #f))
2373 (propagated-inputs
2374 `(("python-httplib2" ,python-httplib2)
2375 ("python-pyasn1" ,python-pyasn1)
2376 ("python-pyasn1-modules" ,python-pyasn1-modules)
2377 ("python-rsa" ,python-rsa)
2378 ("python-six" ,python-six)))
2379 (home-page "https://github.com/google/oauth2client/")
2380 (synopsis "OAuth 2.0 client library")
2381 (description "@code{python-oauth2client} provides an OAuth 2.0 client
2382 library for Python")
2383 (license license:asl2.0)))
2384
2385 (define-public python2-oauth2client
2386 (package-with-python2 python-oauth2client))
2387
2388 (define-public python-flask-oidc
2389 (package
2390 (name "python-flask-oidc")
2391 (version "1.1.1")
2392 (source
2393 (origin
2394 (method url-fetch)
2395 (uri (pypi-uri "flask-oidc" version))
2396 (sha256
2397 (base32
2398 "1ay5j0mf174bix7i67hclr95gv16z81fpx0dijvi0gydvdj3ddy2"))))
2399 (build-system python-build-system)
2400 (propagated-inputs
2401 `(("python-flask" ,python-flask)
2402 ("python-itsdangerous" ,python-itsdangerous)
2403 ("python-oauth2client" ,python-oauth2client)
2404 ("python-six" ,python-six)))
2405 (native-inputs
2406 `(("python-nose" ,python-nose)
2407 ("python-mock" ,python-mock)))
2408 (home-page "https://github.com/puiterwijk/flask-oidc")
2409 (synopsis "OpenID Connect extension for Flask")
2410 (description "@code{python-flask-oidc} provides an OpenID Connect extension
2411 for Flask.")
2412 (license license:bsd-2)))
2413
2414 (define-public python-webassets
2415 (package
2416 (name "python-webassets")
2417 (version "0.12.1")
2418 (source
2419 (origin
2420 (method url-fetch)
2421 (uri (pypi-uri "webassets" version))
2422 (sha256
2423 (base32
2424 "1nrqkpb7z46h2b77xafxihqv3322cwqv6293ngaky4j3ff4cing7"))))
2425 (build-system python-build-system)
2426 (native-inputs
2427 `(("python-jinja2" ,python-jinja2)
2428 ("python-mock" ,python-mock)
2429 ("python-nose" ,python-nose)
2430 ("python-pytest" ,python-pytest)))
2431 (home-page "https://github.com/miracle2k/webassets")
2432 (synopsis "Media asset management")
2433 (description "Merges, minifies and compresses Javascript and CSS files,
2434 supporting a variety of different filters, including YUI, jsmin, jspacker or
2435 CSS tidy. Also supports URL rewriting in CSS files.")
2436 (license license:bsd-2)))
2437
2438 (define-public python-cssmin
2439 (package
2440 (name "python-cssmin")
2441 (version "0.2.0")
2442 (source
2443 (origin
2444 (method url-fetch)
2445 (uri (pypi-uri "cssmin" version))
2446 (sha256
2447 (base32
2448 "1dk723nfm2yf8cp4pj785giqlwv42l0kj8rk40kczvq1hk6g04p0"))))
2449 (build-system python-build-system)
2450 (home-page "https://github.com/zacharyvoase/cssmin")
2451 (synopsis "Python port of the YUI CSS Compressor")
2452 (description "Python port of the YUI CSS Compressor.")
2453 (license (list license:expat license:bsd-3))))
2454
2455 (define-public python2-cssmin
2456 (package-with-python2 python-cssmin))
2457
2458 (define-public python-elasticsearch
2459 (package
2460 (name "python-elasticsearch")
2461 (version "6.1.1")
2462 (source
2463 (origin
2464 (method url-fetch)
2465 (uri (pypi-uri "elasticsearch" version))
2466 (sha256
2467 (base32
2468 "1kjxl45yvvgfb5fmamx0kfsfg9pzphiqrwbkns3s28r1w7ya74cd"))))
2469 (build-system python-build-system)
2470 (native-inputs
2471 `(("python-mock" ,python-mock)
2472 ("python-nosexcover" ,python-nosexcover)
2473 ("python-pyaml" ,python-pyaml)
2474 ("python-requests" ,python-requests)))
2475 (propagated-inputs
2476 `(("urllib3" ,python-urllib3)))
2477 (arguments
2478 ;; tests require the test_elasticsearch module but it is not distributed.
2479 `(#:tests? #f))
2480 (home-page "https://github.com/elastic/elasticsearch-py")
2481 (synopsis "Low-level client for Elasticsearch")
2482 (description "Official low-level client for Elasticsearch. Its goal is to
2483 provide common ground for all Elasticsearch-related code in Python; because of
2484 this it tries to be opinion-free and very extendable.")
2485 (license license:expat)))
2486
2487 (define-public python2-elasticsearch
2488 (package-with-python2 python-elasticsearch))
2489
2490 (define-public python-flask-script
2491 (package
2492 (name "python-flask-script")
2493 (version "2.0.6")
2494 (source
2495 (origin
2496 (method url-fetch)
2497 (uri (pypi-uri "Flask-Script" version))
2498 (sha256
2499 (base32
2500 "0r8w2v89nj6b9p91p495cga5m72a673l2wc0hp0zqk05j4yrc9b4"))))
2501 (build-system python-build-system)
2502 (propagated-inputs
2503 `(("python-flask" ,python-flask)
2504 ("python-argcomplete" ,python-argcomplete)
2505 ("python-werkzeug" ,python-werkzeug)))
2506 (native-inputs
2507 `(("python-pytest" ,python-pytest)))
2508 (home-page
2509 "https://github.com/smurfix/flask-script")
2510 (synopsis "Scripting support for Flask")
2511 (description "The Flask-Script extension provides support for writing
2512 external scripts in Flask. This includes running a development server,
2513 a customised Python shell, scripts to set up your database, cronjobs,
2514 and other command-line tasks that belong outside the web application
2515 itself.")
2516 (license license:bsd-3)))
2517
2518 (define-public python2-flask-script
2519 (package-with-python2 python-flask-script))
2520
2521 (define-public python-flask-migrate
2522 (package
2523 (name "python-flask-migrate")
2524 (version "2.0.3")
2525 (source
2526 (origin
2527 (method url-fetch)
2528 (uri (pypi-uri "Flask-Migrate" version))
2529 (sha256
2530 (base32
2531 "107x78lkqsnbg92dld3dkagg07jvchp3ib3y0sivc4ipz6n1y7rk"))))
2532 (build-system python-build-system)
2533 (propagated-inputs
2534 `(("python-flask" ,python-flask)
2535 ("python-alembic" ,python-alembic)
2536 ("python-sqlalchemy" ,python-sqlalchemy)
2537 ("python-flask-script" ,python-flask-script)
2538 ("python-flask-sqlalchemy" ,python-flask-sqlalchemy)))
2539 (home-page "https://github.com/miguelgrinberg/flask-migrate/")
2540 (synopsis "SQLAlchemy database migrations for Flask programs using
2541 Alembic")
2542 (description "This package contains SQLAlchemy database migration tools
2543 for Flask programs that are using @code{python-alembic}.")
2544 (license license:expat)))
2545
2546 (define-public python2-flask-migrate
2547 (package-with-python2 python-flask-migrate))
2548
2549 (define-public python-genshi
2550 (package
2551 (name "python-genshi")
2552 (version "0.7.1")
2553 (source
2554 (origin
2555 (method git-fetch)
2556 (uri (git-reference
2557 (url "https://github.com/edgewall/genshi.git")
2558 (commit version)))
2559 (file-name (git-file-name name version))
2560 (sha256
2561 (base32 "01fx8fnpay5w048ppyjivg2dgfpp5rybn07y3pfsgj2knram3nhl"))))
2562 (build-system python-build-system)
2563 (home-page "https://genshi.edgewall.org/")
2564 (synopsis "Toolkit for generation of output for the web")
2565 (description "Genshi is a Python library that provides an integrated set
2566 of components for parsing, generating, and processing HTML, XML or other
2567 textual content for output generation on the web.")
2568 (license license:bsd-3)))
2569
2570 (define-public python2-genshi
2571 (package-with-python2 python-genshi))
2572
2573 (define-public python-flask-principal
2574 (package
2575 (name "python-flask-principal")
2576 (version "0.4.0")
2577 (source
2578 (origin
2579 (method url-fetch)
2580 (uri (pypi-uri "Flask-Principal" version))
2581 (sha256
2582 (base32
2583 "0lwlr5smz8vfm5h9a9i7da3q1c24xqc6vm9jdywdpgxfbi5i7mpm"))))
2584 (build-system python-build-system)
2585 (propagated-inputs
2586 `(("python-blinker" ,python-blinker)))
2587 (native-inputs
2588 `(("python-flask" ,python-flask)
2589 ("python-nose" ,python-nose)))
2590 (home-page "http://packages.python.org/Flask-Principal/")
2591 (synopsis "Identity management for Flask")
2592 (description "@code{flask_principal} is a identity management library for
2593 Flask. It supports managing both authentication and authorization data in a
2594 thread-local variable.")
2595 (license license:expat)))
2596
2597 (define-public python2-flask-principal
2598 (package-with-python2 python-flask-principal))
2599
2600 (define-public python-flask-httpauth
2601 (package
2602 (name "python-flask-httpauth")
2603 (version "3.2.3")
2604 (source
2605 (origin
2606 (method url-fetch)
2607 (uri (pypi-uri "Flask-HTTPAuth" version))
2608 (sha256
2609 (base32
2610 "13gff5w1mqpzm5nccyg02v3ifb9ifqh5k866cssjhghhg6msfjsz"))))
2611 (build-system python-build-system)
2612 (native-inputs
2613 `(("python-flask" ,python-flask)))
2614 (home-page "https://github.com/miguelgrinberg/flask-httpauth/")
2615 (synopsis "Basic and Digest HTTP authentication for Flask routes")
2616 (description "@code{flask_httpauth} provides Basic and Digest HTTP
2617 authentication for Flask routes.")
2618 (license license:expat)))
2619
2620 (define-public python2-flask-httpauth
2621 (package-with-python2 python-flask-httpauth))
2622
2623 (define-public python-uritemplate
2624 (package
2625 (name "python-uritemplate")
2626 (version "3.0.0")
2627 (source
2628 (origin
2629 (method url-fetch)
2630 (uri (pypi-uri "uritemplate" version))
2631 (sha256
2632 (base32
2633 "0781gm9g34wa0asc19dx81ng0nqq07igzv3bbvdqmz13pv7469n0"))))
2634 (build-system python-build-system)
2635 (home-page "https://uritemplate.readthedocs.org")
2636 (synopsis "Library to deal with URI Templates")
2637 (description "@code{uritemplate} provides Python library to deal with URI
2638 Templates.")
2639 (license license:bsd-2)))
2640
2641 (define-public python2-uritemplate
2642 (package-with-python2 python-uritemplate))
2643
2644 (define-public python-publicsuffix
2645 (package
2646 (name "python-publicsuffix")
2647 (version "1.1.0")
2648 (source (origin
2649 (method url-fetch)
2650 (uri (pypi-uri "publicsuffix" version))
2651 (sha256
2652 (base32
2653 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
2654 (build-system python-build-system)
2655 (arguments
2656 `(#:tests? #f)) ; tests use the internet
2657 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
2658 (synopsis "Get suffix for a domain name")
2659 (description "Get a public suffix for a domain name using the Public Suffix
2660 List.")
2661 (license license:expat)))
2662
2663 (define-public python2-publicsuffix
2664 (package-with-python2 python-publicsuffix))
2665
2666 (define-public python-publicsuffix2
2667 (package
2668 (name "python-publicsuffix2")
2669 (version "2.20160818")
2670 (source
2671 (origin
2672 (method url-fetch)
2673 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
2674 (sha256
2675 (base32
2676 "1bb55yka9vkn7i6y1kjzxa516kh6v4gsrxa90w5wdz5p5n968r68"))))
2677 (build-system python-build-system)
2678 (arguments
2679 '(#:tests? #f)) ; The test suite requires network access.
2680 (home-page "https://github.com/pombredanne/python-publicsuffix2")
2681 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
2682 (description "Get a public suffix for a domain name using the Public Suffix
2683 List. Forked from and using the same API as the publicsuffix package.")
2684 (license (list license:expat license:mpl2.0))))
2685
2686 (define-public python2-publicsuffix2
2687 (package-with-python2 python-publicsuffix2))
2688
2689 (define-public python-werkzeug
2690 (package
2691 (name "python-werkzeug")
2692 (version "0.14.1")
2693 (source
2694 (origin
2695 (method url-fetch)
2696 (uri (pypi-uri "werkzeug" version))
2697 (sha256
2698 (base32
2699 "0z2m4snn1vc9518r2vzgdj1nc90kcgi60wijvd29yvcp85ypmzf3"))))
2700 (build-system python-build-system)
2701 (arguments
2702 '(#:phases
2703 (modify-phases %standard-phases
2704 (delete 'check)
2705 (add-after 'install 'check
2706 (lambda* (#:key inputs outputs #:allow-other-keys)
2707 (add-installed-pythonpath inputs outputs)
2708 (invoke "python" "-m" "pytest"))))))
2709 (propagated-inputs
2710 `(("python-requests" ,python-requests)))
2711 (native-inputs
2712 `(("python-pytest" ,python-pytest)))
2713 (home-page "https://www.palletsprojects.org/p/werkzeug/")
2714 (synopsis "Utilities for WSGI applications")
2715 (description "One of the most advanced WSGI utility modules. It includes a
2716 powerful debugger, full-featured request and response objects, HTTP utilities to
2717 handle entity tags, cache control headers, HTTP dates, cookie handling, file
2718 uploads, a powerful URL routing system and a bunch of community-contributed
2719 addon modules.")
2720 (license license:x11)))
2721
2722 (define-public python2-werkzeug
2723 (package-with-python2 python-werkzeug))
2724
2725 (define-public python-bottle
2726 (package
2727 (name "python-bottle")
2728 (version "0.12.13")
2729 (source
2730 (origin
2731 (method url-fetch)
2732 (uri (pypi-uri "bottle" version))
2733 (sha256
2734 (base32
2735 "0m9k2a7yxvggc4kw8fsvj381vgsvfcdshg5nzy6vwrxiw2p53drr"))))
2736 (build-system python-build-system)
2737 (home-page "http://bottlepy.org/")
2738 (synopsis "WSGI framework for small web-applications.")
2739 (description "@code{python-bottle} is a WSGI framework for small web-applications.")
2740 (license license:expat)))
2741
2742 (define-public python2-bottle
2743 (package-with-python2 python-bottle))
2744
2745 (define-public python-wtforms
2746 (package
2747 (name "python-wtforms")
2748 (version "2.1")
2749 (source
2750 (origin
2751 (method url-fetch)
2752 (uri (pypi-uri "WTForms" version ".zip"))
2753 (sha256
2754 (base32
2755 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
2756 (build-system python-build-system)
2757 (arguments
2758 '(#:phases
2759 (modify-phases %standard-phases
2760 (add-after 'unpack 'remove-django-test
2761 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
2762 (lambda _
2763 (substitute*
2764 "tests/runtests.py"
2765 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
2766 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
2767 #t)))))
2768 (native-inputs
2769 `(("unzip" ,unzip)))
2770 (home-page "http://wtforms.simplecodes.com/")
2771 (synopsis
2772 "Form validation and rendering library for Python web development")
2773 (description
2774 "WTForms is a flexible forms validation and rendering library
2775 for Python web development. It is very similar to the web form API
2776 available in Django, but is a standalone package.")
2777 (license license:bsd-3)))
2778
2779 (define-public python2-wtforms
2780 (package-with-python2 python-wtforms))
2781
2782 (define-public python-paste
2783 (package
2784 (name "python-paste")
2785 (version "3.0.6")
2786 (source
2787 (origin
2788 (method url-fetch)
2789 (uri (pypi-uri "Paste" version))
2790 (sha256
2791 (base32
2792 "14lbi9asn5agsdf7r97prkjpz7amgmp529lbvfhf0nv881xczah6"))
2793 (patches (search-patches "python-paste-remove-timing-test.patch"))
2794 (modules '((guix build utils)))
2795 (snippet
2796 '(begin
2797 ;; This test calls out to the internet.
2798 (delete-file "tests/test_proxy.py") #t))))
2799 (build-system python-build-system)
2800 (native-inputs
2801 `(("python-pytest" ,python-pytest)
2802 ("python-pytest-runner" ,python-pytest-runner)
2803 ("python-nose" ,python-nose)))
2804 (propagated-inputs
2805 `(("python-six" ,python-six)))
2806 (home-page "http://pythonpaste.org")
2807 (synopsis
2808 "Python web development tools, focusing on WSGI")
2809 (description
2810 "Paste provides a variety of web development tools and middleware which
2811 can be nested together to build web applications. Paste's design closely
2812 follows ideas flowing from WSGI (Web Standard Gateway Interface).")
2813 (license license:expat)))
2814
2815 (define-public python2-paste
2816 (package-with-python2 python-paste))
2817
2818 (define-public python-pastescript
2819 (package
2820 (name "python-pastescript")
2821 (version "2.0.2")
2822 (source
2823 (origin
2824 (method url-fetch)
2825 (uri (pypi-uri "PasteScript" version))
2826 (sha256
2827 (base32
2828 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
2829 (build-system python-build-system)
2830 (native-inputs
2831 `(("python-nose" ,python-nose)))
2832 (propagated-inputs
2833 `(("python-paste" ,python-paste)
2834 ("python-pastedeploy" ,python-pastedeploy)))
2835 (home-page "http://pythonpaste.org/script/")
2836 (arguments
2837 '(;; Unfortunately, this requires the latest unittest2,
2838 ;; but that requires traceback2 which requires linecache2 which requires
2839 ;; unittest2. So we're skipping tests for now.
2840 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
2841 ;; so in theory we could get around this situation somehow.)
2842 #:tests? #f))
2843 (synopsis
2844 "Pluggable command line tool for serving web applications and more")
2845 (description
2846 "PasteScript is a plugin-friendly command line tool which provides a
2847 variety of features, from launching web applications to bootstrapping project
2848 layouts.")
2849 (license license:expat)))
2850
2851 (define-public python2-pastescript
2852 (package-with-python2 python-pastescript))
2853
2854 (define-public python2-urlgrabber
2855 (package
2856 (name "python2-urlgrabber")
2857 (version "3.10.2")
2858 (source
2859 (origin
2860 (method url-fetch)
2861 (uri (pypi-uri "urlgrabber" version))
2862 (sha256
2863 (base32 "0w1h7hlsq406bxfy2pn4i9bd003bwl0q9b7p03z3g6yl0d21ddq5"))))
2864 (build-system python-build-system)
2865 (arguments `(#:python ,python-2)) ; urlgrabber supports python2 only
2866 (home-page "http://urlgrabber.baseurl.org")
2867 (synopsis "High-level cross protocol url-grabber")
2868 (description "@code{urlgrabber} is Python2 library that unifies access to
2869 files available on web, FTP or locally. It supports HTTP, FTP and file://
2870 protocols, it supports features like HTTP keep-alive, reget, throttling and
2871 more.")
2872 (license license:lgpl2.1+)))
2873
2874 (define-public python-pycares
2875 (package
2876 (name "python-pycares")
2877 (version "2.3.0")
2878 (source
2879 (origin
2880 (method url-fetch)
2881 (uri (pypi-uri "pycares" version))
2882 (sha256
2883 (base32
2884 "0h4fxw5drrhfyslzmfpljk0qnnpbhhb20hnnndzahhbwylyw1x1n"))))
2885 (build-system python-build-system)
2886 (arguments
2887 `(#:tests? #f)) ;tests require internet access
2888 (home-page "http://github.com/saghul/pycares")
2889 (synopsis "Python interface for @code{c-ares}")
2890 (description "@code{pycares} is a Python module which provides an
2891 interface to @code{c-ares}, a C library that performs DNS requests and
2892 name resolutions asynchronously.")
2893 (license license:expat)))
2894
2895 (define-public python-yarl
2896 (package
2897 (name "python-yarl")
2898 (version "1.1.1")
2899 (source
2900 (origin
2901 (method url-fetch)
2902 (uri (pypi-uri "yarl" version))
2903 (sha256
2904 (base32
2905 "1s6z13g8vgxfkkqwhn6imnm7pl7ky9arv4jygnn6bcndcbidg7d6"))))
2906 (build-system python-build-system)
2907 (native-inputs
2908 `(("python-pytest" ,python-pytest)
2909 ("python-pytest-runner" ,python-pytest-runner)))
2910 (propagated-inputs
2911 `(("python-idna" ,python-idna)
2912 ("python-multidict" ,python-multidict)))
2913 (home-page "https://github.com/aio-libs/yarl/")
2914 (synopsis "Yet another URL library")
2915 (description "@code{yarl} module provides handy @code{URL} class
2916 for URL parsing and changing.")
2917 (license license:asl2.0)))
2918
2919 (define-public python-google-api-client
2920 (package
2921 (name "python-google-api-client")
2922 (version "1.6.7")
2923 (source
2924 (origin
2925 (method url-fetch)
2926 (uri (pypi-uri "google-api-python-client" version))
2927 (sha256
2928 (base32
2929 "1wpbbbxfpy9mwxdy3kn352cb590ladv574j1aa2l4grjdqw3ln05"))))
2930 (build-system python-build-system)
2931 (arguments
2932 '(#:tests? #f)) ; tests require internet access
2933 (native-inputs
2934 `(("python-httplib2" ,python-httplib2)
2935 ("python-six" ,python-six)
2936 ("python-oauth2client" ,python-oauth2client)
2937 ("python-uritemplate" ,python-uritemplate)))
2938 (home-page "https://github.com/google/google-api-python-client")
2939 (synopsis "Core Python library for accessing Google APIs")
2940 (description "Python client library for Google's discovery based APIs")
2941 (license license:asl2.0)))
2942
2943 (define-public python2-google-api-client
2944 (package-with-python2 python-google-api-client))
2945
2946 (define-public python-hawkauthlib
2947 (package
2948 (name "python-hawkauthlib")
2949 (version "2.0.0")
2950 (source
2951 (origin
2952 (method url-fetch)
2953 (uri (pypi-uri "hawkauthlib" version))
2954 (sha256
2955 (base32
2956 "03ai47s4h8nfnrf25shbfvkm1b9n1ccd4nmmj280sg1fayi69zgg"))))
2957 (build-system python-build-system)
2958 (propagated-inputs
2959 `(("python-requests" ,python-requests)
2960 ("python-webob" ,python-webob)))
2961 (home-page "https://github.com/mozilla-services/hawkauthlib")
2962 (synopsis "Hawk Access Authentication protocol")
2963 (description
2964 "This is a low-level Python library for implementing Hawk Access Authentication,
2965 a simple HTTP request-signing scheme.")
2966 (license license:mpl2.0)))
2967
2968 (define-public python-pybrowserid
2969 (package
2970 (name "python-pybrowserid")
2971 (version "0.14.0")
2972 (source
2973 (origin
2974 (method url-fetch)
2975 (uri (pypi-uri "PyBrowserID" version))
2976 (sha256
2977 (base32
2978 "1qvi79kfb8x9kxkm5lw2mp42hm82cpps1xknmsb5ghkwx1lpc8kc"))))
2979 (build-system python-build-system)
2980 (propagated-inputs
2981 `(("python-requests" ,python-requests)))
2982 (native-inputs
2983 `(("python-mock" ,python-mock)))
2984 (home-page "https://github.com/mozilla/PyBrowserID")
2985 (synopsis "Python library for the BrowserID protocol")
2986 (description
2987 "This is a Python client library for the BrowserID protocol that
2988 underlies Mozilla Persona.")
2989 (license license:mpl2.0)))
2990
2991 (define-public python-pyfxa
2992 (package
2993 (name "python-pyfxa")
2994 (version "0.6.0")
2995 (source
2996 (origin
2997 (method url-fetch)
2998 (uri (pypi-uri "PyFxA" version))
2999 (sha256
3000 (base32
3001 "0axl16fyrz2r88gnw4b12mk7dpkqscv8c4wsc1y5hicl7bsbc4fm"))))
3002 (build-system python-build-system)
3003 (arguments '(#:tests? #f)) ; 17 tests require network access
3004 (propagated-inputs
3005 `(("python-cryptography" ,python-cryptography)
3006 ("python-hawkauthlib" ,python-hawkauthlib)
3007 ("python-pybrowserid" ,python-pybrowserid)
3008 ("python-requests" ,python-requests)
3009 ("python-six" ,python-six)))
3010 (native-inputs
3011 `(("python-grequests" ,python-grequests)
3012 ("python-mock" ,python-mock)
3013 ("python-responses" ,python-responses)
3014 ("python-unittest2" ,python-unittest2)))
3015 (home-page "https://github.com/mozilla/PyFxA")
3016 (synopsis "Firefox Accounts client library for Python")
3017 (description
3018 "This is a Python library for interacting with the Firefox Accounts
3019 ecosystem.")
3020 (license license:mpl2.0)))
3021
3022 (define-public python-hyperlink
3023 (package
3024 (name "python-hyperlink")
3025 (version "19.0.0")
3026 (source
3027 (origin
3028 (method url-fetch)
3029 (uri (pypi-uri "hyperlink" version))
3030 (sha256
3031 (base32
3032 "0m2nhi0j8wmgfscf974wd5v1xfq8mah286hil6npy1ys0m3y7222"))))
3033 (build-system python-build-system)
3034 (propagated-inputs
3035 `(("python-idna" ,python-idna)))
3036 (home-page "https://github.com/python-hyper/hyperlink")
3037 (synopsis "Python module to create immutable URLs according to spec")
3038 (description "This package provides a Python module to create immutable, and
3039 correct URLs for Python according to RFCs 3986 and 3987.")
3040 (license license:expat)))
3041
3042 (define-public python-treq
3043 (package
3044 (name "python-treq")
3045 (version "18.6.0")
3046 (source
3047 (origin
3048 (method url-fetch)
3049 (uri (pypi-uri "treq" version))
3050 (sha256
3051 (base32
3052 "0j4zwq9p1c9piv1vc66nxcv9s6hdinf90jwkbsm91k14npv9zq4i"))))
3053 (build-system python-build-system)
3054 (propagated-inputs
3055 `(("python-attrs" ,python-attrs)
3056 ("python-idna" ,python-idna)
3057 ("python-incremental" ,python-incremental)
3058 ("python-requests" ,python-requests)
3059 ("python-service-identity" ,python-service-identity)
3060 ("python-twisted" ,python-twisted)))
3061 (home-page "https://github.com/twisted/treq")
3062 (synopsis "Requests-like API built on top of twisted.web's Agent")
3063 (description "This package provides an HTTP library inspired by
3064 @code{requests}} but written on top of Twisted's @code{Agents}. It offers a
3065 high level API for making HTTP requests when using Twisted.")
3066 (license license:expat)))
3067
3068 (define-public python-autobahn
3069 (package
3070 (name "python-autobahn")
3071 (version "19.2.1")
3072 (source
3073 (origin
3074 (method url-fetch)
3075 (uri (pypi-uri "autobahn" version))
3076 (sha256
3077 (base32
3078 "1mm7j24ls01c7jb1ad5p5cpyxvzgydiyf8b04ihykh2v8g98j0x7"))))
3079 (build-system python-build-system)
3080 (arguments
3081 ;; The tests fail to run:
3082 ;; https://github.com/crossbario/autobahn-python/issues/1117
3083 `(#:tests? #f))
3084 (propagated-inputs
3085 `(("python-cffi" ,python-cffi)
3086 ("python-twisted" ,python-twisted)
3087 ("python-txaio" ,python-txaio)))
3088 (home-page "https://crossbar.io/autobahn/")
3089 (synopsis "Web Application Messaging Protocol implementation")
3090 (description "This package provides an implementation of the @dfn{Web Application
3091 Messaging Protocol} (WAMP). WAMP connects components in distributed
3092 applications using Publish and Subscribe (PubSub) and routed Remote Procedure
3093 Calls (rRPC). It is ideal for distributed, multi-client and server applications
3094 such as IoT applications or multi-user database-driven business applications.")
3095 (license license:expat)))
3096
3097 (define-public python-ws4py
3098 (package
3099 (name "python-ws4py")
3100 (version "0.5.1")
3101 (source
3102 (origin
3103 (method url-fetch)
3104 (uri (pypi-uri "ws4py" version))
3105 (sha256
3106 (base32
3107 "10slbbf2jm4hpr92jx7kh7mhf48sjl01v2w4d8z3f1p0ybbp7l19"))))
3108 (build-system python-build-system)
3109 (arguments
3110 `(#:phases
3111 (modify-phases %standard-phases
3112 (add-after 'unpack 'python3.7-compatibility
3113 (lambda _
3114 (substitute* '("ws4py/server/tulipserver.py"
3115 "ws4py/async_websocket.py")
3116 (("asyncio.async")
3117 "asyncio.ensure_future"))
3118 #t))
3119 ;; We don't have a package for cherrypy.
3120 (add-after 'unpack 'remove-cherrypy-support
3121 (lambda _
3122 (delete-file "ws4py/server/cherrypyserver.py")
3123 #t)))))
3124 (propagated-inputs
3125 `(("python-gevent" ,python-gevent)
3126 ("python-tornado" ,python-tornado)))
3127 (home-page "https://github.com/Lawouach/WebSocket-for-Python")
3128 (synopsis "WebSocket client and server library")
3129 (description
3130 "This package provides a WebSocket client and server library for
3131 Python.")
3132 (license license:bsd-3)))
3133
3134 ;; kaldi-gstreamer-server does not yet work with python-ws4py > 0.3.2
3135 (define-public python2-ws4py-for-kaldi-gstreamer-server
3136 (package (inherit python-ws4py)
3137 (name "python2-ws4py")
3138 (version "0.3.2")
3139 (source
3140 (origin
3141 (method url-fetch)
3142 (uri (pypi-uri "ws4py" version))
3143 (sha256
3144 (base32
3145 "12ys3dv98awhrxd570vla3hqgzq3avjhq4yafhghhq3a942y1928"))))
3146 (build-system python-build-system)
3147 (arguments
3148 `(#:python ,python-2
3149 #:phases
3150 (modify-phases %standard-phases
3151 ;; We don't have a package for cherrypy.
3152 (add-after 'unpack 'remove-cherrypy-support
3153 (lambda _
3154 (delete-file "ws4py/server/cherrypyserver.py")
3155 #t)))))
3156 (propagated-inputs
3157 `(("python-gevent" ,python2-gevent)
3158 ("python-tornado" ,python2-tornado)))))