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