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