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