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