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