gnu: python-zope-interface: Update to 5.1.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 "5.0.1")
1244 (source
1245 (origin
1246 (method url-fetch)
1247 (uri (pypi-uri "zope.schema" version))
1248 (sha256
1249 (base32
1250 "0q93j0x52a42khw12al90jw2bk0wly3jwghql3a25zpwwxvn24ya"))))
1251 (build-system python-build-system)
1252 (arguments
1253 '(#:tests? #f)) ; FIXME: Tests can't find zope.event.
1254 (propagated-inputs
1255 `(("python-zope-event" ,python-zope-event)
1256 ("python-zope-interface" ,python-zope-interface)))
1257 (native-inputs
1258 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
1259 ("python-zope-testing" ,python-zope-testing)
1260 ("python-zope-testrunner" ,python-zope-testrunner)))
1261 (home-page "https://pypi.org/project/zope.schema/")
1262 (synopsis "Zope data schemas")
1263 (description "Zope.scheme provides extensions to zope.interface for
1264 defining data schemas.")
1265 (license license:zpl2.1)))
1266
1267 (define-public python2-zope-schema
1268 (package-with-python2 python-zope-schema))
1269
1270 (define-public python-zope-configuration
1271 (package
1272 (name "python-zope-configuration")
1273 (version "4.3.1")
1274 (source (origin
1275 (method url-fetch)
1276 (uri (pypi-uri "zope.configuration" version))
1277 (sha256
1278 (base32
1279 "1qb88764fd7nkkmqv7fl9bxd1jirynkg5vbqkpqdiffnkxzp85kf"))))
1280 (build-system python-build-system)
1281 (arguments
1282 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
1283 (native-inputs
1284 `(("python-zope-testing" ,python-zope-testing)
1285 ("python-zope-testrunner" ,python-zope-testrunner)))
1286 (propagated-inputs
1287 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
1288 ("python-zope-interface" ,python-zope-interface)
1289 ("python-zope-schema" ,python-zope-schema)))
1290 (home-page "https://pypi.org/project/zope.configuration/")
1291 (synopsis "Zope Configuration Markup Language")
1292 (description "Zope.configuration implements ZCML, the Zope Configuration
1293 Markup Language.")
1294 (license license:zpl2.1)))
1295
1296 (define-public python2-zope-configuration
1297 (package-with-python2 python-zope-configuration))
1298
1299 (define-public python-zope-proxy
1300 (package
1301 (name "python-zope-proxy")
1302 (version "4.3.5")
1303 (source
1304 (origin
1305 (method url-fetch)
1306 (uri (pypi-uri "zope.proxy" version))
1307 (sha256
1308 (base32
1309 "14h7nyfbl5vpfk0rbviy4ygdfx0yx5kncvg6jpbdb0dhwna0ssm6"))))
1310 (build-system python-build-system)
1311 (native-inputs
1312 `(("python-zope-security" ,python-zope-security-bootstrap)
1313 ("python-zope-testrunner" ,python-zope-testrunner)))
1314 (propagated-inputs
1315 `(("python-zope-interface" ,python-zope-interface)))
1316 (home-page "https://pypi.org/project/zope.proxy/")
1317 (synopsis "Generic, transparent proxies")
1318 (description "Zope.proxy provides generic, transparent proxies for Python.
1319 Proxies are special objects which serve as mostly-transparent wrappers around
1320 another object, intervening in the apparent behavior of the wrapped object
1321 only when necessary to apply the policy (e.g., access checking, location
1322 brokering, etc.) for which the proxy is responsible.")
1323 (license license:zpl2.1)))
1324
1325 (define-public python-zope-proxy-bootstrap
1326 (package
1327 (inherit python-zope-proxy)
1328 (arguments `(#:tests? #f))
1329 (native-inputs `())
1330 (properties `((hidden? . #t)))))
1331
1332 (define-public python2-zope-proxy
1333 (package-with-python2 python-zope-proxy))
1334
1335 (define-public python-zope-location
1336 (package
1337 (name "python-zope-location")
1338 (version "4.2")
1339 (source
1340 (origin
1341 (method url-fetch)
1342 (uri (pypi-uri "zope.location" version))
1343 (sha256
1344 (base32
1345 "1b40pzl8v00d583d3gsxv1qjdw2dhghlgkbgxl3m07d5r3izj857"))))
1346 (build-system python-build-system)
1347 (arguments
1348 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
1349 (native-inputs
1350 `(("python-zope-testrunner" ,python-zope-testrunner)))
1351 (propagated-inputs
1352 `(("python-zope-interface" ,python-zope-interface)
1353 ("python-zope-proxy" ,python-zope-proxy)
1354 ("python-zope-schema" ,python-zope-schema)))
1355 (home-page "https://pypi.org/project/zope.location/")
1356 (synopsis "Zope location library")
1357 (description "Zope.location implements the concept of \"locations\" in
1358 Zope3, which are are special objects that have a structural location.")
1359 (license license:zpl2.1)))
1360
1361 (define-public python2-zope-location
1362 (package-with-python2 python-zope-location))
1363
1364 (define-public python-zope-security
1365 (package
1366 (name "python-zope-security")
1367 (version "5.1.0")
1368 (source
1369 (origin
1370 (method url-fetch)
1371 (uri (pypi-uri "zope.security" version))
1372 (sha256
1373 (base32
1374 "1npfrgnm202v48wavpwn3450dsn7az12lfww95vbhxyjl11f14yb"))))
1375 (build-system python-build-system)
1376 (arguments
1377 '(#:tests? #f)) ; FIXME: Tests can't find zope.testrunner.
1378 (propagated-inputs
1379 `(("python-zope-component" ,python-zope-component)
1380 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
1381 ("python-zope-interface" ,python-zope-interface)
1382 ("python-zope-location" ,python-zope-location)
1383 ("python-zope-proxy" ,python-zope-proxy)
1384 ("python-zope-schema" ,python-zope-schema)))
1385 (native-inputs
1386 `(("python-zope-configuration" ,python-zope-configuration)
1387 ("python-zope-testrunner" ,python-zope-testrunner)
1388 ("python-zope-testing" ,python-zope-testing)))
1389 (home-page "https://pypi.org/project/zope.security/")
1390 (synopsis "Zope security framework")
1391 (description "Zope.security provides a generic mechanism to implement
1392 security policies on Python objects.")
1393 (license license:zpl2.1)))
1394
1395 (define-public python-zope-security-bootstrap
1396 (package
1397 (inherit python-zope-security)
1398 (arguments `(#:tests? #f))
1399 (propagated-inputs
1400 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
1401 ("python-zope-interface" ,python-zope-interface)
1402 ("python-zope-proxy" ,python-zope-proxy-bootstrap)
1403 ("python-zope-schema" ,python-zope-schema)))
1404 (native-inputs `())
1405 (properties `((hidden? . #t)))))
1406
1407 (define-public python2-zope-security
1408 (package-with-python2 python-zope-security))
1409
1410 (define-public python-zope-component
1411 (package
1412 (name "python-zope-component")
1413 (version "4.3.0")
1414 (source
1415 (origin
1416 (method url-fetch)
1417 (uri (pypi-uri "zope.component" version))
1418 (sha256
1419 (base32
1420 "1hlvzwj1kcfz1qms1dzhwsshpsf38z9clmyksb1gh41n8k3kchdv"))))
1421 (build-system python-build-system)
1422 (arguments
1423 ;; Skip tests due to circular dependency with python-zope-security.
1424 '(#:tests? #f))
1425 (native-inputs
1426 `(("python-zope-testing" ,python-zope-testing)))
1427 (propagated-inputs
1428 `(("python-zope-event" ,python-zope-event)
1429 ("python-zope-interface" ,python-zope-interface)
1430 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
1431 ("python-zope-configuration" ,python-zope-configuration)))
1432 (home-page "https://github.com/zopefoundation/zope.component")
1433 (synopsis "Zope Component Architecture")
1434 (description "Zope.component represents the core of the Zope Component
1435 Architecture. Together with the zope.interface package, it provides
1436 facilities for defining, registering and looking up components.")
1437 (license license:zpl2.1)))
1438
1439 (define-public python2-zope-component
1440 (package-with-python2 python-zope-component))
1441
1442 (define-public python-ndg-httpsclient
1443 (package
1444 (name "python-ndg-httpsclient")
1445 (version "0.5.1")
1446 (source (origin
1447 (method url-fetch)
1448 (uri (pypi-uri "ndg_httpsclient" version))
1449 (sha256
1450 (base32
1451 "0412b7i1s4vj7lz9r72nmb28h9syd4q2x89bdirkkc3a6z8awbyp"))))
1452 (build-system python-build-system)
1453 (arguments
1454 '(;; The tests appear to require networking.
1455 #:tests? #f))
1456 (propagated-inputs
1457 `(("python-pyopenssl" ,python-pyopenssl)))
1458 (synopsis "HTTPS support for Python's httplib and urllib2")
1459 (description "This is a HTTPS client implementation for httplib and urllib2
1460 based on PyOpenSSL. PyOpenSSL provides a more fully-featured SSL implementation
1461 over the default provided with Python and, importantly, enables full
1462 verification of the SSL peer.")
1463 (home-page "https://github.com/cedadev/ndg_httpsclient/")
1464 (license license:bsd-3)))
1465
1466 ;; python2-openssl requires special care, so package-with-python2 is
1467 ;; insufficient.
1468 (define-public python2-ndg-httpsclient
1469 (package (inherit python-ndg-httpsclient)
1470 (name "python2-ndg-httpsclient")
1471 (arguments
1472 (substitute-keyword-arguments (package-arguments python-ndg-httpsclient)
1473 ((#:python _) python-2)))
1474 (propagated-inputs
1475 `(("python2-pyopenssl" ,python2-pyopenssl)))))
1476
1477 (define-public python-websocket-client
1478 (package
1479 (name "python-websocket-client")
1480 (version "0.54.0")
1481 (source
1482 (origin
1483 (method url-fetch)
1484 (uri (pypi-uri "websocket_client" version))
1485 (sha256
1486 (base32
1487 "0j88zmikaypf38lvpkf4aaxrjp9j07dmy5ghj7kli0fv3p4n45g5"))))
1488 (build-system python-build-system)
1489 (propagated-inputs
1490 `(("python-six" ,python-six)))
1491 (home-page "https://github.com/liris/websocket-client")
1492 (synopsis "WebSocket client for Python")
1493 (description "The Websocket-client module provides the low level APIs for
1494 WebSocket usage in Python programs.")
1495 (properties `((python2-variant . ,(delay python2-websocket-client))))
1496 (license license:lgpl2.1+)))
1497
1498 (define-public python2-websocket-client
1499 (let ((base (package-with-python2
1500 (strip-python2-variant python-websocket-client))))
1501 (package
1502 (inherit base)
1503 (native-inputs
1504 `(("python2-backport-ssl-match-hostname"
1505 ,python2-backport-ssl-match-hostname)
1506 ,@(package-native-inputs base))))))
1507
1508 (define-public python-requests
1509 (package
1510 (name "python-requests")
1511 (version "2.23.0")
1512 (source (origin
1513 (method url-fetch)
1514 (uri (pypi-uri "requests" version))
1515 (sha256
1516 (base32
1517 "1rhpg0jb08v0gd7f19jjiwlcdnxpmqi1fhvw7r4s9avddi4kvx5k"))))
1518 (build-system python-build-system)
1519 (propagated-inputs
1520 `(("python-certifi" ,python-certifi)
1521 ("python-chardet" ,python-chardet)
1522 ("python-idna" ,python-idna)
1523 ("python-urllib3" ,python-urllib3)))
1524 (arguments
1525 ;; FIXME: Some tests require network access.
1526 '(#:tests? #f))
1527 (home-page "http://python-requests.org/")
1528 (synopsis "Python HTTP library")
1529 (description
1530 "Requests is a Python HTTP client library. It aims to be easier to use
1531 than Python’s urllib2 library.")
1532 (license license:asl2.0)))
1533
1534 ;; Some software requires an older version of Requests, notably Docker/Docker
1535 ;; Compose.
1536 (define-public python-requests-2.20
1537 (package (inherit python-requests)
1538 (version "2.20.1")
1539 (source (origin
1540 (method url-fetch)
1541 (uri (pypi-uri "requests" version))
1542 (sha256
1543 (base32
1544 "0qzj6cgv3k9wyj7wlxgz7xq0cfg4jbbkfm24pp8dnhczwl31527a"))))
1545 (propagated-inputs
1546 `(("python-urllib3" ,python-urllib3-1.24)
1547 ("python-idna" ,python-idna-2.7)
1548 ,@(package-propagated-inputs python-requests)))))
1549
1550 ;; Some software requires an older version of Requests, notably Docker
1551 ;; Compose.
1552 (define-public python-requests-2.7
1553 (package (inherit python-requests)
1554 (version "2.7.0")
1555 (source (origin
1556 (method url-fetch)
1557 (uri (pypi-uri "requests" version))
1558 (sha256
1559 (base32
1560 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
1561
1562 (define-public python2-requests
1563 (package-with-python2 python-requests))
1564
1565 (define-public python-requests_ntlm
1566 (package
1567 (name "python-requests_ntlm")
1568 (version "1.1.0")
1569 (source
1570 (origin
1571 (method url-fetch)
1572 (uri (pypi-uri "requests_ntlm" version))
1573 (sha256
1574 (base32
1575 "0wgbqzaq9w7bas16b7brdb75f91bh3275fb459093bk1ihpck2ci"))))
1576 (build-system python-build-system)
1577 (propagated-inputs
1578 `(("python-cryptography" ,python-cryptography)
1579 ("python-ntlm-auth" ,python-ntlm-auth)
1580 ("python-requests" ,python-requests)))
1581 (home-page "https://github.com/requests/requests-ntlm")
1582 (synopsis
1583 "NTLM authentication support for Requests")
1584 (description
1585 "This package allows for HTTP NTLM authentication using the requests
1586 library.")
1587 (license license:isc)))
1588
1589 (define-public python-requests-mock
1590 (package
1591 (name "python-requests-mock")
1592 (version "1.3.0")
1593 (source
1594 (origin
1595 (method url-fetch)
1596 (uri (pypi-uri "requests-mock" version))
1597 (sha256
1598 (base32
1599 "0jr997dvk6zbmhvbpcv3rajrgag69mcsm1ai3w3rgk2jdh6rg1mx"))))
1600 (build-system python-build-system)
1601 (propagated-inputs
1602 `(("python-requests" ,python-requests)
1603 ("python-six" ,python-six)))
1604 (native-inputs
1605 `(("python-pbr" ,python-pbr)
1606 ("python-discover" ,python-discover)
1607 ("python-docutils" ,python-docutils)
1608 ("python-fixtures" ,python-fixtures)
1609 ("python-mock" ,python-mock)
1610 ("python-sphinx" ,python-sphinx)
1611 ("python-testrepository" ,python-testrepository)
1612 ("python-testtools" ,python-testtools)))
1613 (home-page "https://requests-mock.readthedocs.org/")
1614 (synopsis "Mock out responses from the requests package")
1615 (description
1616 "This module provides a building block to stub out the HTTP requests
1617 portions of your testing code.")
1618 (properties `((python2-variant . ,(delay python2-requests-mock))))
1619 (license license:asl2.0)))
1620
1621 (define-public python2-requests-mock
1622 (package (inherit (package-with-python2
1623 (strip-python2-variant python-requests-mock)))
1624 (arguments
1625 `(#:python ,python-2
1626 ;; FIXME: 'subunit.run discover: error: no such option: --list'
1627 #:tests? #f))))
1628
1629 (define-public python-requests-toolbelt
1630 (package
1631 (name "python-requests-toolbelt")
1632 (version "0.8.0")
1633 (source (origin
1634 (method url-fetch)
1635 (uri (pypi-uri "requests-toolbelt" version))
1636 (sha256
1637 (base32
1638 "1dc7l42i4080r8i4m9fj51jx367lqkai170vrv7wd93gdj9k39gn"))))
1639 (build-system python-build-system)
1640 (native-inputs
1641 `(("python-betamax" ,python-betamax)
1642 ("python-mock" ,python-mock)
1643 ("python-pytest" ,python-pytest)))
1644 (propagated-inputs
1645 `(("python-requests" ,python-requests)))
1646 (synopsis "Extensions to python-requests")
1647 (description "This is a toolbelt of useful classes and functions to be used
1648 with python-requests.")
1649 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
1650 (license license:asl2.0)))
1651
1652 (define-public python2-requests-toolbelt
1653 (package-with-python2 python-requests-toolbelt))
1654
1655 (define-public python-oauthlib
1656 (package
1657 (name "python-oauthlib")
1658 (version "3.0.1")
1659 (source (origin
1660 (method url-fetch)
1661 (uri (pypi-uri "oauthlib" version))
1662 (sha256
1663 (base32
1664 "163jg4a8f7c5ki655grrr47kgljy12wri3qly7ijf64sk1fjrqqc"))))
1665 (build-system python-build-system)
1666 (arguments
1667 `(#:phases (modify-phases %standard-phases
1668 (replace 'check
1669 (lambda _
1670 (invoke "pytest" "-vv"))))))
1671 (native-inputs
1672 `(("python-pytest" ,python-pytest)
1673 ("python-pytest-cov" ,python-pytest-cov)
1674 ("python-mock" ,python-mock)))
1675 (propagated-inputs
1676 `(("python-cryptography" ,python-cryptography)
1677 ("python-pyjwt" ,python-pyjwt)
1678 ("python-blinker" ,python-blinker)))
1679 (home-page "https://github.com/oauthlib/oauthlib")
1680 (synopsis "OAuth implementation for Python")
1681 (description
1682 "Oauthlib is a generic, spec-compliant, thorough implementation of the
1683 OAuth request-signing logic.")
1684 (license license:bsd-3)))
1685
1686 (define-public python2-oauthlib
1687 (package-with-python2 python-oauthlib))
1688
1689 (define-public python-rauth
1690 (package
1691 (name "python-rauth")
1692 (version "0.7.3")
1693 (source
1694 (origin
1695 (method url-fetch)
1696 (uri (pypi-uri "rauth" version))
1697 (sha256
1698 (base32
1699 "02kv8w8l98ky223avyq7vw7x1f2ya9chrm59r77ylq45qb0xnk2j"))))
1700 (build-system python-build-system)
1701 (arguments
1702 `(#:test-target "check"))
1703 (propagated-inputs
1704 `(("python-requests" ,python-requests)))
1705 (home-page "https://github.com/litl/rauth")
1706 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
1707 (description
1708 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
1709 provides service wrappers for convenient connection initialization and
1710 authenticated session objects providing things like keep-alive.")
1711 (license license:expat)
1712 (properties `((python2-variant . ,(delay python2-rauth))))))
1713
1714 (define-public python2-rauth
1715 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
1716 (package
1717 (inherit base)
1718 (native-inputs `(("python2-unittest2" ,python2-unittest2)
1719 ,@(package-native-inputs base))))))
1720
1721 (define-public python-urllib3
1722 (package
1723 (name "python-urllib3")
1724 (version "1.25.9")
1725 (source
1726 (origin
1727 (method url-fetch)
1728 (uri (pypi-uri "urllib3" version))
1729 (sha256
1730 (base32
1731 "09rmjqm5syhhc8fx3v06h3yv6cqy0b1081jg8wm5grpwpr72j61h"))))
1732 (build-system python-build-system)
1733 (arguments `(#:tests? #f))
1734 (propagated-inputs
1735 `(;; These 5 inputs are used to build urrlib3[secure]
1736 ("python-certifi" ,python-certifi)
1737 ("python-cryptography" ,python-cryptography)
1738 ("python-idna" ,python-idna)
1739 ("python-ipaddress" ,python-ipaddress)
1740 ("python-pyopenssl" ,python-pyopenssl)
1741 ("python-pysocks" ,python-pysocks)))
1742 (home-page "https://urllib3.readthedocs.io/")
1743 (synopsis "HTTP library with thread-safe connection pooling")
1744 (description
1745 "Urllib3 supports features left out of urllib and urllib2 libraries. It
1746 can reuse the same socket connection for multiple requests, it can POST files,
1747 supports url redirection and retries, and also gzip and deflate decoding.")
1748 (license license:expat)))
1749
1750 ;; Some software requires an older version of urllib3, notably Docker.
1751 (define-public python-urllib3-1.24
1752 (package (inherit python-urllib3)
1753 (version "1.24.3")
1754 (source (origin
1755 (method url-fetch)
1756 (uri (pypi-uri "urllib3" version))
1757 (sha256
1758 (base32
1759 "1x0slqrv6kixkbcdnxbglvjliwhc1payavxjvk8fvbqjrnasd4r3"))))))
1760
1761
1762 (define-public python2-urllib3
1763 (package-with-python2 python-urllib3))
1764
1765 (define-public awscli
1766 (package
1767 (name "awscli")
1768 (version "1.18.6")
1769 (source
1770 (origin
1771 (method url-fetch)
1772 (uri (pypi-uri name version))
1773 (sha256
1774 (base32
1775 "0p479mfs9r0m82a217pap8156ijwvhv6r3kqa4k267gd05wgvygm"))))
1776 (build-system python-build-system)
1777 (arguments
1778 ;; FIXME: The 'pypi' release does not contain tests.
1779 '(#:tests? #f
1780 #:phases
1781 (modify-phases %standard-phases
1782 (add-after 'unpack 'fix-reference-to-groff
1783 (lambda _
1784 (substitute* "awscli/help.py"
1785 (("if not self._exists_on_path\\('groff'\\):") "")
1786 (("raise ExecutableNotFoundError\\('groff'\\)") "")
1787 (("cmdline = \\['groff'")
1788 (string-append "cmdline = ['" (which "groff") "'")))
1789 #t)))))
1790 (propagated-inputs
1791 `(("python-colorama" ,python-colorama)
1792 ("python-botocore" ,python-botocore)
1793 ("python-s3transfer" ,python-s3transfer)
1794 ("python-docutils" ,python-docutils)
1795 ("python-pyyaml" ,python-pyyaml)
1796 ("python-rsa" ,python-rsa)))
1797 (native-inputs
1798 `(("groff" ,groff)))
1799 (home-page "https://aws.amazon.com/cli/")
1800 (synopsis "Command line client for AWS")
1801 (description "AWS CLI provides a unified command line interface to the
1802 Amazon Web Services (AWS) API.")
1803 (license license:asl2.0)))
1804
1805 (define-public python-wsgiproxy2
1806 (package
1807 (name "python-wsgiproxy2")
1808 (version "0.4.6")
1809 (source
1810 (origin
1811 (method url-fetch)
1812 (uri (pypi-uri "WSGIProxy2" version ".tar.gz"))
1813 (sha256
1814 (base32 "16jch5nic0hia28lps3c678s9s9mjdq8n87igxncjg0rpi5adqnf"))))
1815 (build-system python-build-system)
1816 (native-inputs
1817 `(("python-webtest" ,python-webtest)))
1818 (propagated-inputs
1819 `(("python-requests" ,python-requests)
1820 ("python-six" ,python-six)
1821 ("python-urllib3" ,python-urllib3)
1822 ("python-webob" ,python-webob)))
1823 (home-page "https://github.com/gawel/WSGIProxy2/")
1824 (synopsis "WSGI Proxy with various http client backends")
1825 (description "WSGI turns HTTP requests into WSGI function calls.
1826 WSGIProxy turns WSGI function calls into HTTP requests.
1827 It also includes code to sign requests and pass private data,
1828 and to spawn subprocesses to handle requests.")
1829 (license license:expat)))
1830
1831 (define-public python2-wsgiproxy2
1832 (package-with-python2 python-wsgiproxy2))
1833
1834 (define-public python-pastedeploy
1835 (package
1836 (name "python-pastedeploy")
1837 (version "2.1.0")
1838 (source
1839 (origin
1840 (method url-fetch)
1841 (uri (pypi-uri "PasteDeploy" version))
1842 (sha256
1843 (base32 "16qsq5y6mryslmbp5pn35x4z8z3ndp5rpgl42h226879nrw9hmg7"))))
1844 (build-system python-build-system)
1845 (arguments
1846 '(#:test-target "pytest"))
1847 (native-inputs
1848 `(("python-pytest" ,python-pytest)
1849 ("python-pytest-runner" ,python-pytest-runner)))
1850 (home-page "https://pylonsproject.org/")
1851 (synopsis
1852 "Load, configure, and compose WSGI applications and servers")
1853 (description
1854 "This tool provides code to load WSGI applications and servers from URIs;
1855 these URIs can refer to Python Eggs for INI-style configuration files. Paste
1856 Script provides commands to serve applications based on this configuration
1857 file.")
1858 (license license:expat)))
1859
1860 (define-public python2-pastedeploy
1861 (package-with-python2 python-pastedeploy))
1862
1863 (define-public python-webtest
1864 (package
1865 (name "python-webtest")
1866 (version "2.0.33")
1867 (source
1868 (origin
1869 (method url-fetch)
1870 (uri (pypi-uri "WebTest" version))
1871 (sha256
1872 (base32
1873 "1l3z0cwqslsf4rcrhi2gr8kdfh74wn2dw76376i4g9i38gz8wd21"))))
1874 (build-system python-build-system)
1875 (arguments
1876 ;; Tests require python-pyquery, which creates a circular dependency.
1877 `(#:tests? #f))
1878 (propagated-inputs
1879 `(("python-waitress" ,python-waitress)
1880 ("python-webob" ,python-webob)
1881 ("python-six" ,python-six)
1882 ("python-beautifulsoup4" ,python-beautifulsoup4)))
1883 (home-page "https://docs.pylonsproject.org/projects/webtest/")
1884 (synopsis "Helper to test WSGI applications")
1885 (description "Webtest allows you to test your Python web applications
1886 without starting an HTTP server. It supports anything that supports the
1887 minimum of WSGI.")
1888 (license license:expat)))
1889
1890 (define-public python2-webtest
1891 (package-with-python2 python-webtest))
1892
1893 (define-public python-flask
1894 (package
1895 (name "python-flask")
1896 (version "1.1.2")
1897 (source (origin
1898 (method url-fetch)
1899 (uri (pypi-uri "Flask" version))
1900 (sha256
1901 (base32
1902 "0q3h295izcil7lswkzfnyg3k5gq4hpmqmpl6i7s5m1n9szi1myjf"))))
1903 (build-system python-build-system)
1904 (arguments
1905 '(#:phases
1906 (modify-phases %standard-phases
1907 (replace 'check
1908 (lambda _
1909 (setenv "PYTHONPATH" (string-append "./build/lib:"
1910 (getenv "PYTHONPATH")))
1911 (invoke "pytest" "-vv" "tests"))))))
1912 (native-inputs
1913 `(("python-pytest" ,python-pytest)))
1914 (propagated-inputs
1915 `(("python-itsdangerous" ,python-itsdangerous)
1916 ("python-jinja2" ,python-jinja2)
1917 ("python-click" ,python-click)
1918 ("python-werkzeug" ,python-werkzeug)))
1919 (home-page "https://www.palletsprojects.com/p/flask/")
1920 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
1921 (description "Flask is a micro web framework based on the Werkzeug toolkit
1922 and Jinja2 template engine. It is called a micro framework because it does not
1923 presume or force a developer to use a particular tool or library.")
1924 (license license:bsd-3)))
1925
1926 (define-public python2-flask
1927 (package-with-python2 python-flask))
1928
1929 (define-public python-flask-wtf
1930 (package
1931 (name "python-flask-wtf")
1932 (version "0.14.3")
1933 (source
1934 (origin
1935 (method url-fetch)
1936 (uri (pypi-uri "Flask-WTF" version))
1937 (sha256
1938 (base32
1939 "086pvg2x69n0nczcq7frknfjd8am1zdy8qqpva1sanwb02hf65yl"))))
1940 (build-system python-build-system)
1941 (arguments
1942 '(#:phases
1943 (modify-phases %standard-phases
1944 (replace 'check
1945 (lambda _
1946 (setenv "PYTHONPATH" (string-append "./build/lib:"
1947 (getenv "PYTHONPATH")))
1948 (invoke "pytest" "-vv"))))))
1949 (propagated-inputs
1950 `(("python-flask-babel" ,python-flask-babel)
1951 ("python-babel" ,python-babel)
1952 ("python-wtforms" ,python-wtforms)))
1953 (native-inputs
1954 `(("python-pytest" ,python-pytest)))
1955 (home-page "https://github.com/lepture/flask-wtf")
1956 (synopsis "Simple integration of Flask and WTForms")
1957 (description "Flask-WTF integrates Flask and WTForms, including CSRF, file
1958 upload, and reCAPTCHA.")
1959 (license license:bsd-3)))
1960
1961 (define-public python2-flask-wtf
1962 (package-with-python2 python-flask-wtf))
1963
1964 (define-public python-flask-multistatic
1965 (package
1966 (name "python-flask-multistatic")
1967 (version "1.0")
1968 (source
1969 (origin
1970 (method url-fetch)
1971 (uri (pypi-uri "flask-multistatic" version))
1972 (sha256
1973 (base32
1974 "0p4v50rwv64wcd0zlq7rzl4waprwr4hj19s3cgf1isywa7jcisgm"))))
1975 (build-system python-build-system)
1976 (propagated-inputs
1977 `(("python-flask" ,python-flask)))
1978 (home-page "https://pagure.io/flask-multistatic")
1979 (synopsis "Flask plugin to allow overriding static files")
1980 (description "@code{flask-multistatic} is a flask plugin that adds support
1981 for overriding static files.")
1982 (license license:gpl3+)))
1983
1984 (define-public python2-flask-multistatic
1985 (package-with-python2 python-flask-multistatic))
1986
1987 (define-public python-cookies
1988 (package
1989 (name "python-cookies")
1990 (version "2.2.1")
1991 (source (origin
1992 (method url-fetch)
1993 (uri (pypi-uri "cookies" version))
1994 (sha256
1995 (base32
1996 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
1997 (build-system python-build-system)
1998 (arguments
1999 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
2000 #:tests? #f))
2001 (native-inputs
2002 `(("python-pytest" ,python-pytest)))
2003 (synopsis "HTTP cookie parser and renderer")
2004 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
2005 Python.")
2006 (home-page "https://gitlab.com/sashahart/cookies")
2007 (license license:expat)))
2008
2009 (define-public python2-cookies
2010 (package-with-python2 python-cookies))
2011
2012 (define-public python-responses
2013 (package
2014 (name "python-responses")
2015 (version "0.10.6")
2016 (source (origin
2017 (method url-fetch)
2018 (uri (pypi-uri "responses" version))
2019 (sha256
2020 (base32
2021 "147pacwkkqy3qf3hr33fnl1xbzgw0zsm3qppvvy9qhq8h069qbah"))))
2022 (build-system python-build-system)
2023 (arguments
2024 `(;; Test suite is not distributed:
2025 ;; https://github.com/getsentry/responses/issues/38
2026 #:tests? #f))
2027 (native-inputs
2028 `(("python-mock" ,python-mock)))
2029 (propagated-inputs
2030 `(("python-requests" ,python-requests)
2031 ("python-cookies" ,python-cookies)
2032 ("python-six" ,python-six)))
2033 (home-page "https://github.com/getsentry/responses")
2034 (synopsis "Utility for mocking out the `requests` Python library")
2035 (description "A utility library for mocking out the `requests` Python
2036 library.")
2037 (license license:asl2.0)))
2038
2039 (define-public python2-responses
2040 (package-with-python2 python-responses))
2041
2042 (define-public python-grequests
2043 (package
2044 (name "python-grequests")
2045 (version "0.3.0")
2046 (source
2047 (origin
2048 (method url-fetch)
2049 (uri (pypi-uri "grequests" version))
2050 (sha256
2051 (base32
2052 "1j9icncllbkv7x5719b20mx670c6q1jrdx1sakskkarvx3pc8h8g"))))
2053 (build-system python-build-system)
2054 (propagated-inputs
2055 `(("python-gevent" ,python-gevent)
2056 ("python-requests" ,python-requests)))
2057 (native-inputs
2058 `(("python-nose" ,python-nose)
2059 ("python-zope.interface" ,python-zope-interface)
2060 ("python-zope.event" ,python-zope-event)))
2061 (home-page "https://github.com/kennethreitz/grequests")
2062 (synopsis "Python library for asynchronous HTTP requests")
2063 (description "GRequests is a Python library that allows you to use
2064 @code{Requests} with @code{Gevent} to make asynchronous HTTP Requests easily")
2065 (license license:bsd-2)))
2066
2067 (define-public python-geventhttpclient
2068 (package
2069 (name "python-geventhttpclient")
2070 (version "1.3.1")
2071 (source (origin
2072 (method url-fetch)
2073 (uri (pypi-uri "geventhttpclient" version))
2074 (sha256
2075 (base32
2076 "07d0q3wzmml75227r6y6mrl5a0zpf4v9gj0ni5rhbyzmaj4az1xx"))
2077 (modules '((guix build utils)))
2078 (snippet
2079 '(begin
2080 ;; Delete pre-compiled files.
2081 (for-each delete-file (find-files "src/geventhttpclient"
2082 ".*\\.pyc"))
2083 #t))))
2084 (build-system python-build-system)
2085 (arguments
2086 '(#:phases
2087 (modify-phases %standard-phases
2088 (add-after 'unpack 'delete-network-tests
2089 (lambda _
2090 (delete-file "src/geventhttpclient/tests/test_client.py")
2091 #t))
2092 (replace 'check
2093 (lambda* (#:key inputs outputs #:allow-other-keys)
2094 (add-installed-pythonpath inputs outputs)
2095 (invoke "py.test" "src/geventhttpclient/tests" "-v"
2096 ;; Append the test modules to sys.path to avoid
2097 ;; namespace conflict which breaks SSL tests.
2098 "--import-mode=append"
2099 ;; XXX: Disable test fails with Python 3.8:
2100 ;; https://github.com/gwik/geventhttpclient/issues/119
2101 "-k" (string-append "not test_cookielib_compatibility"))
2102 #t)))))
2103 (native-inputs
2104 `(("python-pytest" ,python-pytest)))
2105 (propagated-inputs
2106 `(("python-certifi" ,python-certifi)
2107 ("python-gevent" ,python-gevent)
2108 ("python-six" ,python-six)))
2109 (home-page "https://github.com/gwik/geventhttpclient")
2110 (synopsis "HTTP client library for gevent")
2111 (description "@code{python-geventhttpclient} is a high performance,
2112 concurrent HTTP client library for python using @code{gevent}.")
2113 (license license:expat)))
2114
2115 (define-public python2-geventhttpclient
2116 (package-with-python2 python-geventhttpclient))
2117
2118 (define-public python-requests-oauthlib
2119 (package
2120 (name "python-requests-oauthlib")
2121 (version "1.2.0")
2122 (source
2123 (origin
2124 (method url-fetch)
2125 (uri (pypi-uri "requests-oauthlib" version))
2126 (sha256
2127 (base32
2128 "0mrglgcvq7k48pf27s4gifdk0za8xmgpf55jy15yjj471qrk6rdx"))))
2129 (build-system python-build-system)
2130 (arguments
2131 `(#:phases
2132 (modify-phases %standard-phases
2133 ;; removes tests that require network access
2134 (add-before 'check 'pre-check
2135 (lambda _
2136 (delete-file "tests/test_core.py")
2137 #t)))))
2138 (native-inputs
2139 `(("python-pyjwt" ,python-pyjwt)
2140 ("python-requests-mock" ,python-requests-mock)
2141 ("python-mock" ,python-mock)))
2142 (propagated-inputs
2143 `(("python-oauthlib" ,python-oauthlib)
2144 ("python-requests" ,python-requests)))
2145 (home-page
2146 "https://github.com/requests/requests-oauthlib")
2147 (synopsis
2148 "OAuthlib authentication support for Requests")
2149 (description
2150 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
2151 provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
2152 (license license:isc)))
2153
2154 (define-public python2-requests-oauthlib
2155 (package-with-python2 python-requests-oauthlib))
2156
2157 (define-public python-url
2158 (package
2159 (name "python-url")
2160 (version "0.2.0")
2161 (source (origin
2162 (method url-fetch)
2163 (uri (pypi-uri "url" version))
2164 (sha256
2165 (base32
2166 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
2167 (build-system python-build-system)
2168 (propagated-inputs
2169 `(("python-publicsuffix" ,python-publicsuffix)))
2170 (native-inputs
2171 `(("python-coverage" ,python-coverage)
2172 ("python-nose" ,python-nose)))
2173 (arguments
2174 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
2175 (home-page "https://github.com/seomoz/url-py")
2176 (synopsis "URL Parsing")
2177 (description "Library for parsing urls.")
2178 (license license:expat)
2179 (properties `((python2-variant . ,(delay python2-url))))))
2180
2181 (define-public python2-url
2182 (let ((base (package-with-python2 (strip-python2-variant python-url))))
2183 (package (inherit base)
2184 (propagated-inputs
2185 `(("python2-publicsuffix" ,python2-publicsuffix))))))
2186
2187 (define-public python-cachecontrol
2188 (package
2189 (name "python-cachecontrol")
2190 (version "0.12.5")
2191 (source
2192 (origin
2193 (method git-fetch)
2194 ;; Pypi does not have tests.
2195 (uri (git-reference
2196 (url "https://github.com/ionrock/cachecontrol")
2197 (commit (string-append "v" version))))
2198 (file-name (git-file-name name version))
2199 (sha256
2200 (base32
2201 "03lgc65sl04n0cgzmmgg99bk83f9i6k8yrmcd4hpl46q1pymn0kz"))))
2202 (build-system python-build-system)
2203 (arguments
2204 ;; Versions > 0.11.6 depend on CherryPy for testing.
2205 ;; It's too much work to package CherryPy for now.
2206 `(#:tests? #f))
2207 (propagated-inputs
2208 `(("python-requests" ,python-requests)
2209 ("python-msgpack" ,python-msgpack)
2210 ("python-lockfile" ,python-lockfile)))
2211 (home-page "https://github.com/ionrock/cachecontrol")
2212 (synopsis "The httplib2 caching algorithms for use with requests")
2213 (description "CacheControl is a port of the caching algorithms in
2214 @code{httplib2} for use with @code{requests} session objects.")
2215 (license license:asl2.0)))
2216
2217 (define-public python2-cachecontrol
2218 (package-with-python2 python-cachecontrol))
2219
2220 (define-public python-betamax
2221 (package
2222 (name "python-betamax")
2223 (version "0.8.1")
2224 (source
2225 (origin
2226 (method url-fetch)
2227 (uri (pypi-uri "betamax" version))
2228 (sha256
2229 (base32
2230 "1hki1c2vs7adq7zr56wi6i5bhrkia4s2ywpv2c98ibnczz709w2v"))))
2231 (build-system python-build-system)
2232 (arguments
2233 '(;; Many tests fail because they require networking.
2234 #:tests? #f))
2235 (propagated-inputs
2236 `(("python-requests" ,python-requests)))
2237 (home-page "https://github.com/sigmavirus24/betamax")
2238 (synopsis "Record HTTP interactions with python-requests")
2239 (description "Betamax will record your test suite's HTTP interactions and
2240 replay them during future tests. It is designed to work with python-requests.")
2241 (license license:expat)))
2242
2243 (define-public python2-betamax
2244 (package-with-python2 python-betamax))
2245
2246 (define-public python-betamax-matchers
2247 (package
2248 (name "python-betamax-matchers")
2249 (version "0.4.0")
2250 (source
2251 (origin
2252 (method url-fetch)
2253 (uri (pypi-uri "betamax-matchers" version))
2254 (sha256
2255 (base32
2256 "07qpwjyq2i2aqhz5iwghnj4pqr2ys5n45v1vmpcfx9r5mhwrsq43"))))
2257 (build-system python-build-system)
2258 (propagated-inputs
2259 `(("python-betamax" ,python-betamax)
2260 ("python-requests-toolbelt" ,python-requests-toolbelt)))
2261 (home-page "https://github.com/sigmavirus24/betamax_matchers")
2262 (synopsis "VCR imitation for python-requests")
2263 (description "@code{betamax-matchers} provides a set of Matchers for
2264 Betamax.")
2265 (license license:asl2.0)))
2266
2267 (define-public python2-betamax-matchers
2268 (package-with-python2 python-betamax-matchers))
2269
2270 (define-public python-s3transfer
2271 (package
2272 (name "python-s3transfer")
2273 (version "0.2.0")
2274 (source (origin
2275 (method url-fetch)
2276 (uri (pypi-uri "s3transfer" version))
2277 (sha256
2278 (base32
2279 "08fhj73b1ai52hrs2q3nggshq3pswn1gq8ch3m009cb2v2vmqggj"))))
2280 (build-system python-build-system)
2281 (arguments
2282 `(#:phases
2283 (modify-phases %standard-phases
2284 (add-after 'unpack 'patch
2285 (lambda _
2286 ;; There's a small issue with one test with Python 3.8, this
2287 ;; change has been suggested upstream:
2288 ;; https://github.com/boto/s3transfer/pull/164
2289 (substitute* "tests/unit/test_s3transfer.py"
2290 (("super\\(FailedDownloadParts, self\\)\\.submit\\(function\\)")
2291 "futures.Future()"))
2292 #t))
2293 (replace 'check
2294 (lambda _
2295 ;; Some of the 'integration' tests require network access or
2296 ;; login credentials.
2297 (invoke "nosetests" "--exclude=integration")
2298 #t)))))
2299 (native-inputs
2300 `(("python-docutils" ,python-docutils)
2301 ("python-mock" ,python-mock)
2302 ("python-nose" ,python-nose)))
2303 (propagated-inputs
2304 `(("python-botocore" ,python-botocore)
2305 ("python-urllib3" ,python-urllib3)))
2306 (synopsis "Amazon S3 Transfer Manager")
2307 (description "S3transfer is a Python library for managing Amazon S3
2308 transfers.")
2309 (home-page "https://github.com/boto/s3transfer")
2310 (license license:asl2.0)
2311 (properties `((python2-variant . ,(delay python2-s3transfer))))))
2312
2313 (define-public python2-s3transfer
2314 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
2315 (package
2316 (inherit base)
2317 (native-inputs
2318 `(("python2-futures" ,python2-futures)
2319 ,@(package-native-inputs base))))))
2320
2321 (define-public python-slimit
2322 (package
2323 (name "python-slimit")
2324 (version "0.8.1")
2325 (source
2326 (origin
2327 (method url-fetch)
2328 (uri (pypi-uri "slimit" version ".zip"))
2329 (sha256
2330 (base32
2331 "02vj2x728rs1127q2nc27frrqra4fczivnb7gch6n5lzi7pxqczl"))))
2332 (build-system python-build-system)
2333 (native-inputs
2334 `(("unzip" ,unzip)))
2335 (propagated-inputs
2336 `(("python-ply" ,python-ply)))
2337 (home-page "https://slimit.readthedocs.io/")
2338 (synopsis "JavaScript minifier, parser and lexer written in Python")
2339 (description
2340 "SlimIt is a JavaScript minifier written in Python. It compiles
2341 JavaScript into more compact code so that it downloads and runs faster.
2342 SlimIt also provides a library that includes a JavaScript parser, lexer,
2343 pretty printer and a tree visitor.")
2344 (license license:expat)))
2345
2346 (define-public python-flask-restful
2347 (package
2348 (name "python-flask-restful")
2349 (version "0.3.8")
2350 (source
2351 (origin
2352 (method url-fetch)
2353 (uri (pypi-uri "Flask-RESTful" version))
2354 (patches (search-patches "python-flask-restful-werkzeug-compat.patch"))
2355 (sha256
2356 (base32
2357 "05b9lzx5yc3wgml2bcq50lq35h66m8zpj6dc9advcb5z3acsbaay"))))
2358 (build-system python-build-system)
2359 (propagated-inputs
2360 `(("python-aniso8601" ,python-aniso8601)
2361 ("python-flask" ,python-flask)
2362 ("python-pycrypto" ,python-pycrypto)
2363 ("python-pytz" ,python-pytz)))
2364 (native-inputs
2365 `(;; Optional dependency of Flask. Tests need it.
2366 ("python-blinker" ,python-blinker)
2367 ("python-mock" ,python-mock) ; For tests
2368 ("python-nose" ,python-nose))) ;for tests
2369 (home-page
2370 "https://www.github.com/flask-restful/flask-restful/")
2371 (synopsis
2372 "Flask module for creating REST APIs")
2373 (description
2374 "This package contains a Flask module for creating REST APIs.")
2375 (license license:bsd-3)))
2376
2377 (define-public python-flask-basicauth
2378 (package
2379 (name "python-flask-basicauth")
2380 (version "0.2.0")
2381 (source
2382 (origin
2383 (method url-fetch)
2384 (uri (pypi-uri "Flask-BasicAuth" version))
2385 (sha256
2386 (base32
2387 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
2388 (build-system python-build-system)
2389 (propagated-inputs
2390 `(("python-flask" ,python-flask)))
2391 (home-page
2392 "https://github.com/jpvanhal/flask-basicauth")
2393 (synopsis
2394 "HTTP basic access authentication for Flask")
2395 (description
2396 "This package provides HTTP basic access authentication for Flask.")
2397 (license license:bsd-3)))
2398
2399 (define-public python-flask-htpasswd
2400 (package
2401 (name "python-flask-htpasswd")
2402 (version "0.3.1")
2403 (source
2404 (origin
2405 (method url-fetch)
2406 (uri (pypi-uri "flask-htpasswd" version))
2407 (sha256
2408 (base32
2409 "14q1y1y9i9bhabdnwd25jqzc4ljli23smxfyyh8abxz1vq93pxra"))))
2410 (build-system python-build-system)
2411 (propagated-inputs
2412 `(("python-flask" ,python-flask)
2413 ("python-itsdangerous" ,python-itsdangerous)
2414 ("python-passlib" ,python-passlib)
2415 ("python-tox" ,python-tox)))
2416 (home-page "https://github.com/carsongee/flask-htpasswd")
2417 (synopsis "Basic authentication via htpasswd files in Flask applications")
2418 (description "This package provides Basic authentication via
2419 @file{htpasswd} files and access_token authentication in Flask
2420 applications.")
2421 (license license:bsd-3)))
2422
2423 (define-public python-flask-sqlalchemy
2424 (package
2425 (name "python-flask-sqlalchemy")
2426 (version "2.4.3")
2427 (source (origin
2428 (method url-fetch)
2429 (uri (pypi-uri "Flask-SQLAlchemy" version))
2430 (sha256
2431 (base32
2432 "19apnn2m9bl1d1h2nc52pnmiyx993mwzmfjrv04l3wn5hyznyr8b"))))
2433 (build-system python-build-system)
2434 (propagated-inputs
2435 `(("python-flask" ,python-flask)
2436 ("python-sqlalchemy" ,python-sqlalchemy)))
2437 (home-page "https://github.com/mitsuhiko/flask-sqlalchemy")
2438 (synopsis "Module adding SQLAlchemy support to your Flask application")
2439 (description
2440 "This package adds SQLAlchemy support to your Flask application.")
2441 (license license:bsd-3)))
2442
2443 (define-public python-flask-restplus
2444 (package
2445 (name "python-flask-restplus")
2446 (version "0.9.2")
2447 (source
2448 (origin
2449 (method url-fetch)
2450 (uri (pypi-uri "flask-restplus" version))
2451 (sha256
2452 (base32
2453 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
2454 (build-system python-build-system)
2455 (arguments
2456 '(#:tests? #f)) ; FIXME: 35/882 tests failing.
2457 ;; #:phases
2458 ;; (modify-phases %standard-phases
2459 ;; (replace 'check
2460 ;; (lambda _
2461 ;; (invoke "nosetests")
2462 ;; #t)))))
2463 (propagated-inputs
2464 `(("python-aniso8601" ,python-aniso8601)
2465 ("python-flask" ,python-flask)
2466 ("python-jsonschema" ,python-jsonschema)
2467 ("python-pytz" ,python-pytz)
2468 ("python-six" ,python-six)))
2469 (native-inputs
2470 `(("python-tzlocal" ,python-tzlocal)
2471 ("python-blinker" ,python-blinker)
2472 ("python-nose" ,python-nose)
2473 ("python-rednose" ,python-rednose)))
2474 (home-page "https://github.com/noirbizarre/flask-restplus")
2475 (synopsis "Framework for documented API development with Flask")
2476 (description "This package provides a framework for API development with
2477 the Flask web framework in Python. It is similar to package
2478 @code{python-flask-restful} but supports the @code{python-swagger}
2479 documentation builder.")
2480 (license license:expat)))
2481
2482 (define-public python-flask-restful-swagger
2483 (package
2484 (name "python-flask-restful-swagger")
2485 (version "0.20.1")
2486 (source
2487 (origin
2488 (method url-fetch)
2489 (uri (pypi-uri "flask-restful-swagger" version))
2490 (sha256
2491 (base32
2492 "1p66f98b5zpypnnz56pxpbirchqj6aniw6qyrp8h572l0dn9xlvq"))))
2493 (build-system python-build-system)
2494 (arguments '(#:tests? #f)) ;no tests
2495 (propagated-inputs
2496 `(("python-flask-restful" ,python-flask-restful)))
2497 (home-page "https://github.com/rantav/flask-restful-swagger")
2498 (synopsis "Extract Swagger specs from Flask-Restful projects")
2499 (description "This package lets you extract Swagger API documentation
2500 specs from your Flask-Restful projects.")
2501 (license license:expat)))
2502
2503 (define-public python2-flask-restful-swagger
2504 (package-with-python2 python-flask-restful-swagger))
2505
2506 (define-public python-htmlmin
2507 (package
2508 (name "python-htmlmin")
2509 (version "0.1.12")
2510 (source
2511 (origin
2512 (method url-fetch)
2513 (uri (pypi-uri "htmlmin" version))
2514 (sha256
2515 (base32
2516 "0y51xhabw6x8jk8k93xl8vznshpz3jb6l28075r5sjip613fzhah"))))
2517 (arguments
2518 `(#:tests? #f)) ; no tests
2519 (build-system python-build-system)
2520 (home-page "https://htmlmin.readthedocs.org/en/latest/")
2521 (synopsis "HTML minifier")
2522 (description "@code{htmlmin} is an HTML minifier that just works.
2523 It comes with safe defaults and easily configurable options.")
2524 (license license:bsd-3)))
2525
2526 (define-public python2-htmlmin
2527 (package-with-python2 python-htmlmin))
2528
2529 (define-public python-flask-htmlmin
2530 (package
2531 (name "python-flask-htmlmin")
2532 (version "1.2")
2533 (source
2534 (origin
2535 (method url-fetch)
2536 (uri (pypi-uri "Flask-HTMLmin" version))
2537 (sha256
2538 (base32
2539 "1n6zlq72kakkw0z2jpq6nh74lfsmxybm4g053pwhc14fbr809348"))))
2540 (propagated-inputs
2541 `(("python-flask" ,python-flask)
2542 ("python-htmlmin" ,python-htmlmin)))
2543 (build-system python-build-system)
2544 (home-page "https://github.com/hamidfzm/Flask-HTMLmin")
2545 (synopsis "HTML response minifier for Flask")
2546 (description
2547 "Minify @code{text/html} MIME type responses when using @code{Flask}.")
2548 (license license:bsd-3)))
2549
2550 (define-public python2-flask-htmlmin
2551 (package-with-python2 python-flask-htmlmin))
2552
2553 (define-public python-jsmin
2554 (package
2555 (name "python-jsmin")
2556 (version "2.2.2")
2557 (source
2558 (origin
2559 (method url-fetch)
2560 (uri (pypi-uri "jsmin" version))
2561 (sha256
2562 (base32
2563 "0fsmqbjvpxvff0984x7c0y8xmf49ax9mncz48b9xjx8wrnr9kpxn"))))
2564 (build-system python-build-system)
2565 (home-page "https://github.com/tikitu/jsmin/")
2566 (synopsis "Python JavaScript minifier")
2567 (description
2568 "@code{jsmin} is a JavaScript minifier, usable from both Python code and
2569 on the command line.")
2570 (license license:expat)))
2571
2572 (define-public python-flask-login
2573 (package
2574 (name "python-flask-login")
2575 (version "0.5.0")
2576 (source
2577 (origin
2578 (method git-fetch)
2579 (uri (git-reference
2580 (url "https://github.com/maxcountryman/flask-login")
2581 (commit version)))
2582 (file-name (git-file-name name version))
2583 (sha256
2584 (base32 "11ac924w0y4m0kf3mxnxdlidy88jfa7njw5yyrq16dvnx4iwd8gg"))))
2585 (build-system python-build-system)
2586 (propagated-inputs
2587 `(("python-flask" ,python-flask)))
2588 (native-inputs
2589 ;; For tests.
2590 `(("python-blinker" ,python-blinker)
2591 ("python-coverage" ,python-coverage)
2592 ("python-mock" ,python-mock)
2593 ("python-pycodestyle" ,python-pycodestyle)
2594 ("python-pyflakes" ,python-pyflakes)
2595 ("python-pytest" ,python-pytest)
2596 ("python-semantic-version" ,python-semantic-version)
2597 ("python-werkzeug" ,python-werkzeug)))
2598 (home-page "https://github.com/maxcountryman/flask-login")
2599 (synopsis "User session management for Flask")
2600 (description
2601 "@code{Flask-Login} provides user session management for Flask. It
2602 handles the common tasks of logging in, logging out, and remembering your
2603 users' sessions over extended periods of time.")
2604 (license license:expat)))
2605
2606 (define-public python2-flask-login
2607 (package-with-python2 python-flask-login))
2608
2609 (define-public python-oauth2client
2610 (package
2611 (name "python-oauth2client")
2612 (version "4.0.0")
2613 (source
2614 (origin
2615 (method url-fetch)
2616 (uri (pypi-uri "oauth2client" version))
2617 (sha256
2618 (base32
2619 "1irqqap2zibysf8dba8sklfqikia579srd0phm5n754ni0h59gl0"))))
2620 (build-system python-build-system)
2621 (arguments
2622 `(#:tests? #f))
2623 (propagated-inputs
2624 `(("python-httplib2" ,python-httplib2)
2625 ("python-pyasn1" ,python-pyasn1)
2626 ("python-pyasn1-modules" ,python-pyasn1-modules)
2627 ("python-rsa" ,python-rsa)
2628 ("python-six" ,python-six)))
2629 (home-page "https://github.com/google/oauth2client/")
2630 (synopsis "OAuth 2.0 client library")
2631 (description "@code{python-oauth2client} provides an OAuth 2.0 client
2632 library for Python")
2633 (license license:asl2.0)))
2634
2635 (define-public python2-oauth2client
2636 (package-with-python2 python-oauth2client))
2637
2638 (define-public python-flask-oidc
2639 (package
2640 (name "python-flask-oidc")
2641 (version "1.1.1")
2642 (source
2643 (origin
2644 (method url-fetch)
2645 (uri (pypi-uri "flask-oidc" version))
2646 (sha256
2647 (base32
2648 "1ay5j0mf174bix7i67hclr95gv16z81fpx0dijvi0gydvdj3ddy2"))))
2649 (build-system python-build-system)
2650 (propagated-inputs
2651 `(("python-flask" ,python-flask)
2652 ("python-itsdangerous" ,python-itsdangerous)
2653 ("python-oauth2client" ,python-oauth2client)
2654 ("python-six" ,python-six)))
2655 (native-inputs
2656 `(("python-nose" ,python-nose)
2657 ("python-mock" ,python-mock)))
2658 (home-page "https://github.com/puiterwijk/flask-oidc")
2659 (synopsis "OpenID Connect extension for Flask")
2660 (description "@code{python-flask-oidc} provides an OpenID Connect extension
2661 for Flask.")
2662 (license license:bsd-2)))
2663
2664 (define-public python-webassets
2665 (package
2666 (name "python-webassets")
2667 (version "0.12.1")
2668 (source
2669 (origin
2670 (method url-fetch)
2671 (uri (pypi-uri "webassets" version))
2672 (sha256
2673 (base32
2674 "1nrqkpb7z46h2b77xafxihqv3322cwqv6293ngaky4j3ff4cing7"))))
2675 (build-system python-build-system)
2676 (native-inputs
2677 `(("python-jinja2" ,python-jinja2)
2678 ("python-mock" ,python-mock)
2679 ("python-nose" ,python-nose)
2680 ("python-pytest" ,python-pytest)))
2681 (home-page "https://github.com/miracle2k/webassets")
2682 (synopsis "Media asset management")
2683 (description "Merges, minifies and compresses Javascript and CSS files,
2684 supporting a variety of different filters, including YUI, jsmin, jspacker or
2685 CSS tidy. Also supports URL rewriting in CSS files.")
2686 (license license:bsd-2)))
2687
2688 (define-public python-cssmin
2689 (package
2690 (name "python-cssmin")
2691 (version "0.2.0")
2692 (source
2693 (origin
2694 (method url-fetch)
2695 (uri (pypi-uri "cssmin" version))
2696 (sha256
2697 (base32
2698 "1dk723nfm2yf8cp4pj785giqlwv42l0kj8rk40kczvq1hk6g04p0"))))
2699 (build-system python-build-system)
2700 (home-page "https://github.com/zacharyvoase/cssmin")
2701 (synopsis "Python port of the YUI CSS Compressor")
2702 (description "Python port of the YUI CSS Compressor.")
2703 (license (list license:expat license:bsd-3))))
2704
2705 (define-public python2-cssmin
2706 (package-with-python2 python-cssmin))
2707
2708 (define-public python-elasticsearch
2709 (package
2710 (name "python-elasticsearch")
2711 (version "7.1.0")
2712 (source
2713 (origin
2714 (method url-fetch)
2715 (uri (pypi-uri "elasticsearch" version))
2716 (sha256
2717 (base32
2718 "0rnjvlhw4v3vg14l519qliy1s1zpmx3827q0xfviwvk42rr7hh01"))))
2719 (build-system python-build-system)
2720 (native-inputs
2721 `(("python-mock" ,python-mock)
2722 ("python-nosexcover" ,python-nosexcover)
2723 ("python-pyaml" ,python-pyaml)
2724 ("python-requests" ,python-requests)))
2725 (propagated-inputs
2726 `(("urllib3" ,python-urllib3)))
2727 (arguments
2728 ;; tests require the test_elasticsearch module but it is not distributed.
2729 `(#:tests? #f))
2730 (home-page "https://github.com/elastic/elasticsearch-py")
2731 (synopsis "Low-level client for Elasticsearch")
2732 (description "Official low-level client for Elasticsearch. Its goal is to
2733 provide common ground for all Elasticsearch-related code in Python; because of
2734 this it tries to be opinion-free and very extendable.")
2735 (license license:expat)))
2736
2737 (define-public python2-elasticsearch
2738 (package-with-python2 python-elasticsearch))
2739
2740 (define-public python-flask-script
2741 (package
2742 (name "python-flask-script")
2743 (version "2.0.6")
2744 (source
2745 (origin
2746 (method url-fetch)
2747 (uri (pypi-uri "Flask-Script" version))
2748 (sha256
2749 (base32
2750 "0r8w2v89nj6b9p91p495cga5m72a673l2wc0hp0zqk05j4yrc9b4"))))
2751 (build-system python-build-system)
2752 (arguments
2753 `(#:phases
2754 (modify-phases %standard-phases
2755 (add-after 'unpack 'patch-tests
2756 (lambda _
2757 (substitute* "tests.py"
2758 (("flask\\.ext\\.script") "flask_script"))
2759 #t)))))
2760 (propagated-inputs
2761 `(("python-flask" ,python-flask)
2762 ("python-argcomplete" ,python-argcomplete)
2763 ("python-werkzeug" ,python-werkzeug)))
2764 (native-inputs
2765 `(("python-pytest" ,python-pytest)))
2766 (home-page
2767 "https://github.com/smurfix/flask-script")
2768 (synopsis "Scripting support for Flask")
2769 (description "The Flask-Script extension provides support for writing
2770 external scripts in Flask. This includes running a development server,
2771 a customised Python shell, scripts to set up your database, cronjobs,
2772 and other command-line tasks that belong outside the web application
2773 itself.")
2774 (license license:bsd-3)))
2775
2776 (define-public python2-flask-script
2777 (package-with-python2 python-flask-script))
2778
2779 (define-public python-flask-migrate
2780 (package
2781 (name "python-flask-migrate")
2782 (version "2.5.3")
2783 (source
2784 (origin
2785 (method url-fetch)
2786 (uri (pypi-uri "Flask-Migrate" version))
2787 (sha256
2788 (base32
2789 "1vip9ww6l18dxffjsggm83k71zkvihxpnhaswpv8klh95s6517d6"))))
2790 (build-system python-build-system)
2791 (propagated-inputs
2792 `(("python-flask" ,python-flask)
2793 ("python-alembic" ,python-alembic)
2794 ("python-sqlalchemy" ,python-sqlalchemy)
2795 ("python-flask-script" ,python-flask-script)
2796 ("python-flask-sqlalchemy" ,python-flask-sqlalchemy)))
2797 (home-page "https://github.com/miguelgrinberg/flask-migrate/")
2798 (synopsis "SQLAlchemy database migrations for Flask programs using
2799 Alembic")
2800 (description "This package contains SQLAlchemy database migration tools
2801 for Flask programs that are using @code{python-alembic}.")
2802 (license license:expat)))
2803
2804 (define-public python-genshi
2805 (package
2806 (name "python-genshi")
2807 (version "0.7.3")
2808 (source
2809 (origin
2810 (method git-fetch)
2811 (uri (git-reference
2812 (url "https://github.com/edgewall/genshi")
2813 (commit version)))
2814 (file-name (git-file-name name version))
2815 (sha256
2816 (base32 "04bw7nd4wyn8ixnhik57hny2xpjjpn80k5hp6691inix5gc6rxaf"))))
2817 (build-system python-build-system)
2818 (home-page "https://genshi.edgewall.org/")
2819 (synopsis "Toolkit for generation of output for the web")
2820 (description "Genshi is a Python library that provides an integrated set
2821 of components for parsing, generating, and processing HTML, XML or other
2822 textual content for output generation on the web.")
2823 (license license:bsd-3)))
2824
2825 (define-public python2-genshi
2826 (package-with-python2 python-genshi))
2827
2828 (define-public python-flask-principal
2829 (package
2830 (name "python-flask-principal")
2831 (version "0.4.0")
2832 (source
2833 (origin
2834 (method url-fetch)
2835 (uri (pypi-uri "Flask-Principal" version))
2836 (sha256
2837 (base32
2838 "0lwlr5smz8vfm5h9a9i7da3q1c24xqc6vm9jdywdpgxfbi5i7mpm"))))
2839 (build-system python-build-system)
2840 (propagated-inputs
2841 `(("python-blinker" ,python-blinker)))
2842 (native-inputs
2843 `(("python-flask" ,python-flask)
2844 ("python-nose" ,python-nose)))
2845 (home-page "https://pythonhosted.org/Flask-Principal/")
2846 (synopsis "Identity management for Flask")
2847 (description "@code{flask_principal} is a identity management library for
2848 Flask. It supports managing both authentication and authorization data in a
2849 thread-local variable.")
2850 (license license:expat)))
2851
2852 (define-public python2-flask-principal
2853 (package-with-python2 python-flask-principal))
2854
2855 (define-public python-flask-httpauth
2856 (package
2857 (name "python-flask-httpauth")
2858 (version "3.2.3")
2859 (source
2860 (origin
2861 (method url-fetch)
2862 (uri (pypi-uri "Flask-HTTPAuth" version))
2863 (sha256
2864 (base32
2865 "13gff5w1mqpzm5nccyg02v3ifb9ifqh5k866cssjhghhg6msfjsz"))))
2866 (build-system python-build-system)
2867 (native-inputs
2868 `(("python-flask" ,python-flask)))
2869 (home-page "https://github.com/miguelgrinberg/flask-httpauth/")
2870 (synopsis "Basic and Digest HTTP authentication for Flask routes")
2871 (description "@code{flask_httpauth} provides Basic and Digest HTTP
2872 authentication for Flask routes.")
2873 (license license:expat)))
2874
2875 (define-public python2-flask-httpauth
2876 (package-with-python2 python-flask-httpauth))
2877
2878 (define-public python-uritemplate
2879 (package
2880 (name "python-uritemplate")
2881 (version "3.0.0")
2882 (source
2883 (origin
2884 (method url-fetch)
2885 (uri (pypi-uri "uritemplate" version))
2886 (sha256
2887 (base32
2888 "0781gm9g34wa0asc19dx81ng0nqq07igzv3bbvdqmz13pv7469n0"))))
2889 (build-system python-build-system)
2890 (home-page "https://uritemplate.readthedocs.org")
2891 (synopsis "Library to deal with URI Templates")
2892 (description "@code{uritemplate} provides Python library to deal with URI
2893 Templates.")
2894 (license license:bsd-2)))
2895
2896 (define-public python2-uritemplate
2897 (package-with-python2 python-uritemplate))
2898
2899 (define-public python-publicsuffix
2900 (package
2901 (name "python-publicsuffix")
2902 (version "1.1.0")
2903 (source (origin
2904 (method url-fetch)
2905 (uri (pypi-uri "publicsuffix" version))
2906 (sha256
2907 (base32
2908 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
2909 (build-system python-build-system)
2910 (arguments
2911 `(#:tests? #f)) ; tests use the internet
2912 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
2913 (synopsis "Get suffix for a domain name")
2914 (description "Get a public suffix for a domain name using the Public Suffix
2915 List.")
2916 (license license:expat)))
2917
2918 (define-public python2-publicsuffix
2919 (package-with-python2 python-publicsuffix))
2920
2921 (define-public python-publicsuffix2
2922 (package
2923 (name "python-publicsuffix2")
2924 (version "2.20191221")
2925 (source
2926 (origin
2927 (method url-fetch)
2928 (uri (pypi-uri "publicsuffix2" version))
2929 (sha256
2930 (base32 "0yzysvfj1najr1mb4pcqrbmjir3xpb69rlffln95a3cdm8qwry00"))))
2931 (build-system python-build-system)
2932 (arguments
2933 '(#:phases
2934 (modify-phases %standard-phases
2935 (add-after 'unpack 'ignore-maintainer-inputs
2936 (lambda _
2937 ;; Comment out a demand for python-requests, which is used only by
2938 ;; the unused ‘update_psl’ helper command.
2939 (substitute* "setup.py"
2940 (("'requests " match)
2941 (format #f "# ~a" match)))
2942 #t)))
2943 #:tests? #f)) ; the test suite requires network access
2944 (home-page "https://github.com/pombredanne/python-publicsuffix2")
2945 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
2946 (description "Get a public suffix for a domain name using the Public Suffix
2947 List. Forked from and using the same API as the publicsuffix package.")
2948 (license (list license:expat license:mpl2.0))))
2949
2950 (define-public python2-publicsuffix2
2951 (package-with-python2 python-publicsuffix2))
2952
2953 (define-public python-werkzeug
2954 (package
2955 (name "python-werkzeug")
2956 (version "1.0.0")
2957 (source
2958 (origin
2959 (method url-fetch)
2960 (uri (pypi-uri "Werkzeug" version))
2961 (sha256
2962 (base32
2963 "15kh0z61klp62mrc1prka13xsshxn0rsp1j1s2964iw86yisi6qn"))))
2964 (build-system python-build-system)
2965 (arguments
2966 '(#:phases
2967 (modify-phases %standard-phases
2968 (delete 'check)
2969 (add-after 'install 'check
2970 (lambda* (#:key inputs outputs #:allow-other-keys)
2971 (add-installed-pythonpath inputs outputs)
2972 (invoke "python" "-m" "pytest"))))))
2973 (propagated-inputs
2974 `(("python-requests" ,python-requests)))
2975 (native-inputs
2976 `(("python-pytest" ,python-pytest)
2977 ("python-pytest-timeout" ,python-pytest-timeout)))
2978 (home-page "https://www.palletsprojects.org/p/werkzeug/")
2979 (synopsis "Utilities for WSGI applications")
2980 (description "One of the most advanced WSGI utility modules. It includes a
2981 powerful debugger, full-featured request and response objects, HTTP utilities to
2982 handle entity tags, cache control headers, HTTP dates, cookie handling, file
2983 uploads, a powerful URL routing system and a bunch of community-contributed
2984 addon modules.")
2985 (license license:x11)))
2986
2987 (define-public python2-werkzeug
2988 (package-with-python2 python-werkzeug))
2989
2990 (define-public python-bottle
2991 (package
2992 (name "python-bottle")
2993 (version "0.12.18")
2994 (source
2995 (origin
2996 (method url-fetch)
2997 (uri (pypi-uri "bottle" version))
2998 (sha256
2999 (base32
3000 "17pn43kzr7m6czjbm4nda7kzs4ap9mmb30qfbhifyzas2i5vf688"))))
3001 (build-system python-build-system)
3002 (home-page "http://bottlepy.org/")
3003 (synopsis "WSGI framework for small web-applications.")
3004 (description "@code{python-bottle} is a WSGI framework for small web-applications.")
3005 (license license:expat)))
3006
3007 (define-public python2-bottle
3008 (package-with-python2 python-bottle))
3009
3010 (define-public python-wtforms
3011 (package
3012 (name "python-wtforms")
3013 (version "2.1")
3014 (source
3015 (origin
3016 (method url-fetch)
3017 (uri (pypi-uri "WTForms" version ".zip"))
3018 (sha256
3019 (base32
3020 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
3021 (build-system python-build-system)
3022 (arguments
3023 '(#:phases
3024 (modify-phases %standard-phases
3025 (add-after 'unpack 'remove-django-test
3026 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
3027 (lambda _
3028 (substitute*
3029 "tests/runtests.py"
3030 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
3031 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
3032 #t)))))
3033 (native-inputs
3034 `(("unzip" ,unzip)))
3035 (home-page "http://wtforms.simplecodes.com/")
3036 (synopsis
3037 "Form validation and rendering library for Python web development")
3038 (description
3039 "WTForms is a flexible forms validation and rendering library
3040 for Python web development. It is very similar to the web form API
3041 available in Django, but is a standalone package.")
3042 (license license:bsd-3)))
3043
3044 (define-public python2-wtforms
3045 (package-with-python2 python-wtforms))
3046
3047 (define-public python-paste
3048 (package
3049 (name "python-paste")
3050 (version "3.0.6")
3051 (source
3052 (origin
3053 (method url-fetch)
3054 (uri (pypi-uri "Paste" version))
3055 (sha256
3056 (base32
3057 "14lbi9asn5agsdf7r97prkjpz7amgmp529lbvfhf0nv881xczah6"))
3058 (patches (search-patches "python-paste-remove-timing-test.patch"))
3059 (modules '((guix build utils)))
3060 (snippet
3061 '(begin
3062 ;; This test calls out to the internet.
3063 (delete-file "tests/test_proxy.py") #t))))
3064 (build-system python-build-system)
3065 (native-inputs
3066 `(("python-pytest" ,python-pytest)
3067 ("python-pytest-runner" ,python-pytest-runner)
3068 ("python-nose" ,python-nose)))
3069 (propagated-inputs
3070 `(("python-six" ,python-six)))
3071 (home-page "https://pythonpaste.readthedocs.io/")
3072 (synopsis
3073 "Python web development tools, focusing on WSGI")
3074 (description
3075 "Paste provides a variety of web development tools and middleware which
3076 can be nested together to build web applications. Paste's design closely
3077 follows ideas flowing from WSGI (Web Standard Gateway Interface).")
3078 (license license:expat)))
3079
3080 (define-public python2-paste
3081 (package-with-python2 python-paste))
3082
3083 (define-public python-pastescript
3084 (package
3085 (name "python-pastescript")
3086 (version "2.0.2")
3087 (source
3088 (origin
3089 (method url-fetch)
3090 (uri (pypi-uri "PasteScript" version))
3091 (sha256
3092 (base32
3093 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
3094 (build-system python-build-system)
3095 (native-inputs
3096 `(("python-nose" ,python-nose)))
3097 (propagated-inputs
3098 `(("python-paste" ,python-paste)
3099 ("python-pastedeploy" ,python-pastedeploy)))
3100 (home-page (string-append "https://web.archive.org/web/20161025192515/"
3101 "http://pythonpaste.org/script/"))
3102 (arguments
3103 '(;; Unfortunately, this requires the latest unittest2,
3104 ;; but that requires traceback2 which requires linecache2 which requires
3105 ;; unittest2. So we're skipping tests for now.
3106 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
3107 ;; so in theory we could get around this situation somehow.)
3108 #:tests? #f))
3109 (synopsis
3110 "Pluggable command line tool for serving web applications and more")
3111 (description
3112 "PasteScript is a plugin-friendly command line tool which provides a
3113 variety of features, from launching web applications to bootstrapping project
3114 layouts.")
3115 (license license:expat)))
3116
3117 (define-public python2-pastescript
3118 (package-with-python2 python-pastescript))
3119
3120 (define-public python2-urlgrabber
3121 (package
3122 (name "python2-urlgrabber")
3123 (version "3.10.2")
3124 (source
3125 (origin
3126 (method url-fetch)
3127 (uri (pypi-uri "urlgrabber" version))
3128 (sha256
3129 (base32 "0w1h7hlsq406bxfy2pn4i9bd003bwl0q9b7p03z3g6yl0d21ddq5"))))
3130 (build-system python-build-system)
3131 (arguments `(#:python ,python-2)) ; urlgrabber supports python2 only
3132 (home-page "http://urlgrabber.baseurl.org")
3133 (synopsis "High-level cross protocol url-grabber")
3134 (description "@code{urlgrabber} is Python2 library that unifies access to
3135 files available on web, FTP or locally. It supports HTTP, FTP and file://
3136 protocols, it supports features like HTTP keep-alive, reget, throttling and
3137 more.")
3138 (license license:lgpl2.1+)))
3139
3140 (define-public python-pycares
3141 (package
3142 (name "python-pycares")
3143 (version "2.3.0")
3144 (source
3145 (origin
3146 (method url-fetch)
3147 (uri (pypi-uri "pycares" version))
3148 (sha256
3149 (base32
3150 "0h4fxw5drrhfyslzmfpljk0qnnpbhhb20hnnndzahhbwylyw1x1n"))))
3151 (build-system python-build-system)
3152 (arguments
3153 `(#:tests? #f)) ;tests require internet access
3154 (home-page "https://github.com/saghul/pycares")
3155 (synopsis "Python interface for @code{c-ares}")
3156 (description "@code{pycares} is a Python module which provides an
3157 interface to @code{c-ares}, a C library that performs DNS requests and
3158 name resolutions asynchronously.")
3159 (license license:expat)))
3160
3161 (define-public python-yarl
3162 (package
3163 (name "python-yarl")
3164 (version "1.1.1")
3165 (source
3166 (origin
3167 (method url-fetch)
3168 (uri (pypi-uri "yarl" version))
3169 (sha256
3170 (base32
3171 "1s6z13g8vgxfkkqwhn6imnm7pl7ky9arv4jygnn6bcndcbidg7d6"))))
3172 (build-system python-build-system)
3173 (native-inputs
3174 `(("python-pytest" ,python-pytest)
3175 ("python-pytest-runner" ,python-pytest-runner)))
3176 (propagated-inputs
3177 `(("python-idna" ,python-idna)
3178 ("python-multidict" ,python-multidict)))
3179 (home-page "https://github.com/aio-libs/yarl/")
3180 (synopsis "Yet another URL library")
3181 (description "@code{yarl} module provides handy @code{URL} class
3182 for URL parsing and changing.")
3183 (license license:asl2.0)))
3184
3185 (define-public python-google-api-client
3186 (package
3187 (name "python-google-api-client")
3188 (version "1.6.7")
3189 (source
3190 (origin
3191 (method url-fetch)
3192 (uri (pypi-uri "google-api-python-client" version))
3193 (sha256
3194 (base32
3195 "1wpbbbxfpy9mwxdy3kn352cb590ladv574j1aa2l4grjdqw3ln05"))))
3196 (build-system python-build-system)
3197 (arguments
3198 '(#:tests? #f)) ; tests require internet access
3199 (native-inputs
3200 `(("python-httplib2" ,python-httplib2)
3201 ("python-six" ,python-six)
3202 ("python-oauth2client" ,python-oauth2client)
3203 ("python-uritemplate" ,python-uritemplate)))
3204 (home-page "https://github.com/google/google-api-python-client")
3205 (synopsis "Core Python library for accessing Google APIs")
3206 (description "Python client library for Google's discovery based APIs")
3207 (license license:asl2.0)))
3208
3209 (define-public python2-google-api-client
3210 (package-with-python2 python-google-api-client))
3211
3212 (define-public python-hawkauthlib
3213 (package
3214 (name "python-hawkauthlib")
3215 (version "2.0.0")
3216 (source
3217 (origin
3218 (method url-fetch)
3219 (uri (pypi-uri "hawkauthlib" version))
3220 (sha256
3221 (base32
3222 "03ai47s4h8nfnrf25shbfvkm1b9n1ccd4nmmj280sg1fayi69zgg"))))
3223 (build-system python-build-system)
3224 (propagated-inputs
3225 `(("python-requests" ,python-requests)
3226 ("python-webob" ,python-webob)))
3227 (home-page "https://github.com/mozilla-services/hawkauthlib")
3228 (synopsis "Hawk Access Authentication protocol")
3229 (description
3230 "This is a low-level Python library for implementing Hawk Access Authentication,
3231 a simple HTTP request-signing scheme.")
3232 (license license:mpl2.0)))
3233
3234 (define-public python-pybrowserid
3235 (package
3236 (name "python-pybrowserid")
3237 (version "0.14.0")
3238 (source
3239 (origin
3240 (method url-fetch)
3241 (uri (pypi-uri "PyBrowserID" version))
3242 (sha256
3243 (base32
3244 "1qvi79kfb8x9kxkm5lw2mp42hm82cpps1xknmsb5ghkwx1lpc8kc"))))
3245 (build-system python-build-system)
3246 (propagated-inputs
3247 `(("python-requests" ,python-requests)))
3248 (native-inputs
3249 `(("python-mock" ,python-mock)))
3250 (home-page "https://github.com/mozilla/PyBrowserID")
3251 (synopsis "Python library for the BrowserID protocol")
3252 (description
3253 "This is a Python client library for the BrowserID protocol that
3254 underlies Mozilla Persona.")
3255 (license license:mpl2.0)))
3256
3257 (define-public python-pyfxa
3258 (package
3259 (name "python-pyfxa")
3260 (version "0.6.0")
3261 (source
3262 (origin
3263 (method url-fetch)
3264 (uri (pypi-uri "PyFxA" version))
3265 (sha256
3266 (base32
3267 "0axl16fyrz2r88gnw4b12mk7dpkqscv8c4wsc1y5hicl7bsbc4fm"))))
3268 (build-system python-build-system)
3269 (arguments '(#:tests? #f)) ; 17 tests require network access
3270 (propagated-inputs
3271 `(("python-cryptography" ,python-cryptography)
3272 ("python-hawkauthlib" ,python-hawkauthlib)
3273 ("python-pybrowserid" ,python-pybrowserid)
3274 ("python-requests" ,python-requests)
3275 ("python-six" ,python-six)))
3276 (native-inputs
3277 `(("python-grequests" ,python-grequests)
3278 ("python-mock" ,python-mock)
3279 ("python-responses" ,python-responses)
3280 ("python-unittest2" ,python-unittest2)))
3281 (home-page "https://github.com/mozilla/PyFxA")
3282 (synopsis "Firefox Accounts client library for Python")
3283 (description
3284 "This is a Python library for interacting with the Firefox Accounts
3285 ecosystem.")
3286 (license license:mpl2.0)))
3287
3288 (define-public python-hyperlink
3289 (package
3290 (name "python-hyperlink")
3291 (version "19.0.0")
3292 (source
3293 (origin
3294 (method url-fetch)
3295 (uri (pypi-uri "hyperlink" version))
3296 (sha256
3297 (base32
3298 "0m2nhi0j8wmgfscf974wd5v1xfq8mah286hil6npy1ys0m3y7222"))))
3299 (build-system python-build-system)
3300 (propagated-inputs
3301 `(("python-idna" ,python-idna)))
3302 (home-page "https://github.com/python-hyper/hyperlink")
3303 (synopsis "Python module to create immutable URLs according to spec")
3304 (description "This package provides a Python module to create immutable, and
3305 correct URLs for Python according to RFCs 3986 and 3987.")
3306 (license license:expat)))
3307
3308 (define-public python-treq
3309 (package
3310 (name "python-treq")
3311 (version "18.6.0")
3312 (source
3313 (origin
3314 (method url-fetch)
3315 (uri (pypi-uri "treq" version))
3316 (sha256
3317 (base32
3318 "0j4zwq9p1c9piv1vc66nxcv9s6hdinf90jwkbsm91k14npv9zq4i"))))
3319 (build-system python-build-system)
3320 (propagated-inputs
3321 `(("python-attrs" ,python-attrs)
3322 ("python-idna" ,python-idna)
3323 ("python-incremental" ,python-incremental)
3324 ("python-requests" ,python-requests)
3325 ("python-service-identity" ,python-service-identity)
3326 ("python-twisted" ,python-twisted)))
3327 (home-page "https://github.com/twisted/treq")
3328 (synopsis "Requests-like API built on top of twisted.web's Agent")
3329 (description "This package provides an HTTP library inspired by
3330 @code{requests}} but written on top of Twisted's @code{Agents}. It offers a
3331 high level API for making HTTP requests when using Twisted.")
3332 (license license:expat)))
3333
3334 (define-public python-autobahn
3335 (package
3336 (name "python-autobahn")
3337 (version "19.2.1")
3338 (source
3339 (origin
3340 (method url-fetch)
3341 (uri (pypi-uri "autobahn" version))
3342 (sha256
3343 (base32
3344 "1mm7j24ls01c7jb1ad5p5cpyxvzgydiyf8b04ihykh2v8g98j0x7"))))
3345 (build-system python-build-system)
3346 (arguments
3347 ;; The tests fail to run:
3348 ;; https://github.com/crossbario/autobahn-python/issues/1117
3349 `(#:tests? #f))
3350 (propagated-inputs
3351 `(("python-cffi" ,python-cffi)
3352 ("python-twisted" ,python-twisted)
3353 ("python-txaio" ,python-txaio)))
3354 (home-page "https://crossbar.io/autobahn/")
3355 (synopsis "Web Application Messaging Protocol implementation")
3356 (description "This package provides an implementation of the @dfn{Web Application
3357 Messaging Protocol} (WAMP). WAMP connects components in distributed
3358 applications using Publish and Subscribe (PubSub) and routed Remote Procedure
3359 Calls (rRPC). It is ideal for distributed, multi-client and server applications
3360 such as IoT applications or multi-user database-driven business applications.")
3361 (license license:expat)))
3362
3363 (define-public python-ws4py
3364 (package
3365 (name "python-ws4py")
3366 (version "0.5.1")
3367 (source
3368 (origin
3369 (method url-fetch)
3370 (uri (pypi-uri "ws4py" version))
3371 (sha256
3372 (base32
3373 "10slbbf2jm4hpr92jx7kh7mhf48sjl01v2w4d8z3f1p0ybbp7l19"))))
3374 (build-system python-build-system)
3375 (arguments
3376 `(#:phases
3377 (modify-phases %standard-phases
3378 (add-after 'unpack 'python3.7-compatibility
3379 (lambda _
3380 (substitute* '("ws4py/server/tulipserver.py"
3381 "ws4py/async_websocket.py")
3382 (("asyncio.async")
3383 "asyncio.ensure_future"))
3384 #t))
3385 ;; We don't have a package for cherrypy.
3386 (add-after 'unpack 'remove-cherrypy-support
3387 (lambda _
3388 (delete-file "ws4py/server/cherrypyserver.py")
3389 #t)))))
3390 (propagated-inputs
3391 `(("python-gevent" ,python-gevent)
3392 ("python-tornado" ,python-tornado)))
3393 (home-page "https://github.com/Lawouach/WebSocket-for-Python")
3394 (synopsis "WebSocket client and server library")
3395 (description
3396 "This package provides a WebSocket client and server library for
3397 Python.")
3398 (license license:bsd-3)))
3399
3400 (define-public python-slugify
3401 (package
3402 (name "python-slugify")
3403 (version "3.0.4")
3404 (source
3405 (origin
3406 (method url-fetch)
3407 (uri (pypi-uri "python-slugify" version))
3408 (sha256
3409 (base32 "0dv97yi5fq074q5qyqbin09pmi8ixg36caf5nkpw2bqkd8jh6pap"))
3410 (patches
3411 (search-patches "python-slugify-depend-on-unidecode.patch"))))
3412 (native-inputs
3413 `(("python-wheel" ,python-wheel)))
3414 (propagated-inputs
3415 `(("python-unidecode" ,python-unidecode)))
3416 (arguments
3417 `(#:phases
3418 (modify-phases %standard-phases
3419 (replace 'check
3420 (lambda _
3421 (invoke "python" "test.py"))))))
3422 (build-system python-build-system)
3423 (home-page "https://github.com/un33k/python-slugify")
3424 (synopsis "Python Slugify application that handles Unicode")
3425 (description "This package provides a @command{slufigy} command and
3426 library to create slugs from unicode strings while keeping it DRY.")
3427 (license license:expat)))
3428
3429 (define-public python-branca
3430 (package
3431 (name "python-branca")
3432 (version "0.3.1")
3433 (source
3434 (origin
3435 (method url-fetch)
3436 (uri (pypi-uri "branca" version))
3437 (sha256
3438 (base32
3439 "0pmigd521j2228xf8x34vbx0niwvms7xl7za0lymywj0vydjqxiy"))))
3440 (build-system python-build-system)
3441 (propagated-inputs
3442 `(("python-jinja2" ,python-jinja2)
3443 ("python-six" ,python-six)))
3444 (native-inputs
3445 `(("python-pytest" ,python-pytest)))
3446 (home-page "https://github.com/python-visualization/branca")
3447 (synopsis "Generate complex HTML+JS pages with Python")
3448 (description "Generate complex HTML+JS pages with Python")
3449 (license license:expat)))
3450
3451 (define-public python-tinycss2
3452 (package
3453 (name "python-tinycss2")
3454 (version "1.0.2")
3455 (source
3456 (origin
3457 (method url-fetch)
3458 (uri (pypi-uri "tinycss2" version))
3459 (patches (search-patches "python-tinycss2-flake8-compat.patch"))
3460 (sha256
3461 (base32 "1kw84y09lggji4krkc58jyhsfj31w8npwhznr7lf19d0zbix09v4"))))
3462 (build-system python-build-system)
3463 (arguments
3464 `(#:phases
3465 (modify-phases %standard-phases
3466 (replace 'check
3467 (lambda _ (invoke "pytest"))))))
3468 (propagated-inputs
3469 `(("python-webencodings" ,python-webencodings)))
3470 (native-inputs
3471 `(("python-pytest-flake8" ,python-pytest-flake8)
3472 ("python-pytest-isort" ,python-pytest-isort)
3473 ("python-pytest-runner" ,python-pytest-runner)))
3474 (home-page "https://tinycss2.readthedocs.io/")
3475 (synopsis "Low-level CSS parser for Python")
3476 (description "@code{tinycss2} can parse strings, return Python objects
3477 representing tokens and blocks, and generate CSS strings corresponding to
3478 these objects.
3479
3480 Based on the CSS Syntax Level 3 specification, @code{tinycss2} knows the
3481 grammar of CSS but doesn’t know specific rules, properties or values supported
3482 in various CSS modules.")
3483 (license license:bsd-3)))
3484
3485 (define-public python-cssselect2
3486 (package
3487 (name "python-cssselect2")
3488 (version "0.2.2")
3489 (source
3490 (origin
3491 (method url-fetch)
3492 (uri (pypi-uri "cssselect2" version))
3493 (sha256
3494 (base32 "0skymzb4ncrm2zdsy80f53vi0arf776lvbp51hzh4ayp1il5lj3h"))))
3495 (build-system python-build-system)
3496 (arguments
3497 `(#:phases
3498 (modify-phases %standard-phases
3499 (replace 'check
3500 (lambda _ (invoke "pytest"))))))
3501 (propagated-inputs
3502 `(("python-tinycss2" ,python-tinycss2)))
3503 (native-inputs
3504 `(("python-pytest-cov" ,python-pytest-cov)
3505 ("python-pytest-flake8" ,python-pytest-flake8)
3506 ("python-pytest-isort" ,python-pytest-isort)
3507 ("python-pytest-runner" ,python-pytest-runner)))
3508 (home-page "https://cssselect2.readthedocs.io/")
3509 (synopsis "CSS selectors for Python ElementTree")
3510 (description "@code{cssselect2} is a straightforward implementation of
3511 CSS3 Selectors for markup documents (HTML, XML, etc.) that can be read by
3512 ElementTree-like parsers (including cElementTree, lxml, html5lib, etc.).
3513
3514 Unlike the Python package @code{cssselect}, it does not translate selectors to
3515 XPath and therefore does not have all the correctness corner cases that are
3516 hard or impossible to fix in cssselect.")
3517 (license license:bsd-3)))
3518
3519 (define-public gunicorn
3520 (package
3521 (name "gunicorn")
3522 (version "20.0.4")
3523 (source
3524 (origin
3525 (method url-fetch)
3526 (uri (pypi-uri "gunicorn" version))
3527 (sha256
3528 (base32
3529 "09n6fc019bgrvph1s5h1lwhn2avcsprw6ncd203qhra3i8mvn10r"))))
3530 (outputs '("out" "doc"))
3531 (build-system python-build-system)
3532 (arguments
3533 `(#:phases
3534 (modify-phases %standard-phases
3535 (add-after 'build 'build-doc
3536 (lambda _
3537 (invoke "make" "-C" "docs" "PAPER=a4" "html" "info")
3538 (delete-file "docs/build/texinfo/Makefile")
3539 (delete-file "docs/build/texinfo/Gunicorn.texi")
3540 #t))
3541 (replace 'check
3542 (lambda _
3543 (setenv "PYTHONPATH"
3544 (string-append ".:" (getenv "PYTHONPATH")))
3545 (invoke "pytest")))
3546 (add-after 'install 'install-doc
3547 (lambda* (#:key outputs #:allow-other-keys)
3548 (let* ((doc (string-append (assoc-ref outputs "doc")
3549 "/share/doc/" ,name "-" ,version))
3550 (html (string-append doc "/html"))
3551 (info (string-append doc "/info"))
3552 (examples (string-append doc "/examples")))
3553 (mkdir-p html)
3554 (mkdir-p info)
3555 (mkdir-p examples)
3556 (copy-recursively "docs/build/html" html)
3557 (copy-recursively "docs/build/texinfo" info)
3558 (copy-recursively "examples" examples)
3559 (for-each (lambda (file)
3560 (copy-file file (string-append doc "/" file)))
3561 '("README.rst" "NOTICE" "LICENSE" "THANKS")))
3562 #t)))))
3563 (native-inputs
3564 `(("binutils" ,binutils) ;; for ctypes.util.find_library()
3565 ("python-aiohttp", python-aiohttp)
3566 ("python-pytest" ,python-pytest)
3567 ("python-pytest-cov" ,python-pytest-cov)
3568 ("python-sphinx" ,python-sphinx)
3569 ("texinfo" ,texinfo)))
3570 (home-page "https://gunicorn.org/")
3571 (synopsis "Python WSGI HTTP Server for UNIX")
3572 (description "Gunicorn ‘Green Unicorn’ is a Python WSGI HTTP
3573 Server for UNIX. It’s a pre-fork worker model ported from Ruby’s
3574 Unicorn project. The Gunicorn server is broadly compatible with
3575 various web frameworks, simply implemented, light on server resources,
3576 and fairly speedy.")
3577 (license license:expat)))
3578
3579 ;; break cyclic dependency for python-aiohttp, which depends on gunicorn for
3580 ;; its tests
3581 (define-public gunicorn-bootstrap
3582 (package
3583 (inherit gunicorn)
3584 (name "gunicorn")
3585 (arguments `(#:tests? #f))
3586 (properties '((hidden? . #t)))
3587 (native-inputs `())))
3588
3589 (define-public python-translation-finder
3590 (package
3591 (name "python-translation-finder")
3592 (version "1.7")
3593 (source
3594 (origin
3595 (method url-fetch)
3596 (uri (pypi-uri "translation-finder" version))
3597 (sha256
3598 (base32
3599 "1pcy9z8gmb8x41gjhw9x0lkr0d2mv5mdxcs2hwg6q8mxs857j589"))))
3600 (build-system python-build-system)
3601 (arguments
3602 `(#:phases
3603 (modify-phases %standard-phases
3604 (add-before 'build 'remove-failing-test
3605 (lambda _
3606 (delete-file "translation_finder/test_api.py")
3607 #t)))))
3608 (propagated-inputs
3609 `(("python-chardet" ,python-chardet)
3610 ("python-pathlib2" ,python-pathlib2)
3611 ("python-ruamel.yaml" ,python-ruamel.yaml)
3612 ("python-six" ,python-six)))
3613 (native-inputs
3614 `(("python-codecov" ,python-codecov)
3615 ("python-codacy-coverage" ,python-codacy-coverage)
3616 ("python-pytest-cov" ,python-pytest-cov)
3617 ("python-pytest-runner" ,python-pytest-runner)
3618 ("python-twine" ,python-twine)))
3619 (home-page "https://weblate.org/")
3620 (synopsis "Translation file finder for Weblate")
3621 (description "This package provides a function to find translation file in
3622 the source code of a project. It supports many translation file formats and
3623 is part of the Weblate translation platform.")
3624 (license license:gpl3+)))
3625
3626 (define-public python-gitlab
3627 (package
3628 (name "python-gitlab")
3629 (version "1.15.0")
3630 (source
3631 (origin
3632 (method url-fetch)
3633 (uri (pypi-uri "python-gitlab" version))
3634 (sha256
3635 (base32
3636 "0zl6kz8v8cg1bcy2r78b2snb0lpw0b573gdx2x1ps0nhsh75l4j5"))))
3637 (build-system python-build-system)
3638 (propagated-inputs
3639 `(("python-requests" ,python-requests)
3640 ("python-six" ,python-six)))
3641 (native-inputs
3642 `(("python-httmock" ,python-httmock)
3643 ("python-mock" ,python-mock)))
3644 (home-page
3645 "https://github.com/python-gitlab/python-gitlab")
3646 (synopsis "Interact with GitLab API")
3647 (description "This package provides an extended library for interacting
3648 with GitLab instances through their API.")
3649 (license license:lgpl3+)))
3650
3651 (define-public python-path-and-address
3652 (package
3653 (name "python-path-and-address")
3654 (version "2.0.1")
3655 (source
3656 (origin
3657 ;; The source distributed on PyPI doesn't include tests.
3658 (method git-fetch)
3659 (uri (git-reference
3660 (url "https://github.com/joeyespo/path-and-address")
3661 (commit (string-append "v" version))))
3662 (file-name (git-file-name name version))
3663 (sha256
3664 (base32
3665 "0b0afpsaim06mv3lhbpm8fmawcraggc11jhzr6h72kdj1cqjk5h6"))))
3666 (build-system python-build-system)
3667 (arguments
3668 `(#:phases
3669 (modify-phases %standard-phases
3670 (replace 'check
3671 (lambda* (#:key inputs outputs #:allow-other-keys)
3672 (add-installed-pythonpath inputs outputs)
3673 (invoke "py.test"))))))
3674 (native-inputs
3675 `(("python-pytest" ,python-pytest)))
3676 (home-page "https://github.com/joeyespo/path-and-address")
3677 (synopsis "Functions for command-line server tools used by humans")
3678 (description "Path-and-address resolves ambiguities of command-line
3679 interfaces, inferring which argument is the path, and which is the address.")
3680 (license license:expat)))
3681
3682 (define-public grip
3683 ;; No release by upstream for quite some time, some bugs fixed since. See:
3684 ;; https://github.com/joeyespo/grip/issues/304
3685 (let ((commit "27a4d6d87ea1d0ea7f7f120de55baabee3de73e3"))
3686 (package
3687 (name "grip")
3688 (version (git-version "4.5.2" "1" commit))
3689 (source
3690 (origin
3691 (method git-fetch)
3692 (uri (git-reference
3693 (url "https://github.com/joeyespo/grip")
3694 (commit commit)))
3695 (file-name (git-file-name name version))
3696 (sha256
3697 (base32
3698 "0kx5hgb3q19i4l18a4vqdq9af390xgpk88lp2ay75qi96k0dc68w"))))
3699 (build-system python-build-system)
3700 (propagated-inputs
3701 `(("python-docopt" ,python-docopt)
3702 ("python-flask" ,python-flask)
3703 ("python-markdown" ,python-markdown)
3704 ("python-path-and-address" ,python-path-and-address)
3705 ("python-pygments" ,python-pygments)
3706 ("python-requests" ,python-requests)))
3707 (native-inputs
3708 `(("python-pytest" ,python-pytest)
3709 ("python-responses" ,python-responses)))
3710 (arguments
3711 `(#:phases
3712 (modify-phases %standard-phases
3713 (replace 'check
3714 (lambda* (#:key inputs outputs #:allow-other-keys)
3715 (add-installed-pythonpath inputs outputs)
3716 (setenv "PATH" (string-append
3717 (getenv "PATH") ":"
3718 (assoc-ref %outputs "out") "/bin"))
3719 (invoke "py.test" "-m" "not assumption"))))))
3720 (home-page "https://github.com/joeyespo/grip")
3721 (synopsis "Preview Markdown files using the GitHub API")
3722 (description "Grip is a command-line server application written in Python
3723 that uses the GitHub Markdown API to render a local Markdown file. The styles
3724 and rendering come directly from GitHub, so you'll know exactly how it will
3725 appear. Changes you make to the file will be instantly reflected in the browser
3726 without requiring a page refresh.")
3727 (license license:expat))))
3728
3729 (define-public python-port-for
3730 (package
3731 (name "python-port-for")
3732 (version "0.4")
3733 (source
3734 (origin
3735 (method url-fetch)
3736 (uri (pypi-uri "port-for" version))
3737 (sha256
3738 (base32
3739 "1pncxlj25ggw99r0ijfbkq70gd7cbhqdx5ivsxy4jdp0z14cpda7"))))
3740 (build-system python-build-system)
3741 (arguments
3742 `(#:phases
3743 (modify-phases %standard-phases
3744 (add-after 'unpack 'use-urllib3
3745 (lambda _
3746 (substitute* "port_for/_download_ranges.py"
3747 (("urllib2") "urllib3"))
3748 #t)))))
3749 (propagated-inputs
3750 `(("python-urllib3" ,python-urllib3)))
3751 (native-inputs
3752 `(("python-mock" ,python-mock)))
3753 (home-page "https://github.com/kmike/port-for/")
3754 (synopsis "TCP localhost port finder and association manager")
3755 (description
3756 "This package provides a utility that helps with local TCP ports
3757 management. It can find an unused TCP localhost port and remember the
3758 association.")
3759 (license license:expat)))
3760
3761 (define-public python-livereload
3762 (package
3763 (name "python-livereload")
3764 (version "2.6.1")
3765 (source
3766 (origin
3767 (method url-fetch)
3768 (uri (pypi-uri "livereload" version))
3769 (sha256
3770 (base32
3771 "0rhggz185bxc3zjnfpmhcvibyzi86i624za1lfh7x7ajsxw4y9c9"))))
3772 (build-system python-build-system)
3773 (propagated-inputs
3774 `(("python-six" ,python-six)
3775 ("python-tornado" ,python-tornado)))
3776 (home-page "https://github.com/lepture/python-livereload")
3777 (synopsis "Python LiveReload")
3778 (description
3779 "Python LiveReload provides a command line utility, @command{livereload},
3780 for starting a web server in a directory. It can trigger arbitrary commands
3781 and serve updated contents upon changes to the directory.")
3782 (license license:bsd-3)))
3783
3784 (define-public python-vf-1
3785 (package
3786 (name "python-vf-1")
3787 (version "0.0.11")
3788 (source
3789 (origin
3790 (method url-fetch)
3791 (uri (pypi-uri "VF-1" version))
3792 (sha256
3793 (base32
3794 "0xlqsaxsiayk1sd07kpz8abbcnab582y29a1y4882fq6j4gma5xi"))))
3795 (build-system python-build-system)
3796 (home-page "https://github.com/solderpunk/VF-1")
3797 (synopsis "Command line gopher client")
3798 (description "@code{VF-1} is a command line gopher client with
3799 @acronym{TLS, Transport Layer Security} support.")
3800 (license license:bsd-2)))
3801
3802 (define-public python-websockets
3803 (package
3804 (name "python-websockets")
3805 (version "8.1")
3806 (source
3807 (origin
3808 (method url-fetch)
3809 (uri (pypi-uri "websockets" version))
3810 (sha256
3811 (base32
3812 "03s3ml6sbki24aajllf8aily0xzrn929zxi84p50zkkbikdd4raw"))))
3813 (build-system python-build-system)
3814 (arguments '(#:tests? #f)) ; Tests not included in release tarball.
3815 (home-page "https://github.com/aaugustin/websockets")
3816 (synopsis
3817 "Python implementation of the WebSocket Protocol (RFC 6455 & 7692)")
3818 (description
3819 "@code{websockets} is a library for building WebSocket servers and clients
3820 in Python with a focus on correctness and simplicity.
3821
3822 Built on top of @code{asyncio}, Python's standard asynchronous I/O framework,
3823 it provides an elegant coroutine-based API.")
3824 (license license:bsd-3)))
3825
3826 (define-public python-selenium
3827 (package
3828 (name "python-selenium")
3829 (version "3.141.0")
3830 (source
3831 (origin
3832 (method url-fetch)
3833 (uri (pypi-uri "selenium" version))
3834 (sha256
3835 (base32
3836 "039hf9knvl4s3hp21bzwsp1g5ri9gxsh504dp48lc6nr1av35byy"))))
3837 (build-system python-build-system)
3838 (propagated-inputs
3839 `(("python-urllib3" ,python-urllib3)))
3840 (home-page
3841 "https://github.com/SeleniumHQ/selenium/")
3842 (synopsis "Python bindings for Selenium")
3843 (description "Selenium enables web browser automation.
3844 Selenium specifically provides infrastructure for the W3C WebDriver specification
3845 — a platform and language-neutral coding interface compatible with all
3846 major web browsers.")
3847 (license license:asl2.0)))
3848
3849 (define-public python-rapidjson
3850 (package
3851 (name "python-rapidjson")
3852 (version "0.9.1")
3853 (source
3854 (origin
3855 (method url-fetch)
3856 (uri (pypi-uri "python-rapidjson" version))
3857 (sha256
3858 (base32
3859 "18cl2dhx3gds5vg52jxmh9wjlbiy8dx06c3n482rfpdi9dzbv05d"))
3860 (modules '((guix build utils)))
3861 (snippet
3862 '(begin (delete-file-recursively "rapidjson") #t))))
3863 (build-system python-build-system)
3864 (arguments
3865 `(#:configure-flags
3866 (list (string-append "--rj-include-dir="
3867 (assoc-ref %build-inputs "rapidjson")
3868 "/include/rapidjson"))
3869 #:phases
3870 (modify-phases %standard-phases
3871 (replace 'build
3872 (lambda* (#:key inputs #:allow-other-keys)
3873 (invoke "python" "setup.py" "build"
3874 (string-append "--rj-include-dir="
3875 (assoc-ref %build-inputs "rapidjson")
3876 "/include/rapidjson"))))
3877 (replace 'check
3878 (lambda* (#:key inputs outputs #:allow-other-keys)
3879 (add-installed-pythonpath inputs outputs)
3880 ;; Some tests are broken.
3881 (delete-file "tests/test_base_types.py")
3882 (delete-file "tests/test_validator.py")
3883 (invoke "python" "-m" "pytest" "tests"))))))
3884 (native-inputs
3885 `(("rapidjson" ,rapidjson)
3886 ("python-pytest" ,python-pytest)
3887 ("python-pytz" ,python-pytz)))
3888 (home-page "https://github.com/python-rapidjson/python-rapidjson")
3889 (synopsis "Python wrapper around rapidjson")
3890 (description "This package provides a python wrapper around rapidjson.")
3891 (license license:expat)))
3892
3893 (define-public python-venusian
3894 (package
3895 (name "python-venusian")
3896 (version "3.0.0")
3897 (source
3898 (origin
3899 (method url-fetch)
3900 (uri (pypi-uri "venusian" version))
3901 (sha256
3902 (base32 "0f7f67dkgxxcjfhpdd5frb9pszkf04lyzzpn5069q0xi89r2p17n"))))
3903 (build-system python-build-system)
3904 (native-inputs
3905 `(("python-pytest" ,python-pytest)
3906 ("python-runner" ,python-pytest-runner)
3907 ("python-pytest-cov" ,python-pytest-cov)))
3908 (arguments '(#:test-target "pytest"))
3909 (home-page "https://docs.pylonsproject.org/projects/venusian")
3910 (synopsis "Library for defering decorator actions")
3911 (description
3912 "Venusian is a library which allows framework authors to defer decorator
3913 actions. Instead of taking actions when a function (or class) decorator is
3914 executed at import time, you can defer the action usually taken by the
3915 decorator until a separate scan phase.")
3916 (license license:repoze)))
3917
3918 (define-public python-zope-deprecation
3919 (package
3920 (name "python-zope-deprecation")
3921 (version "4.4.0")
3922 (source (origin
3923 (method url-fetch)
3924 (uri (pypi-uri "zope.deprecation" version))
3925 (sha256
3926 (base32
3927 "1pz2cv7gv9y1r3m0bdv7ks1alagmrn5msm5spwdzkb2by0w36i8d"))))
3928 (build-system python-build-system)
3929 (native-inputs `())
3930 (propagated-inputs `())
3931 (home-page "https://zopedeprecation.readthedocs.io/")
3932 (synopsis "Function for marking deprecations")
3933 (description "The @code{zope.deprecation} module provides a function for
3934 marking modules, classes, functions, methods and properties as deprecated,
3935 displaying warnings when usaged in application code.")
3936 (license license:zpl2.1)))
3937
3938 (define-public python-translationstring
3939 (package
3940 (name "python-translationstring")
3941 (version "1.3")
3942 (source (origin
3943 (method url-fetch)
3944 (uri (pypi-uri "translationstring" version))
3945 (sha256
3946 (base32
3947 "0bdpcnd9pv0131dl08h4zbcwmgc45lyvq3pa224xwan5b3x4rr2f"))))
3948 (build-system python-build-system)
3949 (home-page "http://docs.pylonsproject.org/projects/translationstring")
3950 (synopsis "Internationalization tooling for the Pylons project")
3951 (description "This package provides a library used by various Pylons
3952 project packages for internationalization (i18n) duties related to
3953 translation.")
3954 (license license:repoze)))
3955
3956 (define-public python-plaster
3957 (package
3958 (name "python-plaster")
3959 (version "1.0")
3960 (source (origin
3961 (method url-fetch)
3962 (uri (pypi-uri "plaster" version))
3963 (sha256
3964 (base32
3965 "1hy8k0nv2mxq94y5aysk6hjk9ryb4bsd13g83m60hcyzxz3wflc3"))))
3966 (build-system python-build-system)
3967 (native-inputs
3968 `(("python-pytest" ,python-pytest)))
3969 (home-page "https://docs.pylonsproject.org/projects/plaster/en/latest/")
3970 (synopsis "Configuration loader for multiple config file formats")
3971 (description
3972 "Plaster is a loader interface around multiple config file formats. It
3973 exists to define a common API for applications to use when they wish to load
3974 configuration. The library itself does not aim to handle anything except a
3975 basic API that applications may use to find and load configuration settings.
3976 Any specific constraints should be implemented in a pluggable loader which can
3977 be registered via an entrypoint.")
3978 (license license:repoze)))
3979
3980 (define-public python-plaster-pastedeploy
3981 (package
3982 (name "python-plaster-pastedeploy")
3983 (version "0.7")
3984 (source (origin
3985 (method url-fetch)
3986 (uri (pypi-uri "plaster_pastedeploy" version))
3987 (sha256
3988 (base32
3989 "1zg7gcsvc1kzay1ry5p699rg2qavfsxqwl17mqxzr0gzw6j9679r"))))
3990 (build-system python-build-system)
3991 (native-inputs
3992 `(("python-pytest" ,python-pytest)))
3993 (propagated-inputs
3994 `(("python-plaster" ,python-plaster)
3995 ("python-pastedeploy" ,python-pastedeploy)))
3996 (home-page "https://github.com/Pylons/plaster_pastedeploy")
3997 (synopsis "Plugin for python-plaster adding PasteDeploy syntax")
3998 (description
3999 "This plugin for @code{python-plaster} adds support for PasteDeploy
4000 syntax, it provides a plaster @code{Loader} object that can parse ini files
4001 according to the standard set by PasteDeploy ")
4002 (license license:expat)))
4003
4004 (define-public python-hupper
4005 (package
4006 (name "python-hupper")
4007 (version "1.10.2")
4008 (source (origin
4009 (method url-fetch)
4010 (uri (pypi-uri "hupper" version))
4011 (sha256
4012 (base32
4013 "0am0p6g5cz6xmcaf04xq8q6dzdd9qz0phj6gcmpsckf2mcyza61q"))))
4014 (build-system python-build-system)
4015 (arguments '(#:test-target "pytest"))
4016 (native-inputs
4017 `(("python-pytest" ,python-pytest)
4018 ("python-pytest-runner" ,python-pytest-runner)
4019 ("python-watchdog" ,python-watchdog)
4020 ("python-mock" ,python-mock)
4021 ("python-pytest-cov" ,python-pytest-cov)))
4022 (propagated-inputs
4023 `(("python-pytz" ,python-pytz)))
4024 (home-page "https://readthedocs.org/projects/hupper")
4025 (synopsis "Integrated process monitor tracking changes to imported Python files")
4026 (description
4027 "Hupper is an integrated process monitor that will track changes to any
4028 imported Python files in sys.modules as well as custom paths. When files are
4029 changed the process is restarted.")
4030 (license license:expat)))
4031
4032 (define-public python-pyramid
4033 (package
4034 (name "python-pyramid")
4035 (version "1.10.4")
4036 (source (origin
4037 (method url-fetch)
4038 (uri (pypi-uri "pyramid" version))
4039 (sha256
4040 (base32
4041 "0rkxs1ajycg2zh1c94xlmls56mx5m161sn8112skj0amza6cn36q"))))
4042 (build-system python-build-system)
4043 (propagated-inputs
4044 `(("python-hupper" ,python-hupper)
4045 ("python-plaster-pastedeploy" ,python-plaster-pastedeploy)
4046 ("python-translationstring" ,python-translationstring)
4047 ("python-venusian" ,python-venusian)
4048 ("python-webob" ,python-webob)
4049 ("python-zope-deprecation" ,python-zope-deprecation)
4050 ("python-zope-interface" ,python-zope-interface)
4051 ("python-webtest" ,python-webtest)
4052 ("python-zope-component" ,python-zope-component)
4053 ("python-plaster" ,python-plaster)))
4054 (home-page "https://trypyramid.com/")
4055 (synopsis "Python web-framework suitable for small and large sites")
4056 (description
4057 "Pyramid makes it easy to write web applications. From minimal
4058 request/response web apps to larger, grown applications.")
4059 (license license:repoze)))
4060
4061 (define-public python-random-user-agent
4062 (package
4063 (name "python-random-user-agent")
4064 (version "1.0.1")
4065 (source
4066 (origin
4067 (method url-fetch)
4068 (uri (pypi-uri "random_user_agent" version))
4069 (sha256
4070 (base32
4071 "04nhzdh2ki7ybhjrmghxci6hcm6i03vvin2q2ynj87fbr1pa534g"))))
4072 (build-system python-build-system)
4073 (home-page "https://github.com/Luqman-Ud-Din/random_user_agent")
4074 (synopsis "List of user agents")
4075 (description
4076 "This package provides a list of user agents, from a collection of more
4077 than 326,000 known user-agents. Users can pick a random one, or select one
4078 based on filters.")
4079 (license license:expat)))
4080
4081 (define-public python-flask-restx
4082 (package
4083 (name "python-flask-restx")
4084 (version "0.2.0")
4085 (source
4086 ;; We fetch from the Git repo because there are no tests in the PyPI
4087 ;; archive.
4088 (origin
4089 (method git-fetch)
4090 (uri (git-reference
4091 (url "https://github.com/python-restx/flask-restx")
4092 (commit version)))
4093 (file-name (git-file-name name version))
4094 (sha256
4095 (base32 "0xf2vkmdngp9cv9klznizai4byxjcf0iqh1pr4b83nann0jxqwy7"))))
4096 (build-system python-build-system)
4097 (propagated-inputs
4098 `(("python-aniso8601" ,python-aniso8601)
4099 ("python-flask" ,python-flask)
4100 ("python-jsonschema" ,python-jsonschema)
4101 ("python-pytz" ,python-pytz)))
4102 (native-inputs
4103 `(("python-blinker" ,python-blinker)
4104 ("python-faker" ,python-faker)
4105 ("python-pytest" ,python-pytest)
4106 ("python-pytest-benchmark"
4107 ,python-pytest-benchmark)
4108 ("python-pytest-flask" ,python-pytest-flask)
4109 ("python-pytest-mock" ,python-pytest-mock)))
4110 (arguments
4111 `(#:phases
4112 (modify-phases %standard-phases
4113 (replace 'check
4114 (lambda _
4115 (invoke "pytest" "--benchmark-skip" "-k"
4116 ;; Those tests need internet access
4117 "not test_check and not test_valid_value_check"))))))
4118 (home-page "https://github.com/python-restx/flask-restx")
4119 (synopsis
4120 "Framework for fast, easy and documented API development with Flask")
4121 (description
4122 "Flask-RESTX is an extension for Flask that adds support for quickly building
4123 REST APIs. Flask-RESTX encourages best practices with minimal setup. If you are familiar
4124 with Flask, Flask-RESTX should be easy to pick up. It provides a coherent collection of
4125 decorators and tools to describe your API and expose its documentation properly using
4126 Swagger.")
4127 (license license:bsd-3)))