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