gnu: fplll: Update to 5.2.1.
[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.2.0")
2049 (source (origin
2050 (method url-fetch)
2051 (uri (pypi-uri "s3transfer" version))
2052 (sha256
2053 (base32
2054 "08fhj73b1ai52hrs2q3nggshq3pswn1gq8ch3m009cb2v2vmqggj"))))
2055 (build-system python-build-system)
2056 (arguments
2057 `(#:phases
2058 (modify-phases %standard-phases
2059 (replace 'check
2060 (lambda _
2061 ;; Some of the 'integration' tests require network access or
2062 ;; login 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 ("python-urllib3" ,python-urllib3)))
2072 (synopsis "Amazon S3 Transfer Manager")
2073 (description "S3transfer is a Python library for managing Amazon S3
2074 transfers.")
2075 (home-page "https://github.com/boto/s3transfer")
2076 (license license:asl2.0)
2077 (properties `((python2-variant . ,(delay python2-s3transfer))))))
2078
2079 (define-public python2-s3transfer
2080 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
2081 (package
2082 (inherit base)
2083 (native-inputs
2084 `(("python2-futures" ,python2-futures)
2085 ,@(package-native-inputs base))))))
2086
2087 (define-public python-slimit
2088 (package
2089 (name "python-slimit")
2090 (version "0.8.1")
2091 (source
2092 (origin
2093 (method url-fetch)
2094 (uri (pypi-uri "slimit" version ".zip"))
2095 (sha256
2096 (base32
2097 "02vj2x728rs1127q2nc27frrqra4fczivnb7gch6n5lzi7pxqczl"))))
2098 (build-system python-build-system)
2099 (native-inputs
2100 `(("unzip" ,unzip)))
2101 (propagated-inputs
2102 `(("python-ply" ,python-ply)))
2103 (home-page "https://slimit.readthedocs.io/")
2104 (synopsis "JavaScript minifier, parser and lexer written in Python")
2105 (description
2106 "SlimIt is a JavaScript minifier written in Python. It compiles
2107 JavaScript into more compact code so that it downloads and runs faster.
2108 SlimIt also provides a library that includes a JavaScript parser, lexer,
2109 pretty printer and a tree visitor.")
2110 (license license:expat)))
2111
2112 (define-public python-flask-restful
2113 (package
2114 (name "python-flask-restful")
2115 (version "0.3.7")
2116 (source
2117 (origin
2118 (method url-fetch)
2119 (uri (pypi-uri "Flask-RESTful" version))
2120 (sha256
2121 (base32
2122 "1a9cbwkr6krryyzq4sd3f415nkkc6dyfls5i3pgyibs94g0hw97q"))))
2123 (build-system python-build-system)
2124 (propagated-inputs
2125 `(("python-aniso8601" ,python-aniso8601)
2126 ("python-flask" ,python-flask)
2127 ("python-pycrypto" ,python-pycrypto)
2128 ("python-pytz" ,python-pytz)))
2129 (native-inputs
2130 `(;; Optional dependency of Flask. Tests need it.
2131 ("python-blinker" ,python-blinker)
2132 ("python-mock" ,python-mock) ; For tests
2133 ("python-nose" ,python-nose) ; For tests
2134 ("python-sphinx" ,python-sphinx)))
2135 (home-page
2136 "https://www.github.com/flask-restful/flask-restful/")
2137 (synopsis
2138 "Flask module for creating REST APIs")
2139 (description
2140 "This package contains a Flask module for creating REST APIs.")
2141 (license license:bsd-3)))
2142
2143 (define-public python-flask-basicauth
2144 (package
2145 (name "python-flask-basicauth")
2146 (version "0.2.0")
2147 (source
2148 (origin
2149 (method url-fetch)
2150 (uri (pypi-uri "Flask-BasicAuth" version))
2151 (sha256
2152 (base32
2153 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
2154 (build-system python-build-system)
2155 (propagated-inputs
2156 `(("python-flask" ,python-flask)))
2157 (home-page
2158 "https://github.com/jpvanhal/flask-basicauth")
2159 (synopsis
2160 "HTTP basic access authentication for Flask")
2161 (description
2162 "This package provides HTTP basic access authentication for Flask.")
2163 (license license:bsd-3)))
2164
2165 (define-public python-flask-sqlalchemy
2166 (package
2167 (name "python-flask-sqlalchemy")
2168 (version "2.1")
2169 (source
2170 (origin
2171 (method url-fetch)
2172 (uri (pypi-uri "Flask-SQLAlchemy" version))
2173 (sha256
2174 (base32
2175 "1i9ps5d5snih9xlqhrvmi3qfiygkmqzxh92n25kj4pf89kj4s965"))))
2176 (build-system python-build-system)
2177 (propagated-inputs
2178 `(("python-flask" ,python-flask)
2179 ("python-sqlalchemy" ,python-sqlalchemy)))
2180 (home-page
2181 "https://github.com/mitsuhiko/flask-sqlalchemy")
2182 (synopsis
2183 "Module adding SQLAlchemy support to your Flask application")
2184 (description
2185 "This package adds SQLAlchemy support to your Flask application.")
2186 (license license:bsd-3)))
2187
2188 (define-public python-flask-restplus
2189 (package
2190 (name "python-flask-restplus")
2191 (version "0.9.2")
2192 (source
2193 (origin
2194 (method url-fetch)
2195 (uri (pypi-uri "flask-restplus" version))
2196 (sha256
2197 (base32
2198 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
2199 (build-system python-build-system)
2200 (arguments
2201 '(#:tests? #f)) ; FIXME: 35/882 tests failing.
2202 ;; #:phases
2203 ;; (modify-phases %standard-phases
2204 ;; (replace 'check
2205 ;; (lambda _
2206 ;; (invoke "nosetests")
2207 ;; #t)))))
2208 (propagated-inputs
2209 `(("python-aniso8601" ,python-aniso8601)
2210 ("python-flask" ,python-flask)
2211 ("python-jsonschema" ,python-jsonschema)
2212 ("python-pytz" ,python-pytz)
2213 ("python-six" ,python-six)))
2214 (native-inputs
2215 `(("python-tzlocal" ,python-tzlocal)
2216 ("python-blinker" ,python-blinker)
2217 ("python-nose" ,python-nose)
2218 ("python-rednose" ,python-rednose)))
2219 (home-page "https://github.com/noirbizarre/flask-restplus")
2220 (synopsis "Framework for documented API development with Flask")
2221 (description "This package provides a framework for API development with
2222 the Flask web framework in Python. It is similar to package
2223 @code{python-flask-restful} but supports the @code{python-swagger}
2224 documentation builder.")
2225 (license license:expat)))
2226
2227 (define-public python-flask-restful-swagger
2228 (package
2229 (name "python-flask-restful-swagger")
2230 (version "0.19")
2231 (source
2232 (origin
2233 (method url-fetch)
2234 (uri (pypi-uri "flask-restful-swagger" version))
2235 (sha256
2236 (base32
2237 "16msl8hd5xjmj833bpy264v98cpl5hkw5bgl5gf5vgndxbv3rm6v"))))
2238 (build-system python-build-system)
2239 (propagated-inputs
2240 `(("python-flask-restful" ,python-flask-restful)))
2241 (home-page "https://github.com/rantav/flask-restful-swagger")
2242 (synopsis "Extract Swagger specs from Flask-Restful projects")
2243 (description "This package lets you extract Swagger API documentation
2244 specs from your Flask-Restful projects.")
2245 (license license:expat)))
2246
2247 (define-public python2-flask-restful-swagger
2248 (package-with-python2 python-flask-restful-swagger))
2249
2250 (define-public python-htmlmin
2251 (package
2252 (name "python-htmlmin")
2253 (version "0.1.12")
2254 (source
2255 (origin
2256 (method url-fetch)
2257 (uri (pypi-uri "htmlmin" version))
2258 (sha256
2259 (base32
2260 "0y51xhabw6x8jk8k93xl8vznshpz3jb6l28075r5sjip613fzhah"))))
2261 (arguments
2262 `(#:tests? #f)) ; no tests
2263 (build-system python-build-system)
2264 (home-page "https://htmlmin.readthedocs.org/en/latest/")
2265 (synopsis "HTML minifier")
2266 (description "@code{htmlmin} is an HTML minifier that just works.
2267 It comes with safe defaults and easily configurable options.")
2268 (license license:bsd-3)))
2269
2270 (define-public python2-htmlmin
2271 (package-with-python2 python-htmlmin))
2272
2273 (define-public python-flask-htmlmin
2274 (package
2275 (name "python-flask-htmlmin")
2276 (version "1.2")
2277 (source
2278 (origin
2279 (method url-fetch)
2280 (uri (pypi-uri "Flask-HTMLmin" version))
2281 (sha256
2282 (base32
2283 "1n6zlq72kakkw0z2jpq6nh74lfsmxybm4g053pwhc14fbr809348"))))
2284 (propagated-inputs
2285 `(("python-flask" ,python-flask)
2286 ("python-htmlmin" ,python-htmlmin)))
2287 (build-system python-build-system)
2288 (home-page "https://github.com/hamidfzm/Flask-HTMLmin")
2289 (synopsis "HTML response minifier for Flask")
2290 (description
2291 "Minify @code{text/html} MIME type responses when using @code{Flask}.")
2292 (license license:bsd-3)))
2293
2294 (define-public python2-flask-htmlmin
2295 (package-with-python2 python-flask-htmlmin))
2296
2297 (define-public python-jsmin
2298 (package
2299 (name "python-jsmin")
2300 (version "2.2.2")
2301 (source
2302 (origin
2303 (method url-fetch)
2304 (uri (pypi-uri "jsmin" version))
2305 (sha256
2306 (base32
2307 "0fsmqbjvpxvff0984x7c0y8xmf49ax9mncz48b9xjx8wrnr9kpxn"))))
2308 (build-system python-build-system)
2309 (home-page "https://github.com/tikitu/jsmin/")
2310 (synopsis "Python JavaScript minifier")
2311 (description
2312 "@code{jsmin} is a JavaScript minifier, usable from both Python code and
2313 on the command line.")
2314 (license license:expat)))
2315
2316 (define-public python-flask-login
2317 (package
2318 (name "python-flask-login")
2319 (version "0.4.1")
2320 (source
2321 (origin
2322 (method git-fetch)
2323 (uri (git-reference
2324 (url "https://github.com/maxcountryman/flask-login.git")
2325 (commit version)))
2326 (file-name (git-file-name name version))
2327 (sha256
2328 (base32 "1rj0qwyxapxnp84fi4lhmvh3d91fdiwz7hibw77x3d5i72knqaa9"))))
2329 (arguments
2330 `(#:phases
2331 (modify-phases %standard-phases
2332 (add-before 'check 'avoid-yanc
2333 ;; Work around '.nosetests-real: error: no such option: --with-yanc'.
2334 (lambda _
2335 (setenv "NOCOLOR" "set")
2336 #t)))))
2337 (build-system python-build-system)
2338 (propagated-inputs
2339 `(("python-flask" ,python-flask)))
2340 (native-inputs
2341 ;; For tests.
2342 `(("python-blinker" ,python-blinker)
2343 ("python-mock" ,python-mock)
2344 ("python-nose" ,python-nose)
2345 ("python-pep8" ,python-pep8)
2346 ("python-pyflakes" ,python-pyflakes)
2347 ("python-semantic-version" ,python-semantic-version)
2348 ("python-werkzeug" ,python-werkzeug)))
2349 (home-page "https://github.com/maxcountryman/flask-login")
2350 (synopsis "User session management for Flask")
2351 (description
2352 "@code{Flask-Login} provides user session management for Flask. It
2353 handles the common tasks of logging in, logging out, and remembering your
2354 users' sessions over extended periods of time.")
2355 (license license:expat)))
2356
2357 (define-public python2-flask-login
2358 (package-with-python2 python-flask-login))
2359
2360 (define-public python-oauth2client
2361 (package
2362 (name "python-oauth2client")
2363 (version "4.0.0")
2364 (source
2365 (origin
2366 (method url-fetch)
2367 (uri (pypi-uri "oauth2client" version))
2368 (sha256
2369 (base32
2370 "1irqqap2zibysf8dba8sklfqikia579srd0phm5n754ni0h59gl0"))))
2371 (build-system python-build-system)
2372 (arguments
2373 `(#:tests? #f))
2374 (propagated-inputs
2375 `(("python-httplib2" ,python-httplib2)
2376 ("python-pyasn1" ,python-pyasn1)
2377 ("python-pyasn1-modules" ,python-pyasn1-modules)
2378 ("python-rsa" ,python-rsa)
2379 ("python-six" ,python-six)))
2380 (home-page "https://github.com/google/oauth2client/")
2381 (synopsis "OAuth 2.0 client library")
2382 (description "@code{python-oauth2client} provides an OAuth 2.0 client
2383 library for Python")
2384 (license license:asl2.0)))
2385
2386 (define-public python2-oauth2client
2387 (package-with-python2 python-oauth2client))
2388
2389 (define-public python-flask-oidc
2390 (package
2391 (name "python-flask-oidc")
2392 (version "1.1.1")
2393 (source
2394 (origin
2395 (method url-fetch)
2396 (uri (pypi-uri "flask-oidc" version))
2397 (sha256
2398 (base32
2399 "1ay5j0mf174bix7i67hclr95gv16z81fpx0dijvi0gydvdj3ddy2"))))
2400 (build-system python-build-system)
2401 (propagated-inputs
2402 `(("python-flask" ,python-flask)
2403 ("python-itsdangerous" ,python-itsdangerous)
2404 ("python-oauth2client" ,python-oauth2client)
2405 ("python-six" ,python-six)))
2406 (native-inputs
2407 `(("python-nose" ,python-nose)
2408 ("python-mock" ,python-mock)))
2409 (home-page "https://github.com/puiterwijk/flask-oidc")
2410 (synopsis "OpenID Connect extension for Flask")
2411 (description "@code{python-flask-oidc} provides an OpenID Connect extension
2412 for Flask.")
2413 (license license:bsd-2)))
2414
2415 (define-public python-webassets
2416 (package
2417 (name "python-webassets")
2418 (version "0.12.1")
2419 (source
2420 (origin
2421 (method url-fetch)
2422 (uri (pypi-uri "webassets" version))
2423 (sha256
2424 (base32
2425 "1nrqkpb7z46h2b77xafxihqv3322cwqv6293ngaky4j3ff4cing7"))))
2426 (build-system python-build-system)
2427 (native-inputs
2428 `(("python-jinja2" ,python-jinja2)
2429 ("python-mock" ,python-mock)
2430 ("python-nose" ,python-nose)
2431 ("python-pytest" ,python-pytest)))
2432 (home-page "https://github.com/miracle2k/webassets")
2433 (synopsis "Media asset management")
2434 (description "Merges, minifies and compresses Javascript and CSS files,
2435 supporting a variety of different filters, including YUI, jsmin, jspacker or
2436 CSS tidy. Also supports URL rewriting in CSS files.")
2437 (license license:bsd-2)))
2438
2439 (define-public python-cssmin
2440 (package
2441 (name "python-cssmin")
2442 (version "0.2.0")
2443 (source
2444 (origin
2445 (method url-fetch)
2446 (uri (pypi-uri "cssmin" version))
2447 (sha256
2448 (base32
2449 "1dk723nfm2yf8cp4pj785giqlwv42l0kj8rk40kczvq1hk6g04p0"))))
2450 (build-system python-build-system)
2451 (home-page "https://github.com/zacharyvoase/cssmin")
2452 (synopsis "Python port of the YUI CSS Compressor")
2453 (description "Python port of the YUI CSS Compressor.")
2454 (license (list license:expat license:bsd-3))))
2455
2456 (define-public python2-cssmin
2457 (package-with-python2 python-cssmin))
2458
2459 (define-public python-elasticsearch
2460 (package
2461 (name "python-elasticsearch")
2462 (version "6.1.1")
2463 (source
2464 (origin
2465 (method url-fetch)
2466 (uri (pypi-uri "elasticsearch" version))
2467 (sha256
2468 (base32
2469 "1kjxl45yvvgfb5fmamx0kfsfg9pzphiqrwbkns3s28r1w7ya74cd"))))
2470 (build-system python-build-system)
2471 (native-inputs
2472 `(("python-mock" ,python-mock)
2473 ("python-nosexcover" ,python-nosexcover)
2474 ("python-pyaml" ,python-pyaml)
2475 ("python-requests" ,python-requests)))
2476 (propagated-inputs
2477 `(("urllib3" ,python-urllib3)))
2478 (arguments
2479 ;; tests require the test_elasticsearch module but it is not distributed.
2480 `(#:tests? #f))
2481 (home-page "https://github.com/elastic/elasticsearch-py")
2482 (synopsis "Low-level client for Elasticsearch")
2483 (description "Official low-level client for Elasticsearch. Its goal is to
2484 provide common ground for all Elasticsearch-related code in Python; because of
2485 this it tries to be opinion-free and very extendable.")
2486 (license license:expat)))
2487
2488 (define-public python2-elasticsearch
2489 (package-with-python2 python-elasticsearch))
2490
2491 (define-public python-flask-script
2492 (package
2493 (name "python-flask-script")
2494 (version "2.0.6")
2495 (source
2496 (origin
2497 (method url-fetch)
2498 (uri (pypi-uri "Flask-Script" version))
2499 (sha256
2500 (base32
2501 "0r8w2v89nj6b9p91p495cga5m72a673l2wc0hp0zqk05j4yrc9b4"))))
2502 (build-system python-build-system)
2503 (arguments
2504 `(#:phases
2505 (modify-phases %standard-phases
2506 (add-after 'unpack 'patch-tests
2507 (lambda _
2508 (substitute* "tests.py"
2509 (("flask\\.ext\\.script") "flask_script"))
2510 #t)))))
2511 (propagated-inputs
2512 `(("python-flask" ,python-flask)
2513 ("python-argcomplete" ,python-argcomplete)
2514 ("python-werkzeug" ,python-werkzeug)))
2515 (native-inputs
2516 `(("python-pytest" ,python-pytest)))
2517 (home-page
2518 "https://github.com/smurfix/flask-script")
2519 (synopsis "Scripting support for Flask")
2520 (description "The Flask-Script extension provides support for writing
2521 external scripts in Flask. This includes running a development server,
2522 a customised Python shell, scripts to set up your database, cronjobs,
2523 and other command-line tasks that belong outside the web application
2524 itself.")
2525 (license license:bsd-3)))
2526
2527 (define-public python2-flask-script
2528 (package-with-python2 python-flask-script))
2529
2530 (define-public python-flask-migrate
2531 (package
2532 (name "python-flask-migrate")
2533 (version "2.0.3")
2534 (source
2535 (origin
2536 (method url-fetch)
2537 (uri (pypi-uri "Flask-Migrate" version))
2538 (sha256
2539 (base32
2540 "107x78lkqsnbg92dld3dkagg07jvchp3ib3y0sivc4ipz6n1y7rk"))))
2541 (build-system python-build-system)
2542 (propagated-inputs
2543 `(("python-flask" ,python-flask)
2544 ("python-alembic" ,python-alembic)
2545 ("python-sqlalchemy" ,python-sqlalchemy)
2546 ("python-flask-script" ,python-flask-script)
2547 ("python-flask-sqlalchemy" ,python-flask-sqlalchemy)))
2548 (home-page "https://github.com/miguelgrinberg/flask-migrate/")
2549 (synopsis "SQLAlchemy database migrations for Flask programs using
2550 Alembic")
2551 (description "This package contains SQLAlchemy database migration tools
2552 for Flask programs that are using @code{python-alembic}.")
2553 (license license:expat)))
2554
2555 (define-public python2-flask-migrate
2556 (package-with-python2 python-flask-migrate))
2557
2558 (define-public python-genshi
2559 (package
2560 (name "python-genshi")
2561 (version "0.7.1")
2562 (source
2563 (origin
2564 (method git-fetch)
2565 (uri (git-reference
2566 (url "https://github.com/edgewall/genshi.git")
2567 (commit version)))
2568 (file-name (git-file-name name version))
2569 (sha256
2570 (base32 "01fx8fnpay5w048ppyjivg2dgfpp5rybn07y3pfsgj2knram3nhl"))))
2571 (build-system python-build-system)
2572 (home-page "https://genshi.edgewall.org/")
2573 (synopsis "Toolkit for generation of output for the web")
2574 (description "Genshi is a Python library that provides an integrated set
2575 of components for parsing, generating, and processing HTML, XML or other
2576 textual content for output generation on the web.")
2577 (license license:bsd-3)))
2578
2579 (define-public python2-genshi
2580 (package-with-python2 python-genshi))
2581
2582 (define-public python-flask-principal
2583 (package
2584 (name "python-flask-principal")
2585 (version "0.4.0")
2586 (source
2587 (origin
2588 (method url-fetch)
2589 (uri (pypi-uri "Flask-Principal" version))
2590 (sha256
2591 (base32
2592 "0lwlr5smz8vfm5h9a9i7da3q1c24xqc6vm9jdywdpgxfbi5i7mpm"))))
2593 (build-system python-build-system)
2594 (propagated-inputs
2595 `(("python-blinker" ,python-blinker)))
2596 (native-inputs
2597 `(("python-flask" ,python-flask)
2598 ("python-nose" ,python-nose)))
2599 (home-page "http://packages.python.org/Flask-Principal/")
2600 (synopsis "Identity management for Flask")
2601 (description "@code{flask_principal} is a identity management library for
2602 Flask. It supports managing both authentication and authorization data in a
2603 thread-local variable.")
2604 (license license:expat)))
2605
2606 (define-public python2-flask-principal
2607 (package-with-python2 python-flask-principal))
2608
2609 (define-public python-flask-httpauth
2610 (package
2611 (name "python-flask-httpauth")
2612 (version "3.2.3")
2613 (source
2614 (origin
2615 (method url-fetch)
2616 (uri (pypi-uri "Flask-HTTPAuth" version))
2617 (sha256
2618 (base32
2619 "13gff5w1mqpzm5nccyg02v3ifb9ifqh5k866cssjhghhg6msfjsz"))))
2620 (build-system python-build-system)
2621 (native-inputs
2622 `(("python-flask" ,python-flask)))
2623 (home-page "https://github.com/miguelgrinberg/flask-httpauth/")
2624 (synopsis "Basic and Digest HTTP authentication for Flask routes")
2625 (description "@code{flask_httpauth} provides Basic and Digest HTTP
2626 authentication for Flask routes.")
2627 (license license:expat)))
2628
2629 (define-public python2-flask-httpauth
2630 (package-with-python2 python-flask-httpauth))
2631
2632 (define-public python-uritemplate
2633 (package
2634 (name "python-uritemplate")
2635 (version "3.0.0")
2636 (source
2637 (origin
2638 (method url-fetch)
2639 (uri (pypi-uri "uritemplate" version))
2640 (sha256
2641 (base32
2642 "0781gm9g34wa0asc19dx81ng0nqq07igzv3bbvdqmz13pv7469n0"))))
2643 (build-system python-build-system)
2644 (home-page "https://uritemplate.readthedocs.org")
2645 (synopsis "Library to deal with URI Templates")
2646 (description "@code{uritemplate} provides Python library to deal with URI
2647 Templates.")
2648 (license license:bsd-2)))
2649
2650 (define-public python2-uritemplate
2651 (package-with-python2 python-uritemplate))
2652
2653 (define-public python-publicsuffix
2654 (package
2655 (name "python-publicsuffix")
2656 (version "1.1.0")
2657 (source (origin
2658 (method url-fetch)
2659 (uri (pypi-uri "publicsuffix" version))
2660 (sha256
2661 (base32
2662 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
2663 (build-system python-build-system)
2664 (arguments
2665 `(#:tests? #f)) ; tests use the internet
2666 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
2667 (synopsis "Get suffix for a domain name")
2668 (description "Get a public suffix for a domain name using the Public Suffix
2669 List.")
2670 (license license:expat)))
2671
2672 (define-public python2-publicsuffix
2673 (package-with-python2 python-publicsuffix))
2674
2675 (define-public python-publicsuffix2
2676 (package
2677 (name "python-publicsuffix2")
2678 (version "2.20160818")
2679 (source
2680 (origin
2681 (method url-fetch)
2682 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
2683 (sha256
2684 (base32
2685 "1bb55yka9vkn7i6y1kjzxa516kh6v4gsrxa90w5wdz5p5n968r68"))))
2686 (build-system python-build-system)
2687 (arguments
2688 '(#:tests? #f)) ; The test suite requires network access.
2689 (home-page "https://github.com/pombredanne/python-publicsuffix2")
2690 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
2691 (description "Get a public suffix for a domain name using the Public Suffix
2692 List. Forked from and using the same API as the publicsuffix package.")
2693 (license (list license:expat license:mpl2.0))))
2694
2695 (define-public python2-publicsuffix2
2696 (package-with-python2 python-publicsuffix2))
2697
2698 (define-public python-werkzeug
2699 (package
2700 (name "python-werkzeug")
2701 (version "0.14.1")
2702 (source
2703 (origin
2704 (method url-fetch)
2705 (uri (pypi-uri "werkzeug" version))
2706 (sha256
2707 (base32
2708 "0z2m4snn1vc9518r2vzgdj1nc90kcgi60wijvd29yvcp85ypmzf3"))))
2709 (build-system python-build-system)
2710 (arguments
2711 '(#:phases
2712 (modify-phases %standard-phases
2713 (delete 'check)
2714 (add-after 'install 'check
2715 (lambda* (#:key inputs outputs #:allow-other-keys)
2716 (add-installed-pythonpath inputs outputs)
2717 (invoke "python" "-m" "pytest"))))))
2718 (propagated-inputs
2719 `(("python-requests" ,python-requests)))
2720 (native-inputs
2721 `(("python-pytest" ,python-pytest)))
2722 (home-page "https://www.palletsprojects.org/p/werkzeug/")
2723 (synopsis "Utilities for WSGI applications")
2724 (description "One of the most advanced WSGI utility modules. It includes a
2725 powerful debugger, full-featured request and response objects, HTTP utilities to
2726 handle entity tags, cache control headers, HTTP dates, cookie handling, file
2727 uploads, a powerful URL routing system and a bunch of community-contributed
2728 addon modules.")
2729 (license license:x11)))
2730
2731 (define-public python2-werkzeug
2732 (package-with-python2 python-werkzeug))
2733
2734 (define-public python-bottle
2735 (package
2736 (name "python-bottle")
2737 (version "0.12.13")
2738 (source
2739 (origin
2740 (method url-fetch)
2741 (uri (pypi-uri "bottle" version))
2742 (sha256
2743 (base32
2744 "0m9k2a7yxvggc4kw8fsvj381vgsvfcdshg5nzy6vwrxiw2p53drr"))))
2745 (build-system python-build-system)
2746 (home-page "http://bottlepy.org/")
2747 (synopsis "WSGI framework for small web-applications.")
2748 (description "@code{python-bottle} is a WSGI framework for small web-applications.")
2749 (license license:expat)))
2750
2751 (define-public python2-bottle
2752 (package-with-python2 python-bottle))
2753
2754 (define-public python-wtforms
2755 (package
2756 (name "python-wtforms")
2757 (version "2.1")
2758 (source
2759 (origin
2760 (method url-fetch)
2761 (uri (pypi-uri "WTForms" version ".zip"))
2762 (sha256
2763 (base32
2764 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
2765 (build-system python-build-system)
2766 (arguments
2767 '(#:phases
2768 (modify-phases %standard-phases
2769 (add-after 'unpack 'remove-django-test
2770 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
2771 (lambda _
2772 (substitute*
2773 "tests/runtests.py"
2774 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
2775 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
2776 #t)))))
2777 (native-inputs
2778 `(("unzip" ,unzip)))
2779 (home-page "http://wtforms.simplecodes.com/")
2780 (synopsis
2781 "Form validation and rendering library for Python web development")
2782 (description
2783 "WTForms is a flexible forms validation and rendering library
2784 for Python web development. It is very similar to the web form API
2785 available in Django, but is a standalone package.")
2786 (license license:bsd-3)))
2787
2788 (define-public python2-wtforms
2789 (package-with-python2 python-wtforms))
2790
2791 (define-public python-paste
2792 (package
2793 (name "python-paste")
2794 (version "3.0.6")
2795 (source
2796 (origin
2797 (method url-fetch)
2798 (uri (pypi-uri "Paste" version))
2799 (sha256
2800 (base32
2801 "14lbi9asn5agsdf7r97prkjpz7amgmp529lbvfhf0nv881xczah6"))
2802 (patches (search-patches "python-paste-remove-timing-test.patch"))
2803 (modules '((guix build utils)))
2804 (snippet
2805 '(begin
2806 ;; This test calls out to the internet.
2807 (delete-file "tests/test_proxy.py") #t))))
2808 (build-system python-build-system)
2809 (native-inputs
2810 `(("python-pytest" ,python-pytest)
2811 ("python-pytest-runner" ,python-pytest-runner)
2812 ("python-nose" ,python-nose)))
2813 (propagated-inputs
2814 `(("python-six" ,python-six)))
2815 (home-page "http://pythonpaste.org")
2816 (synopsis
2817 "Python web development tools, focusing on WSGI")
2818 (description
2819 "Paste provides a variety of web development tools and middleware which
2820 can be nested together to build web applications. Paste's design closely
2821 follows ideas flowing from WSGI (Web Standard Gateway Interface).")
2822 (license license:expat)))
2823
2824 (define-public python2-paste
2825 (package-with-python2 python-paste))
2826
2827 (define-public python-pastescript
2828 (package
2829 (name "python-pastescript")
2830 (version "2.0.2")
2831 (source
2832 (origin
2833 (method url-fetch)
2834 (uri (pypi-uri "PasteScript" version))
2835 (sha256
2836 (base32
2837 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
2838 (build-system python-build-system)
2839 (native-inputs
2840 `(("python-nose" ,python-nose)))
2841 (propagated-inputs
2842 `(("python-paste" ,python-paste)
2843 ("python-pastedeploy" ,python-pastedeploy)))
2844 (home-page "http://pythonpaste.org/script/")
2845 (arguments
2846 '(;; Unfortunately, this requires the latest unittest2,
2847 ;; but that requires traceback2 which requires linecache2 which requires
2848 ;; unittest2. So we're skipping tests for now.
2849 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
2850 ;; so in theory we could get around this situation somehow.)
2851 #:tests? #f))
2852 (synopsis
2853 "Pluggable command line tool for serving web applications and more")
2854 (description
2855 "PasteScript is a plugin-friendly command line tool which provides a
2856 variety of features, from launching web applications to bootstrapping project
2857 layouts.")
2858 (license license:expat)))
2859
2860 (define-public python2-pastescript
2861 (package-with-python2 python-pastescript))
2862
2863 (define-public python2-urlgrabber
2864 (package
2865 (name "python2-urlgrabber")
2866 (version "3.10.2")
2867 (source
2868 (origin
2869 (method url-fetch)
2870 (uri (pypi-uri "urlgrabber" version))
2871 (sha256
2872 (base32 "0w1h7hlsq406bxfy2pn4i9bd003bwl0q9b7p03z3g6yl0d21ddq5"))))
2873 (build-system python-build-system)
2874 (arguments `(#:python ,python-2)) ; urlgrabber supports python2 only
2875 (home-page "http://urlgrabber.baseurl.org")
2876 (synopsis "High-level cross protocol url-grabber")
2877 (description "@code{urlgrabber} is Python2 library that unifies access to
2878 files available on web, FTP or locally. It supports HTTP, FTP and file://
2879 protocols, it supports features like HTTP keep-alive, reget, throttling and
2880 more.")
2881 (license license:lgpl2.1+)))
2882
2883 (define-public python-pycares
2884 (package
2885 (name "python-pycares")
2886 (version "2.3.0")
2887 (source
2888 (origin
2889 (method url-fetch)
2890 (uri (pypi-uri "pycares" version))
2891 (sha256
2892 (base32
2893 "0h4fxw5drrhfyslzmfpljk0qnnpbhhb20hnnndzahhbwylyw1x1n"))))
2894 (build-system python-build-system)
2895 (arguments
2896 `(#:tests? #f)) ;tests require internet access
2897 (home-page "http://github.com/saghul/pycares")
2898 (synopsis "Python interface for @code{c-ares}")
2899 (description "@code{pycares} is a Python module which provides an
2900 interface to @code{c-ares}, a C library that performs DNS requests and
2901 name resolutions asynchronously.")
2902 (license license:expat)))
2903
2904 (define-public python-yarl
2905 (package
2906 (name "python-yarl")
2907 (version "1.1.1")
2908 (source
2909 (origin
2910 (method url-fetch)
2911 (uri (pypi-uri "yarl" version))
2912 (sha256
2913 (base32
2914 "1s6z13g8vgxfkkqwhn6imnm7pl7ky9arv4jygnn6bcndcbidg7d6"))))
2915 (build-system python-build-system)
2916 (native-inputs
2917 `(("python-pytest" ,python-pytest)
2918 ("python-pytest-runner" ,python-pytest-runner)))
2919 (propagated-inputs
2920 `(("python-idna" ,python-idna)
2921 ("python-multidict" ,python-multidict)))
2922 (home-page "https://github.com/aio-libs/yarl/")
2923 (synopsis "Yet another URL library")
2924 (description "@code{yarl} module provides handy @code{URL} class
2925 for URL parsing and changing.")
2926 (license license:asl2.0)))
2927
2928 (define-public python-google-api-client
2929 (package
2930 (name "python-google-api-client")
2931 (version "1.6.7")
2932 (source
2933 (origin
2934 (method url-fetch)
2935 (uri (pypi-uri "google-api-python-client" version))
2936 (sha256
2937 (base32
2938 "1wpbbbxfpy9mwxdy3kn352cb590ladv574j1aa2l4grjdqw3ln05"))))
2939 (build-system python-build-system)
2940 (arguments
2941 '(#:tests? #f)) ; tests require internet access
2942 (native-inputs
2943 `(("python-httplib2" ,python-httplib2)
2944 ("python-six" ,python-six)
2945 ("python-oauth2client" ,python-oauth2client)
2946 ("python-uritemplate" ,python-uritemplate)))
2947 (home-page "https://github.com/google/google-api-python-client")
2948 (synopsis "Core Python library for accessing Google APIs")
2949 (description "Python client library for Google's discovery based APIs")
2950 (license license:asl2.0)))
2951
2952 (define-public python2-google-api-client
2953 (package-with-python2 python-google-api-client))
2954
2955 (define-public python-hawkauthlib
2956 (package
2957 (name "python-hawkauthlib")
2958 (version "2.0.0")
2959 (source
2960 (origin
2961 (method url-fetch)
2962 (uri (pypi-uri "hawkauthlib" version))
2963 (sha256
2964 (base32
2965 "03ai47s4h8nfnrf25shbfvkm1b9n1ccd4nmmj280sg1fayi69zgg"))))
2966 (build-system python-build-system)
2967 (propagated-inputs
2968 `(("python-requests" ,python-requests)
2969 ("python-webob" ,python-webob)))
2970 (home-page "https://github.com/mozilla-services/hawkauthlib")
2971 (synopsis "Hawk Access Authentication protocol")
2972 (description
2973 "This is a low-level Python library for implementing Hawk Access Authentication,
2974 a simple HTTP request-signing scheme.")
2975 (license license:mpl2.0)))
2976
2977 (define-public python-pybrowserid
2978 (package
2979 (name "python-pybrowserid")
2980 (version "0.14.0")
2981 (source
2982 (origin
2983 (method url-fetch)
2984 (uri (pypi-uri "PyBrowserID" version))
2985 (sha256
2986 (base32
2987 "1qvi79kfb8x9kxkm5lw2mp42hm82cpps1xknmsb5ghkwx1lpc8kc"))))
2988 (build-system python-build-system)
2989 (propagated-inputs
2990 `(("python-requests" ,python-requests)))
2991 (native-inputs
2992 `(("python-mock" ,python-mock)))
2993 (home-page "https://github.com/mozilla/PyBrowserID")
2994 (synopsis "Python library for the BrowserID protocol")
2995 (description
2996 "This is a Python client library for the BrowserID protocol that
2997 underlies Mozilla Persona.")
2998 (license license:mpl2.0)))
2999
3000 (define-public python-pyfxa
3001 (package
3002 (name "python-pyfxa")
3003 (version "0.6.0")
3004 (source
3005 (origin
3006 (method url-fetch)
3007 (uri (pypi-uri "PyFxA" version))
3008 (sha256
3009 (base32
3010 "0axl16fyrz2r88gnw4b12mk7dpkqscv8c4wsc1y5hicl7bsbc4fm"))))
3011 (build-system python-build-system)
3012 (arguments '(#:tests? #f)) ; 17 tests require network access
3013 (propagated-inputs
3014 `(("python-cryptography" ,python-cryptography)
3015 ("python-hawkauthlib" ,python-hawkauthlib)
3016 ("python-pybrowserid" ,python-pybrowserid)
3017 ("python-requests" ,python-requests)
3018 ("python-six" ,python-six)))
3019 (native-inputs
3020 `(("python-grequests" ,python-grequests)
3021 ("python-mock" ,python-mock)
3022 ("python-responses" ,python-responses)
3023 ("python-unittest2" ,python-unittest2)))
3024 (home-page "https://github.com/mozilla/PyFxA")
3025 (synopsis "Firefox Accounts client library for Python")
3026 (description
3027 "This is a Python library for interacting with the Firefox Accounts
3028 ecosystem.")
3029 (license license:mpl2.0)))
3030
3031 (define-public python-hyperlink
3032 (package
3033 (name "python-hyperlink")
3034 (version "19.0.0")
3035 (source
3036 (origin
3037 (method url-fetch)
3038 (uri (pypi-uri "hyperlink" version))
3039 (sha256
3040 (base32
3041 "0m2nhi0j8wmgfscf974wd5v1xfq8mah286hil6npy1ys0m3y7222"))))
3042 (build-system python-build-system)
3043 (propagated-inputs
3044 `(("python-idna" ,python-idna)))
3045 (home-page "https://github.com/python-hyper/hyperlink")
3046 (synopsis "Python module to create immutable URLs according to spec")
3047 (description "This package provides a Python module to create immutable, and
3048 correct URLs for Python according to RFCs 3986 and 3987.")
3049 (license license:expat)))
3050
3051 (define-public python-treq
3052 (package
3053 (name "python-treq")
3054 (version "18.6.0")
3055 (source
3056 (origin
3057 (method url-fetch)
3058 (uri (pypi-uri "treq" version))
3059 (sha256
3060 (base32
3061 "0j4zwq9p1c9piv1vc66nxcv9s6hdinf90jwkbsm91k14npv9zq4i"))))
3062 (build-system python-build-system)
3063 (propagated-inputs
3064 `(("python-attrs" ,python-attrs)
3065 ("python-idna" ,python-idna)
3066 ("python-incremental" ,python-incremental)
3067 ("python-requests" ,python-requests)
3068 ("python-service-identity" ,python-service-identity)
3069 ("python-twisted" ,python-twisted)))
3070 (home-page "https://github.com/twisted/treq")
3071 (synopsis "Requests-like API built on top of twisted.web's Agent")
3072 (description "This package provides an HTTP library inspired by
3073 @code{requests}} but written on top of Twisted's @code{Agents}. It offers a
3074 high level API for making HTTP requests when using Twisted.")
3075 (license license:expat)))
3076
3077 (define-public python-autobahn
3078 (package
3079 (name "python-autobahn")
3080 (version "19.2.1")
3081 (source
3082 (origin
3083 (method url-fetch)
3084 (uri (pypi-uri "autobahn" version))
3085 (sha256
3086 (base32
3087 "1mm7j24ls01c7jb1ad5p5cpyxvzgydiyf8b04ihykh2v8g98j0x7"))))
3088 (build-system python-build-system)
3089 (arguments
3090 ;; The tests fail to run:
3091 ;; https://github.com/crossbario/autobahn-python/issues/1117
3092 `(#:tests? #f))
3093 (propagated-inputs
3094 `(("python-cffi" ,python-cffi)
3095 ("python-twisted" ,python-twisted)
3096 ("python-txaio" ,python-txaio)))
3097 (home-page "https://crossbar.io/autobahn/")
3098 (synopsis "Web Application Messaging Protocol implementation")
3099 (description "This package provides an implementation of the @dfn{Web Application
3100 Messaging Protocol} (WAMP). WAMP connects components in distributed
3101 applications using Publish and Subscribe (PubSub) and routed Remote Procedure
3102 Calls (rRPC). It is ideal for distributed, multi-client and server applications
3103 such as IoT applications or multi-user database-driven business applications.")
3104 (license license:expat)))
3105
3106 (define-public python-ws4py
3107 (package
3108 (name "python-ws4py")
3109 (version "0.5.1")
3110 (source
3111 (origin
3112 (method url-fetch)
3113 (uri (pypi-uri "ws4py" version))
3114 (sha256
3115 (base32
3116 "10slbbf2jm4hpr92jx7kh7mhf48sjl01v2w4d8z3f1p0ybbp7l19"))))
3117 (build-system python-build-system)
3118 (arguments
3119 `(#:phases
3120 (modify-phases %standard-phases
3121 (add-after 'unpack 'python3.7-compatibility
3122 (lambda _
3123 (substitute* '("ws4py/server/tulipserver.py"
3124 "ws4py/async_websocket.py")
3125 (("asyncio.async")
3126 "asyncio.ensure_future"))
3127 #t))
3128 ;; We don't have a package for cherrypy.
3129 (add-after 'unpack 'remove-cherrypy-support
3130 (lambda _
3131 (delete-file "ws4py/server/cherrypyserver.py")
3132 #t)))))
3133 (propagated-inputs
3134 `(("python-gevent" ,python-gevent)
3135 ("python-tornado" ,python-tornado)))
3136 (home-page "https://github.com/Lawouach/WebSocket-for-Python")
3137 (synopsis "WebSocket client and server library")
3138 (description
3139 "This package provides a WebSocket client and server library for
3140 Python.")
3141 (license license:bsd-3)))
3142
3143 ;; kaldi-gstreamer-server does not yet work with python-ws4py > 0.3.2
3144 (define-public python2-ws4py-for-kaldi-gstreamer-server
3145 (package (inherit python-ws4py)
3146 (name "python2-ws4py")
3147 (version "0.3.2")
3148 (source
3149 (origin
3150 (method url-fetch)
3151 (uri (pypi-uri "ws4py" version))
3152 (sha256
3153 (base32
3154 "12ys3dv98awhrxd570vla3hqgzq3avjhq4yafhghhq3a942y1928"))))
3155 (build-system python-build-system)
3156 (arguments
3157 `(#:python ,python-2
3158 #:phases
3159 (modify-phases %standard-phases
3160 ;; We don't have a package for cherrypy.
3161 (add-after 'unpack 'remove-cherrypy-support
3162 (lambda _
3163 (delete-file "ws4py/server/cherrypyserver.py")
3164 #t)))))
3165 (propagated-inputs
3166 `(("python-gevent" ,python2-gevent)
3167 ("python-tornado" ,python2-tornado)))))