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