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