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