gnu: python-flask-migrate: Update to 2.5.3.
[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.6.0")
996 (source
997 (origin
998 (method url-fetch)
999 (uri (pypi-uri "zope.interface" version))
1000 (sha256
1001 (base32
1002 "1rgh2x3rcl9r0v0499kf78xy86rnmanajf4ywmqb943wpk50sg8v"))))
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.0.8")
1021 (source
1022 (origin
1023 (method url-fetch)
1024 (uri (pypi-uri "zope.exceptions" version))
1025 (sha256
1026 (base32
1027 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
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.6.2")
1046 (source
1047 (origin
1048 (method url-fetch)
1049 (uri (pypi-uri "zope.testing" version))
1050 (sha256
1051 (base32
1052 "0iiq54hjhkk2gpvzfjac70vyn4r0kw0ngvicshxbdwrkgf2gjq3g"))
1053 (modules '((guix build utils)))
1054 (snippet
1055 '(begin
1056 ;; Remove pre-compiled .pyc files backup files from source.
1057 (for-each delete-file (find-files "." "(\\.pyc|~)$"))
1058 #t))))
1059 (build-system python-build-system)
1060 (home-page "https://pypi.org/project/zope.testing/")
1061 (synopsis "Zope testing helpers")
1062 (description "Zope.testing provides a number of testing utilities for HTML
1063 forms, HTTP servers, regular expressions, and more.")
1064 (license license:zpl2.1)))
1065
1066 (define-public python2-zope-testing
1067 (package-with-python2 python-zope-testing))
1068
1069 (define-public python-zope-testrunner
1070 (package
1071 (name "python-zope-testrunner")
1072 (version "4.4.9")
1073 (source
1074 (origin
1075 (method url-fetch)
1076 (uri (pypi-uri "zope.testrunner" version ".zip"))
1077 (sha256
1078 (base32
1079 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
1080 (build-system python-build-system)
1081 (arguments
1082 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
1083 (native-inputs
1084 `(("python-six" ,python-six)
1085 ;("python-zope-interface" ,python-zope-interface)
1086 ("python-zope-exceptions" ,python-zope-exceptions)
1087 ("python-zope-testing" ,python-zope-testing)
1088 ("unzip" ,unzip)))
1089 (propagated-inputs
1090 `(("python-zope-interface" ,python-zope-interface)))
1091 (home-page "https://pypi.org/project/zope.testrunner/")
1092 (synopsis "Zope testrunner script")
1093 (description "Zope.testrunner provides a script for running Python
1094 tests.")
1095 (license license:zpl2.1)))
1096
1097 (define-public python2-zope-testrunner
1098 (let ((base (package-with-python2 python-zope-testrunner)))
1099 (package
1100 (inherit base)
1101 (native-inputs
1102 (append (package-native-inputs base)
1103 `(("python2-subunit" ,python2-subunit)
1104 ("python2-mimeparse" ,python2-mimeparse)))))))
1105
1106 (define-public python-zope-i18nmessageid
1107 (package
1108 (name "python-zope-i18nmessageid")
1109 (version "4.0.3")
1110 (source
1111 (origin
1112 (method url-fetch)
1113 (uri (pypi-uri "zope.i18nmessageid" version))
1114 (sha256
1115 (base32
1116 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
1117 (build-system python-build-system)
1118 (home-page "https://pypi.org/project/zope.i18nmessageid/")
1119 (synopsis "Message identifiers for internationalization")
1120 (description "Zope.i18nmessageid provides facilities for declaring
1121 internationalized messages within program source text.")
1122 (license license:zpl2.1)))
1123
1124 (define-public python2-zope-i18nmessageid
1125 (package-with-python2 python-zope-i18nmessageid))
1126
1127 (define-public python-zope-schema
1128 (package
1129 (name "python-zope-schema")
1130 (version "4.4.2")
1131 (source
1132 (origin
1133 (method url-fetch)
1134 (uri (pypi-uri "zope.schema" version))
1135 (sha256
1136 (base32
1137 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
1138 (build-system python-build-system)
1139 (arguments
1140 '(#:tests? #f)) ; FIXME: Tests can't find zope.event.
1141 (propagated-inputs
1142 `(("python-zope-event" ,python-zope-event)
1143 ("python-zope-exceptions" ,python-zope-exceptions)
1144 ("python-zope-interface" ,python-zope-interface)))
1145 (native-inputs
1146 `(("python-zope-testing" ,python-zope-testing)
1147 ("python-coverage" ,python-coverage)
1148 ("python-nose" ,python-nose)))
1149 (home-page "https://pypi.org/project/zope.schema/")
1150 (synopsis "Zope data schemas")
1151 (description "Zope.scheme provides extensions to zope.interface for
1152 defining data schemas.")
1153 (license license:zpl2.1)))
1154
1155 (define-public python2-zope-schema
1156 (package-with-python2 python-zope-schema))
1157
1158 (define-public python-zope-configuration
1159 (package
1160 (name "python-zope-configuration")
1161 (version "4.0.3")
1162 (source (origin
1163 (method url-fetch)
1164 (uri (pypi-uri "zope.configuration" version))
1165 (sha256
1166 (base32
1167 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
1168 (build-system python-build-system)
1169 (arguments
1170 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
1171 (propagated-inputs
1172 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
1173 ("python-zope-schema" ,python-zope-schema)))
1174 (home-page "https://pypi.org/project/zope.configuration/")
1175 (synopsis "Zope Configuration Markup Language")
1176 (description "Zope.configuration implements ZCML, the Zope Configuration
1177 Markup Language.")
1178 (license license:zpl2.1)))
1179
1180 (define-public python2-zope-configuration
1181 (package-with-python2 python-zope-configuration))
1182
1183 (define-public python-zope-proxy
1184 (package
1185 (name "python-zope-proxy")
1186 (version "4.1.6")
1187 (source
1188 (origin
1189 (method url-fetch)
1190 (uri (pypi-uri "zope.proxy" version))
1191 (sha256
1192 (base32
1193 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
1194 (build-system python-build-system)
1195 (arguments
1196 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
1197 (propagated-inputs
1198 `(("python-zope-interface" ,python-zope-interface)))
1199 (home-page "https://pypi.org/project/zope.proxy/")
1200 (synopsis "Generic, transparent proxies")
1201 (description "Zope.proxy provides generic, transparent proxies for Python.
1202 Proxies are special objects which serve as mostly-transparent wrappers around
1203 another object, intervening in the apparent behavior of the wrapped object
1204 only when necessary to apply the policy (e.g., access checking, location
1205 brokering, etc.) for which the proxy is responsible.")
1206 (license license:zpl2.1)))
1207
1208 (define-public python2-zope-proxy
1209 (package-with-python2 python-zope-proxy))
1210
1211 (define-public python-zope-location
1212 (package
1213 (name "python-zope-location")
1214 (version "4.0.3")
1215 (source
1216 (origin
1217 (method url-fetch)
1218 (uri (pypi-uri "zope.location" version))
1219 (sha256
1220 (base32
1221 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
1222 (build-system python-build-system)
1223 (arguments
1224 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
1225 (propagated-inputs
1226 `(("python-zope-proxy" ,python-zope-proxy)
1227 ("python-zope-schema" ,python-zope-schema)))
1228 (home-page "https://pypi.org/project/zope.location/")
1229 (synopsis "Zope location library")
1230 (description "Zope.location implements the concept of \"locations\" in
1231 Zope3, which are are special objects that have a structural location.")
1232 (license license:zpl2.1)))
1233
1234 (define-public python2-zope-location
1235 (package-with-python2 python-zope-location))
1236
1237 (define-public python-zope-security
1238 (package
1239 (name "python-zope-security")
1240 (version "4.0.3")
1241 (source
1242 (origin
1243 (method url-fetch)
1244 (uri (pypi-uri "zope.security" version))
1245 (sha256
1246 (base32
1247 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
1248 (build-system python-build-system)
1249 (arguments
1250 '(#:tests? #f)) ; FIXME: Tests can't find zope.testrunner.
1251 (propagated-inputs
1252 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
1253 ("python-zope-proxy" ,python-zope-proxy)
1254 ("python-zope-schema" ,python-zope-schema)))
1255 (native-inputs
1256 `(("python-six" ,python-six)
1257 ("python-zope-component" ,python-zope-component)
1258 ("python-zope-configuration" ,python-zope-configuration)
1259 ("python-zope-location" ,python-zope-location)
1260 ("python-zope-testrunner" ,python-zope-testrunner)
1261 ("python-zope-testing" ,python-zope-testing)))
1262 (home-page "https://pypi.org/project/zope.security/")
1263 (synopsis "Zope security framework")
1264 (description "Zope.security provides a generic mechanism to implement
1265 security policies on Python objects.")
1266 (license license:zpl2.1)))
1267
1268 (define-public python2-zope-security
1269 (let ((zope-security (package-with-python2 python-zope-security)))
1270 (package (inherit zope-security)
1271 (propagated-inputs
1272 `(("python2-zope-testrunner" ,python2-zope-testrunner)
1273 ,@(alist-delete
1274 "python-zope-testrunner"
1275 (package-propagated-inputs zope-security)))))))
1276
1277 (define-public python-zope-component
1278 (package
1279 (name "python-zope-component")
1280 (version "4.3.0")
1281 (source
1282 (origin
1283 (method url-fetch)
1284 (uri (pypi-uri "zope.component" version))
1285 (sha256
1286 (base32
1287 "1hlvzwj1kcfz1qms1dzhwsshpsf38z9clmyksb1gh41n8k3kchdv"))))
1288 (build-system python-build-system)
1289 (arguments
1290 ;; Skip tests due to circular dependency with python-zope-security.
1291 '(#:tests? #f))
1292 (native-inputs
1293 `(("python-zope-testing" ,python-zope-testing)))
1294 (propagated-inputs
1295 `(("python-zope-event" ,python-zope-event)
1296 ("python-zope-interface" ,python-zope-interface)
1297 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
1298 ("python-zope-configuration" ,python-zope-configuration)))
1299 (home-page "https://github.com/zopefoundation/zope.component")
1300 (synopsis "Zope Component Architecture")
1301 (description "Zope.component represents the core of the Zope Component
1302 Architecture. Together with the zope.interface package, it provides
1303 facilities for defining, registering and looking up components.")
1304 (license license:zpl2.1)))
1305
1306 (define-public python2-zope-component
1307 (package-with-python2 python-zope-component))
1308
1309 (define-public python-ndg-httpsclient
1310 (package
1311 (name "python-ndg-httpsclient")
1312 (version "0.5.1")
1313 (source (origin
1314 (method url-fetch)
1315 (uri (pypi-uri "ndg_httpsclient" version))
1316 (sha256
1317 (base32
1318 "0412b7i1s4vj7lz9r72nmb28h9syd4q2x89bdirkkc3a6z8awbyp"))))
1319 (build-system python-build-system)
1320 (arguments
1321 '(;; The tests appear to require networking.
1322 #:tests? #f))
1323 (propagated-inputs
1324 `(("python-pyopenssl" ,python-pyopenssl)))
1325 (synopsis "HTTPS support for Python's httplib and urllib2")
1326 (description "This is a HTTPS client implementation for httplib and urllib2
1327 based on PyOpenSSL. PyOpenSSL provides a more fully-featured SSL implementation
1328 over the default provided with Python and, importantly, enables full
1329 verification of the SSL peer.")
1330 (home-page "https://github.com/cedadev/ndg_httpsclient/")
1331 (license license:bsd-3)))
1332
1333 ;; python2-openssl requires special care, so package-with-python2 is
1334 ;; insufficient.
1335 (define-public python2-ndg-httpsclient
1336 (package (inherit python-ndg-httpsclient)
1337 (name "python2-ndg-httpsclient")
1338 (arguments
1339 (substitute-keyword-arguments (package-arguments python-ndg-httpsclient)
1340 ((#:python _) python-2)))
1341 (propagated-inputs
1342 `(("python2-pyopenssl" ,python2-pyopenssl)))))
1343
1344 (define-public python-websocket-client
1345 (package
1346 (name "python-websocket-client")
1347 (version "0.54.0")
1348 (source
1349 (origin
1350 (method url-fetch)
1351 (uri (pypi-uri "websocket_client" version))
1352 (sha256
1353 (base32
1354 "0j88zmikaypf38lvpkf4aaxrjp9j07dmy5ghj7kli0fv3p4n45g5"))))
1355 (build-system python-build-system)
1356 (propagated-inputs
1357 `(("python-six" ,python-six)))
1358 (home-page "https://github.com/liris/websocket-client")
1359 (synopsis "WebSocket client for Python")
1360 (description "The Websocket-client module provides the low level APIs for
1361 WebSocket usage in Python programs.")
1362 (properties `((python2-variant . ,(delay python2-websocket-client))))
1363 (license license:lgpl2.1+)))
1364
1365 (define-public python2-websocket-client
1366 (let ((base (package-with-python2
1367 (strip-python2-variant python-websocket-client))))
1368 (package
1369 (inherit base)
1370 (native-inputs
1371 `(("python2-backport-ssl-match-hostname"
1372 ,python2-backport-ssl-match-hostname)
1373 ,@(package-native-inputs base))))))
1374
1375 (define-public python-requests
1376 (package
1377 (name "python-requests")
1378 (version "2.22.0")
1379 (source (origin
1380 (method url-fetch)
1381 (uri (pypi-uri "requests" version))
1382 (sha256
1383 (base32
1384 "1d5ybh11jr5sm7xp6mz8fyc7vrp4syifds91m7sj60xalal0gq0i"))))
1385 (build-system python-build-system)
1386 (propagated-inputs
1387 `(("python-certifi" ,python-certifi)
1388 ("python-chardet" ,python-chardet)
1389 ("python-idna" ,python-idna)
1390 ("python-urllib3" ,python-urllib3)))
1391 (arguments
1392 ;; FIXME: Some tests require network access.
1393 '(#:tests? #f))
1394 (home-page "http://python-requests.org/")
1395 (synopsis "Python HTTP library")
1396 (description
1397 "Requests is a Python HTTP client library. It aims to be easier to use
1398 than Python’s urllib2 library.")
1399 (license license:asl2.0)))
1400
1401 ;; Some software requires an older version of Requests, notably Docker/Docker
1402 ;; Compose.
1403 (define-public python-requests-2.20
1404 (package (inherit python-requests)
1405 (version "2.20.1")
1406 (source (origin
1407 (method url-fetch)
1408 (uri (pypi-uri "requests" version))
1409 (sha256
1410 (base32
1411 "0qzj6cgv3k9wyj7wlxgz7xq0cfg4jbbkfm24pp8dnhczwl31527a"))))
1412 (propagated-inputs
1413 `(("python-urllib3" ,python-urllib3-1.24)
1414 ("python-idna" ,python-idna-2.7)
1415 ,@(package-propagated-inputs python-requests)))))
1416
1417 ;; Some software requires an older version of Requests, notably Docker
1418 ;; Compose.
1419 (define-public python-requests-2.7
1420 (package (inherit python-requests)
1421 (version "2.7.0")
1422 (source (origin
1423 (method url-fetch)
1424 (uri (pypi-uri "requests" version))
1425 (sha256
1426 (base32
1427 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
1428
1429 (define-public python2-requests
1430 (package-with-python2 python-requests))
1431
1432 (define-public python-requests-mock
1433 (package
1434 (name "python-requests-mock")
1435 (version "1.3.0")
1436 (source
1437 (origin
1438 (method url-fetch)
1439 (uri (pypi-uri "requests-mock" version))
1440 (sha256
1441 (base32
1442 "0jr997dvk6zbmhvbpcv3rajrgag69mcsm1ai3w3rgk2jdh6rg1mx"))))
1443 (build-system python-build-system)
1444 (propagated-inputs
1445 `(("python-requests" ,python-requests)
1446 ("python-six" ,python-six)))
1447 (native-inputs
1448 `(("python-pbr" ,python-pbr)
1449 ("python-discover" ,python-discover)
1450 ("python-docutils" ,python-docutils)
1451 ("python-fixtures" ,python-fixtures)
1452 ("python-mock" ,python-mock)
1453 ("python-sphinx" ,python-sphinx)
1454 ("python-testrepository" ,python-testrepository)
1455 ("python-testtools" ,python-testtools)))
1456 (home-page "https://requests-mock.readthedocs.org/")
1457 (synopsis "Mock out responses from the requests package")
1458 (description
1459 "This module provides a building block to stub out the HTTP requests
1460 portions of your testing code.")
1461 (properties `((python2-variant . ,(delay python2-requests-mock))))
1462 (license license:asl2.0)))
1463
1464 (define-public python2-requests-mock
1465 (package (inherit (package-with-python2
1466 (strip-python2-variant python-requests-mock)))
1467 (arguments
1468 `(#:python ,python-2
1469 ;; FIXME: 'subunit.run discover: error: no such option: --list'
1470 #:tests? #f))))
1471
1472 (define-public python-requests-toolbelt
1473 (package
1474 (name "python-requests-toolbelt")
1475 (version "0.8.0")
1476 (source (origin
1477 (method url-fetch)
1478 (uri (pypi-uri "requests-toolbelt" version))
1479 (sha256
1480 (base32
1481 "1dc7l42i4080r8i4m9fj51jx367lqkai170vrv7wd93gdj9k39gn"))))
1482 (build-system python-build-system)
1483 (native-inputs
1484 `(("python-betamax" ,python-betamax)
1485 ("python-mock" ,python-mock)
1486 ("python-pytest" ,python-pytest)))
1487 (propagated-inputs
1488 `(("python-requests" ,python-requests)))
1489 (synopsis "Extensions to python-requests")
1490 (description "This is a toolbelt of useful classes and functions to be used
1491 with python-requests.")
1492 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
1493 (license license:asl2.0)))
1494
1495 (define-public python2-requests-toolbelt
1496 (package-with-python2 python-requests-toolbelt))
1497
1498 (define-public python-oauthlib
1499 (package
1500 (name "python-oauthlib")
1501 (version "3.0.1")
1502 (source (origin
1503 (method url-fetch)
1504 (uri (pypi-uri "oauthlib" version))
1505 (sha256
1506 (base32
1507 "163jg4a8f7c5ki655grrr47kgljy12wri3qly7ijf64sk1fjrqqc"))))
1508 (build-system python-build-system)
1509 (arguments
1510 `(#:phases (modify-phases %standard-phases
1511 (replace 'check
1512 (lambda _
1513 (invoke "pytest" "-vv"))))))
1514 (native-inputs
1515 `(("python-pytest" ,python-pytest)
1516 ("python-pytest-cov" ,python-pytest-cov)
1517 ("python-mock" ,python-mock)))
1518 (propagated-inputs
1519 `(("python-cryptography" ,python-cryptography)
1520 ("python-pyjwt" ,python-pyjwt)
1521 ("python-blinker" ,python-blinker)))
1522 (home-page "https://github.com/oauthlib/oauthlib")
1523 (synopsis "OAuth implementation for Python")
1524 (description
1525 "Oauthlib is a generic, spec-compliant, thorough implementation of the
1526 OAuth request-signing logic.")
1527 (license license:bsd-3)))
1528
1529 (define-public python2-oauthlib
1530 (package-with-python2 python-oauthlib))
1531
1532 (define-public python-rauth
1533 (package
1534 (name "python-rauth")
1535 (version "0.7.3")
1536 (source
1537 (origin
1538 (method url-fetch)
1539 (uri (pypi-uri "rauth" version))
1540 (sha256
1541 (base32
1542 "02kv8w8l98ky223avyq7vw7x1f2ya9chrm59r77ylq45qb0xnk2j"))))
1543 (build-system python-build-system)
1544 (arguments
1545 `(#:test-target "check"))
1546 (propagated-inputs
1547 `(("python-requests" ,python-requests)))
1548 (home-page "https://github.com/litl/rauth")
1549 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
1550 (description
1551 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
1552 provides service wrappers for convenient connection initialization and
1553 authenticated session objects providing things like keep-alive.")
1554 (license license:expat)
1555 (properties `((python2-variant . ,(delay python2-rauth))))))
1556
1557 (define-public python2-rauth
1558 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
1559 (package
1560 (inherit base)
1561 (native-inputs `(("python2-unittest2" ,python2-unittest2)
1562 ,@(package-native-inputs base))))))
1563
1564 (define-public python-urllib3
1565 (package
1566 (name "python-urllib3")
1567 (version "1.25.3")
1568 (source
1569 (origin
1570 (method url-fetch)
1571 (uri (pypi-uri "urllib3" version))
1572 (sha256
1573 (base32
1574 "0cij8qcvvpj62g1q8n785qjkdymfh4b7vf45si4sw64l41rr3rfv"))))
1575 (build-system python-build-system)
1576 (arguments `(#:tests? #f))
1577 (propagated-inputs
1578 `(;; These 5 inputs are used to build urrlib3[secure]
1579 ("python-certifi" ,python-certifi)
1580 ("python-cryptography" ,python-cryptography)
1581 ("python-idna" ,python-idna)
1582 ("python-ipaddress" ,python-ipaddress)
1583 ("python-pyopenssl" ,python-pyopenssl)
1584 ("python-pysocks" ,python-pysocks)))
1585 (home-page "https://urllib3.readthedocs.io/")
1586 (synopsis "HTTP library with thread-safe connection pooling")
1587 (description
1588 "Urllib3 supports features left out of urllib and urllib2 libraries. It
1589 can reuse the same socket connection for multiple requests, it can POST files,
1590 supports url redirection and retries, and also gzip and deflate decoding.")
1591 (license license:expat)))
1592
1593 ;; Some software requires an older version of urllib3, notably Docker.
1594 (define-public python-urllib3-1.24
1595 (package (inherit python-urllib3)
1596 (version "1.24.3")
1597 (source (origin
1598 (method url-fetch)
1599 (uri (pypi-uri "urllib3" version))
1600 (sha256
1601 (base32
1602 "1x0slqrv6kixkbcdnxbglvjliwhc1payavxjvk8fvbqjrnasd4r3"))))))
1603
1604
1605 (define-public python2-urllib3
1606 (package-with-python2 python-urllib3))
1607
1608 (define-public awscli
1609 (package
1610 (name "awscli")
1611 (version "1.18.6")
1612 (source
1613 (origin
1614 (method url-fetch)
1615 (uri (pypi-uri name version))
1616 (sha256
1617 (base32
1618 "0p479mfs9r0m82a217pap8156ijwvhv6r3kqa4k267gd05wgvygm"))))
1619 (build-system python-build-system)
1620 (arguments
1621 ;; FIXME: The 'pypi' release does not contain tests.
1622 '(#:tests? #f
1623 #:phases
1624 (modify-phases %standard-phases
1625 (add-after 'unpack 'fix-reference-to-groff
1626 (lambda _
1627 (substitute* "awscli/help.py"
1628 (("if not self._exists_on_path\\('groff'\\):") "")
1629 (("raise ExecutableNotFoundError\\('groff'\\)") "")
1630 (("cmdline = \\['groff'")
1631 (string-append "cmdline = ['" (which "groff") "'")))
1632 #t)))))
1633 (propagated-inputs
1634 `(("python-colorama" ,python-colorama)
1635 ("python-botocore" ,python-botocore)
1636 ("python-s3transfer" ,python-s3transfer)
1637 ("python-docutils" ,python-docutils)
1638 ("python-pyyaml" ,python-pyyaml)
1639 ("python-rsa" ,python-rsa)))
1640 (native-inputs
1641 `(("groff" ,groff)))
1642 (home-page "https://aws.amazon.com/cli/")
1643 (synopsis "Command line client for AWS")
1644 (description "AWS CLI provides a unified command line interface to the
1645 Amazon Web Services (AWS) API.")
1646 (license license:asl2.0)))
1647
1648 (define-public python-wsgiproxy2
1649 (package
1650 (name "python-wsgiproxy2")
1651 (version "0.4.6")
1652 (source
1653 (origin
1654 (method url-fetch)
1655 (uri (pypi-uri "WSGIProxy2" version ".tar.gz"))
1656 (sha256
1657 (base32 "16jch5nic0hia28lps3c678s9s9mjdq8n87igxncjg0rpi5adqnf"))))
1658 (build-system python-build-system)
1659 (native-inputs
1660 `(("python-webtest" ,python-webtest)))
1661 (propagated-inputs
1662 `(("python-requests" ,python-requests)
1663 ("python-six" ,python-six)
1664 ("python-urllib3" ,python-urllib3)
1665 ("python-webob" ,python-webob)))
1666 (home-page "https://github.com/gawel/WSGIProxy2/")
1667 (synopsis "WSGI Proxy with various http client backends")
1668 (description "WSGI turns HTTP requests into WSGI function calls.
1669 WSGIProxy turns WSGI function calls into HTTP requests.
1670 It also includes code to sign requests and pass private data,
1671 and to spawn subprocesses to handle requests.")
1672 (license license:expat)))
1673
1674 (define-public python2-wsgiproxy2
1675 (package-with-python2 python-wsgiproxy2))
1676
1677 (define-public python-pastedeploy
1678 (package
1679 (name "python-pastedeploy")
1680 (version "1.5.2")
1681 (source
1682 (origin
1683 (method url-fetch)
1684 (uri (pypi-uri "PasteDeploy" version))
1685 (sha256
1686 (base32
1687 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
1688 (build-system python-build-system)
1689 (native-inputs
1690 `(("python-nose" ,python-nose)))
1691 (home-page "https://pylonsproject.org/")
1692 (synopsis
1693 "Load, configure, and compose WSGI applications and servers")
1694 (description
1695 "This tool provides code to load WSGI applications and servers from URIs;
1696 these URIs can refer to Python Eggs for INI-style configuration files. Paste
1697 Script provides commands to serve applications based on this configuration
1698 file.")
1699 (license license:expat)))
1700
1701 (define-public python2-pastedeploy
1702 (package-with-python2 python-pastedeploy))
1703
1704 (define-public python-webtest
1705 (package
1706 (name "python-webtest")
1707 (version "2.0.33")
1708 (source
1709 (origin
1710 (method url-fetch)
1711 (uri (pypi-uri "WebTest" version))
1712 (sha256
1713 (base32
1714 "1l3z0cwqslsf4rcrhi2gr8kdfh74wn2dw76376i4g9i38gz8wd21"))))
1715 (build-system python-build-system)
1716 (arguments
1717 ;; Tests require python-pyquery, which creates a circular dependency.
1718 `(#:tests? #f))
1719 (propagated-inputs
1720 `(("python-waitress" ,python-waitress)
1721 ("python-webob" ,python-webob)
1722 ("python-six" ,python-six)
1723 ("python-beautifulsoup4" ,python-beautifulsoup4)))
1724 (home-page "https://docs.pylonsproject.org/projects/webtest/")
1725 (synopsis "Helper to test WSGI applications")
1726 (description "Webtest allows you to test your Python web applications
1727 without starting an HTTP server. It supports anything that supports the
1728 minimum of WSGI.")
1729 (license license:expat)))
1730
1731 (define-public python2-webtest
1732 (package-with-python2 python-webtest))
1733
1734 (define-public python-flask
1735 (package
1736 (name "python-flask")
1737 (version "1.1.1")
1738 (source (origin
1739 (method url-fetch)
1740 (uri (pypi-uri "Flask" version))
1741 (sha256
1742 (base32
1743 "0ljdjgyjn7vh8ic1n1dc2l1cl421i6pr3kx5sz2w5irhyfbg3y8k"))))
1744 (build-system python-build-system)
1745 (arguments
1746 '(#:phases
1747 (modify-phases %standard-phases
1748 (replace 'check
1749 (lambda _
1750 (setenv "PYTHONPATH" (string-append "./build/lib:"
1751 (getenv "PYTHONPATH")))
1752 (invoke "pytest" "-vv" "tests"))))))
1753 (native-inputs
1754 `(("python-pytest" ,python-pytest)))
1755 (propagated-inputs
1756 `(("python-itsdangerous" ,python-itsdangerous)
1757 ("python-jinja2" ,python-jinja2)
1758 ("python-click" ,python-click)
1759 ("python-werkzeug" ,python-werkzeug)))
1760 (home-page "https://www.palletsprojects.com/p/flask/")
1761 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
1762 (description "Flask is a micro web framework based on the Werkzeug toolkit
1763 and Jinja2 template engine. It is called a micro framework because it does not
1764 presume or force a developer to use a particular tool or library.")
1765 (license license:bsd-3)))
1766
1767 (define-public python2-flask
1768 (package-with-python2 python-flask))
1769
1770 (define-public python-flask-wtf
1771 (package
1772 (name "python-flask-wtf")
1773 (version "0.14.3")
1774 (source
1775 (origin
1776 (method url-fetch)
1777 (uri (pypi-uri "Flask-WTF" version))
1778 (sha256
1779 (base32
1780 "086pvg2x69n0nczcq7frknfjd8am1zdy8qqpva1sanwb02hf65yl"))))
1781 (build-system python-build-system)
1782 (arguments
1783 '(#:phases
1784 (modify-phases %standard-phases
1785 (replace 'check
1786 (lambda _
1787 (setenv "PYTHONPATH" (string-append "./build/lib:"
1788 (getenv "PYTHONPATH")))
1789 (invoke "pytest" "-vv"))))))
1790 (propagated-inputs
1791 `(("python-flask-babel" ,python-flask-babel)
1792 ("python-babel" ,python-babel)
1793 ("python-wtforms" ,python-wtforms)))
1794 (native-inputs
1795 `(("python-pytest" ,python-pytest)))
1796 (home-page "https://github.com/lepture/flask-wtf")
1797 (synopsis "Simple integration of Flask and WTForms")
1798 (description "Flask-WTF integrates Flask and WTForms, including CSRF, file
1799 upload, and reCAPTCHA.")
1800 (license license:bsd-3)))
1801
1802 (define-public python2-flask-wtf
1803 (package-with-python2 python-flask-wtf))
1804
1805 (define-public python-flask-multistatic
1806 (package
1807 (name "python-flask-multistatic")
1808 (version "1.0")
1809 (source
1810 (origin
1811 (method url-fetch)
1812 (uri (pypi-uri "flask-multistatic" version))
1813 (sha256
1814 (base32
1815 "0p4v50rwv64wcd0zlq7rzl4waprwr4hj19s3cgf1isywa7jcisgm"))))
1816 (build-system python-build-system)
1817 (propagated-inputs
1818 `(("python-flask" ,python-flask)))
1819 (home-page "https://pagure.io/flask-multistatic")
1820 (synopsis "Flask plugin to allow overriding static files")
1821 (description "@code{flask-multistatic} is a flask plugin that adds support
1822 for overriding static files.")
1823 (license license:gpl3+)))
1824
1825 (define-public python2-flask-multistatic
1826 (package-with-python2 python-flask-multistatic))
1827
1828 (define-public python-cookies
1829 (package
1830 (name "python-cookies")
1831 (version "2.2.1")
1832 (source (origin
1833 (method url-fetch)
1834 (uri (pypi-uri "cookies" version))
1835 (sha256
1836 (base32
1837 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
1838 (build-system python-build-system)
1839 (arguments
1840 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
1841 #:tests? #f))
1842 (native-inputs
1843 `(("python-pytest" ,python-pytest)))
1844 (synopsis "HTTP cookie parser and renderer")
1845 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
1846 Python.")
1847 (home-page "https://gitlab.com/sashahart/cookies")
1848 (license license:expat)))
1849
1850 (define-public python2-cookies
1851 (package-with-python2 python-cookies))
1852
1853 (define-public python-responses
1854 (package
1855 (name "python-responses")
1856 (version "0.10.6")
1857 (source (origin
1858 (method url-fetch)
1859 (uri (pypi-uri "responses" version))
1860 (sha256
1861 (base32
1862 "147pacwkkqy3qf3hr33fnl1xbzgw0zsm3qppvvy9qhq8h069qbah"))))
1863 (build-system python-build-system)
1864 (arguments
1865 `(;; Test suite is not distributed:
1866 ;; https://github.com/getsentry/responses/issues/38
1867 #:tests? #f))
1868 (native-inputs
1869 `(("python-mock" ,python-mock)))
1870 (propagated-inputs
1871 `(("python-requests" ,python-requests)
1872 ("python-cookies" ,python-cookies)
1873 ("python-six" ,python-six)))
1874 (home-page "https://github.com/getsentry/responses")
1875 (synopsis "Utility for mocking out the `requests` Python library")
1876 (description "A utility library for mocking out the `requests` Python
1877 library.")
1878 (license license:asl2.0)))
1879
1880 (define-public python2-responses
1881 (package-with-python2 python-responses))
1882
1883 (define-public python-grequests
1884 (package
1885 (name "python-grequests")
1886 (version "0.3.0")
1887 (source
1888 (origin
1889 (method url-fetch)
1890 (uri (pypi-uri "grequests" version))
1891 (sha256
1892 (base32
1893 "1j9icncllbkv7x5719b20mx670c6q1jrdx1sakskkarvx3pc8h8g"))))
1894 (build-system python-build-system)
1895 (propagated-inputs
1896 `(("python-gevent" ,python-gevent)
1897 ("python-requests" ,python-requests)))
1898 (native-inputs
1899 `(("python-nose" ,python-nose)))
1900 (home-page "https://github.com/kennethreitz/grequests")
1901 (synopsis "Python library for asynchronous HTTP requests")
1902 (description "GRequests is a Python library that allows you to use
1903 @code{Requests} with @code{Gevent} to make asynchronous HTTP Requests easily")
1904 (license license:bsd-2)))
1905
1906 (define-public python-geventhttpclient
1907 (package
1908 (name "python-geventhttpclient")
1909 (version "1.3.1")
1910 (source (origin
1911 (method url-fetch)
1912 (uri (pypi-uri "geventhttpclient" version))
1913 (sha256
1914 (base32
1915 "07d0q3wzmml75227r6y6mrl5a0zpf4v9gj0ni5rhbyzmaj4az1xx"))
1916 (modules '((guix build utils)))
1917 (snippet
1918 '(begin
1919 ;; Delete pre-compiled files.
1920 (for-each delete-file (find-files "src/geventhttpclient"
1921 ".*\\.pyc"))
1922 #t))))
1923 (build-system python-build-system)
1924 (arguments
1925 '(#:phases
1926 (modify-phases %standard-phases
1927 (add-after 'unpack 'delete-network-tests
1928 (lambda _
1929 (delete-file "src/geventhttpclient/tests/test_client.py")
1930 #t))
1931 (delete 'check)
1932 (add-after 'install 'check
1933 (lambda* (#:key inputs outputs #:allow-other-keys)
1934 (add-installed-pythonpath inputs outputs)
1935 (invoke "py.test" "src/geventhttpclient/tests" "-v"
1936 ;; Append the test modules to sys.path to avoid
1937 ;; namespace conflict which breaks SSL tests.
1938 "--import-mode=append")
1939 #t)))))
1940 (native-inputs
1941 `(("python-pytest" ,python-pytest)))
1942 (propagated-inputs
1943 `(("python-certifi" ,python-certifi)
1944 ("python-gevent" ,python-gevent)
1945 ("python-six" ,python-six)))
1946 (home-page "https://github.com/gwik/geventhttpclient")
1947 (synopsis "HTTP client library for gevent")
1948 (description "@code{python-geventhttpclient} is a high performance,
1949 concurrent HTTP client library for python using @code{gevent}.")
1950 (license license:expat)))
1951
1952 (define-public python2-geventhttpclient
1953 (package-with-python2 python-geventhttpclient))
1954
1955 (define-public python-requests-oauthlib
1956 (package
1957 (name "python-requests-oauthlib")
1958 (version "1.2.0")
1959 (source
1960 (origin
1961 (method url-fetch)
1962 (uri (pypi-uri "requests-oauthlib" version))
1963 (sha256
1964 (base32
1965 "0mrglgcvq7k48pf27s4gifdk0za8xmgpf55jy15yjj471qrk6rdx"))))
1966 (build-system python-build-system)
1967 (arguments
1968 `(#:phases
1969 (modify-phases %standard-phases
1970 ;; removes tests that require network access
1971 (add-before 'check 'pre-check
1972 (lambda _
1973 (delete-file "tests/test_core.py")
1974 #t)))))
1975 (native-inputs
1976 `(("python-pyjwt" ,python-pyjwt)
1977 ("python-requests-mock" ,python-requests-mock)
1978 ("python-mock" ,python-mock)))
1979 (propagated-inputs
1980 `(("python-oauthlib" ,python-oauthlib)
1981 ("python-requests" ,python-requests)))
1982 (home-page
1983 "https://github.com/requests/requests-oauthlib")
1984 (synopsis
1985 "OAuthlib authentication support for Requests")
1986 (description
1987 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
1988 provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
1989 (license license:isc)))
1990
1991 (define-public python2-requests-oauthlib
1992 (package-with-python2 python-requests-oauthlib))
1993
1994 (define-public python-url
1995 (package
1996 (name "python-url")
1997 (version "0.2.0")
1998 (source (origin
1999 (method url-fetch)
2000 (uri (pypi-uri "url" version))
2001 (sha256
2002 (base32
2003 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
2004 (build-system python-build-system)
2005 (propagated-inputs
2006 `(("python-publicsuffix" ,python-publicsuffix)))
2007 (native-inputs
2008 `(("python-coverage" ,python-coverage)
2009 ("python-nose" ,python-nose)))
2010 (arguments
2011 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
2012 (home-page "https://github.com/seomoz/url-py")
2013 (synopsis "URL Parsing")
2014 (description "Library for parsing urls.")
2015 (license license:expat)
2016 (properties `((python2-variant . ,(delay python2-url))))))
2017
2018 (define-public python2-url
2019 (let ((base (package-with-python2 (strip-python2-variant python-url))))
2020 (package (inherit base)
2021 (propagated-inputs
2022 `(("python2-publicsuffix" ,python2-publicsuffix))))))
2023
2024 (define-public python-cachecontrol
2025 (package
2026 (name "python-cachecontrol")
2027 (version "0.12.5")
2028 (source
2029 (origin
2030 (method git-fetch)
2031 ;; Pypi does not have tests.
2032 (uri (git-reference
2033 (url "https://github.com/ionrock/cachecontrol")
2034 (commit (string-append "v" version))))
2035 (file-name (git-file-name name version))
2036 (sha256
2037 (base32
2038 "03lgc65sl04n0cgzmmgg99bk83f9i6k8yrmcd4hpl46q1pymn0kz"))))
2039 (build-system python-build-system)
2040 (arguments
2041 ;; Versions > 0.11.6 depend on CherryPy for testing.
2042 ;; It's too much work to package CherryPy for now.
2043 `(#:tests? #f))
2044 (propagated-inputs
2045 `(("python-requests" ,python-requests)
2046 ("python-lockfile" ,python-lockfile)))
2047 (home-page "https://github.com/ionrock/cachecontrol")
2048 (synopsis "The httplib2 caching algorithms for use with requests")
2049 (description "CacheControl is a port of the caching algorithms in
2050 @code{httplib2} for use with @code{requests} session objects.")
2051 (license license:asl2.0)))
2052
2053 (define-public python2-cachecontrol
2054 (package-with-python2 python-cachecontrol))
2055
2056 (define-public python-betamax
2057 (package
2058 (name "python-betamax")
2059 (version "0.8.1")
2060 (source
2061 (origin
2062 (method url-fetch)
2063 (uri (pypi-uri "betamax" version))
2064 (sha256
2065 (base32
2066 "1hki1c2vs7adq7zr56wi6i5bhrkia4s2ywpv2c98ibnczz709w2v"))))
2067 (build-system python-build-system)
2068 (arguments
2069 '(;; Many tests fail because they require networking.
2070 #:tests? #f))
2071 (propagated-inputs
2072 `(("python-requests" ,python-requests)))
2073 (home-page "https://github.com/sigmavirus24/betamax")
2074 (synopsis "Record HTTP interactions with python-requests")
2075 (description "Betamax will record your test suite's HTTP interactions and
2076 replay them during future tests. It is designed to work with python-requests.")
2077 (license license:expat)))
2078
2079 (define-public python2-betamax
2080 (package-with-python2 python-betamax))
2081
2082 (define-public python-betamax-matchers
2083 (package
2084 (name "python-betamax-matchers")
2085 (version "0.4.0")
2086 (source
2087 (origin
2088 (method url-fetch)
2089 (uri (pypi-uri "betamax-matchers" version))
2090 (sha256
2091 (base32
2092 "07qpwjyq2i2aqhz5iwghnj4pqr2ys5n45v1vmpcfx9r5mhwrsq43"))))
2093 (build-system python-build-system)
2094 (propagated-inputs
2095 `(("python-betamax" ,python-betamax)
2096 ("python-requests-toolbelt" ,python-requests-toolbelt)))
2097 (home-page "https://github.com/sigmavirus24/betamax_matchers")
2098 (synopsis "VCR imitation for python-requests")
2099 (description "@code{betamax-matchers} provides a set of Matchers for
2100 Betamax.")
2101 (license license:asl2.0)))
2102
2103 (define-public python2-betamax-matchers
2104 (package-with-python2 python-betamax-matchers))
2105
2106 (define-public python-s3transfer
2107 (package
2108 (name "python-s3transfer")
2109 (version "0.2.0")
2110 (source (origin
2111 (method url-fetch)
2112 (uri (pypi-uri "s3transfer" version))
2113 (sha256
2114 (base32
2115 "08fhj73b1ai52hrs2q3nggshq3pswn1gq8ch3m009cb2v2vmqggj"))))
2116 (build-system python-build-system)
2117 (arguments
2118 `(#:phases
2119 (modify-phases %standard-phases
2120 (replace 'check
2121 (lambda _
2122 ;; Some of the 'integration' tests require network access or
2123 ;; login credentials.
2124 (invoke "nosetests" "--exclude=integration")
2125 #t)))))
2126 (native-inputs
2127 `(("python-docutils" ,python-docutils)
2128 ("python-mock" ,python-mock)
2129 ("python-nose" ,python-nose)))
2130 (propagated-inputs
2131 `(("python-botocore" ,python-botocore)
2132 ("python-urllib3" ,python-urllib3)))
2133 (synopsis "Amazon S3 Transfer Manager")
2134 (description "S3transfer is a Python library for managing Amazon S3
2135 transfers.")
2136 (home-page "https://github.com/boto/s3transfer")
2137 (license license:asl2.0)
2138 (properties `((python2-variant . ,(delay python2-s3transfer))))))
2139
2140 (define-public python2-s3transfer
2141 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
2142 (package
2143 (inherit base)
2144 (native-inputs
2145 `(("python2-futures" ,python2-futures)
2146 ,@(package-native-inputs base))))))
2147
2148 (define-public python-slimit
2149 (package
2150 (name "python-slimit")
2151 (version "0.8.1")
2152 (source
2153 (origin
2154 (method url-fetch)
2155 (uri (pypi-uri "slimit" version ".zip"))
2156 (sha256
2157 (base32
2158 "02vj2x728rs1127q2nc27frrqra4fczivnb7gch6n5lzi7pxqczl"))))
2159 (build-system python-build-system)
2160 (native-inputs
2161 `(("unzip" ,unzip)))
2162 (propagated-inputs
2163 `(("python-ply" ,python-ply)))
2164 (home-page "https://slimit.readthedocs.io/")
2165 (synopsis "JavaScript minifier, parser and lexer written in Python")
2166 (description
2167 "SlimIt is a JavaScript minifier written in Python. It compiles
2168 JavaScript into more compact code so that it downloads and runs faster.
2169 SlimIt also provides a library that includes a JavaScript parser, lexer,
2170 pretty printer and a tree visitor.")
2171 (license license:expat)))
2172
2173 (define-public python-flask-restful
2174 (package
2175 (name "python-flask-restful")
2176 (version "0.3.8")
2177 (source
2178 (origin
2179 (method url-fetch)
2180 (uri (pypi-uri "Flask-RESTful" version))
2181 (patches (search-patches "python-flask-restful-werkzeug-compat.patch"))
2182 (sha256
2183 (base32
2184 "05b9lzx5yc3wgml2bcq50lq35h66m8zpj6dc9advcb5z3acsbaay"))))
2185 (build-system python-build-system)
2186 (propagated-inputs
2187 `(("python-aniso8601" ,python-aniso8601)
2188 ("python-flask" ,python-flask)
2189 ("python-pycrypto" ,python-pycrypto)
2190 ("python-pytz" ,python-pytz)))
2191 (native-inputs
2192 `(;; Optional dependency of Flask. Tests need it.
2193 ("python-blinker" ,python-blinker)
2194 ("python-mock" ,python-mock) ; For tests
2195 ("python-nose" ,python-nose))) ;for tests
2196 (home-page
2197 "https://www.github.com/flask-restful/flask-restful/")
2198 (synopsis
2199 "Flask module for creating REST APIs")
2200 (description
2201 "This package contains a Flask module for creating REST APIs.")
2202 (license license:bsd-3)))
2203
2204 (define-public python-flask-basicauth
2205 (package
2206 (name "python-flask-basicauth")
2207 (version "0.2.0")
2208 (source
2209 (origin
2210 (method url-fetch)
2211 (uri (pypi-uri "Flask-BasicAuth" version))
2212 (sha256
2213 (base32
2214 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
2215 (build-system python-build-system)
2216 (propagated-inputs
2217 `(("python-flask" ,python-flask)))
2218 (home-page
2219 "https://github.com/jpvanhal/flask-basicauth")
2220 (synopsis
2221 "HTTP basic access authentication for Flask")
2222 (description
2223 "This package provides HTTP basic access authentication for Flask.")
2224 (license license:bsd-3)))
2225
2226 (define-public python-flask-htpasswd
2227 (package
2228 (name "python-flask-htpasswd")
2229 (version "0.3.1")
2230 (source
2231 (origin
2232 (method url-fetch)
2233 (uri (pypi-uri "flask-htpasswd" version))
2234 (sha256
2235 (base32
2236 "14q1y1y9i9bhabdnwd25jqzc4ljli23smxfyyh8abxz1vq93pxra"))))
2237 (build-system python-build-system)
2238 (propagated-inputs
2239 `(("python-flask" ,python-flask)
2240 ("python-itsdangerous" ,python-itsdangerous)
2241 ("python-passlib" ,python-passlib)
2242 ("python-tox" ,python-tox)))
2243 (home-page "http://github.com/carsongee/flask-htpasswd")
2244 (synopsis "Basic authentication via htpasswd files in Flask applications")
2245 (description "This package provides Basic authentication via
2246 @file{htpasswd} files and access_token authentication in Flask
2247 applications.")
2248 (license license:bsd-3)))
2249
2250 (define-public python-flask-sqlalchemy
2251 (package
2252 (name "python-flask-sqlalchemy")
2253 (version "2.4.0")
2254 (source (origin
2255 (method url-fetch)
2256 (uri (pypi-uri "Flask-SQLAlchemy" version))
2257 (sha256
2258 (base32
2259 "0nnllf0ddbh9jlhngnyjj98lbxgxr1csaplllx0caw98syq0k5hc"))))
2260 (build-system python-build-system)
2261 (propagated-inputs
2262 `(("python-flask" ,python-flask)
2263 ("python-sqlalchemy" ,python-sqlalchemy)))
2264 (home-page "https://github.com/mitsuhiko/flask-sqlalchemy")
2265 (synopsis "Module adding SQLAlchemy support to your Flask application")
2266 (description
2267 "This package adds SQLAlchemy support to your Flask application.")
2268 (license license:bsd-3)))
2269
2270 (define-public python-flask-restplus
2271 (package
2272 (name "python-flask-restplus")
2273 (version "0.9.2")
2274 (source
2275 (origin
2276 (method url-fetch)
2277 (uri (pypi-uri "flask-restplus" version))
2278 (sha256
2279 (base32
2280 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
2281 (build-system python-build-system)
2282 (arguments
2283 '(#:tests? #f)) ; FIXME: 35/882 tests failing.
2284 ;; #:phases
2285 ;; (modify-phases %standard-phases
2286 ;; (replace 'check
2287 ;; (lambda _
2288 ;; (invoke "nosetests")
2289 ;; #t)))))
2290 (propagated-inputs
2291 `(("python-aniso8601" ,python-aniso8601)
2292 ("python-flask" ,python-flask)
2293 ("python-jsonschema" ,python-jsonschema)
2294 ("python-pytz" ,python-pytz)
2295 ("python-six" ,python-six)))
2296 (native-inputs
2297 `(("python-tzlocal" ,python-tzlocal)
2298 ("python-blinker" ,python-blinker)
2299 ("python-nose" ,python-nose)
2300 ("python-rednose" ,python-rednose)))
2301 (home-page "https://github.com/noirbizarre/flask-restplus")
2302 (synopsis "Framework for documented API development with Flask")
2303 (description "This package provides a framework for API development with
2304 the Flask web framework in Python. It is similar to package
2305 @code{python-flask-restful} but supports the @code{python-swagger}
2306 documentation builder.")
2307 (license license:expat)))
2308
2309 (define-public python-flask-restful-swagger
2310 (package
2311 (name "python-flask-restful-swagger")
2312 (version "0.20.1")
2313 (source
2314 (origin
2315 (method url-fetch)
2316 (uri (pypi-uri "flask-restful-swagger" version))
2317 (sha256
2318 (base32
2319 "1p66f98b5zpypnnz56pxpbirchqj6aniw6qyrp8h572l0dn9xlvq"))))
2320 (build-system python-build-system)
2321 (arguments '(#:tests? #f)) ;no tests
2322 (propagated-inputs
2323 `(("python-flask-restful" ,python-flask-restful)))
2324 (home-page "https://github.com/rantav/flask-restful-swagger")
2325 (synopsis "Extract Swagger specs from Flask-Restful projects")
2326 (description "This package lets you extract Swagger API documentation
2327 specs from your Flask-Restful projects.")
2328 (license license:expat)))
2329
2330 (define-public python2-flask-restful-swagger
2331 (package-with-python2 python-flask-restful-swagger))
2332
2333 (define-public python-htmlmin
2334 (package
2335 (name "python-htmlmin")
2336 (version "0.1.12")
2337 (source
2338 (origin
2339 (method url-fetch)
2340 (uri (pypi-uri "htmlmin" version))
2341 (sha256
2342 (base32
2343 "0y51xhabw6x8jk8k93xl8vznshpz3jb6l28075r5sjip613fzhah"))))
2344 (arguments
2345 `(#:tests? #f)) ; no tests
2346 (build-system python-build-system)
2347 (home-page "https://htmlmin.readthedocs.org/en/latest/")
2348 (synopsis "HTML minifier")
2349 (description "@code{htmlmin} is an HTML minifier that just works.
2350 It comes with safe defaults and easily configurable options.")
2351 (license license:bsd-3)))
2352
2353 (define-public python2-htmlmin
2354 (package-with-python2 python-htmlmin))
2355
2356 (define-public python-flask-htmlmin
2357 (package
2358 (name "python-flask-htmlmin")
2359 (version "1.2")
2360 (source
2361 (origin
2362 (method url-fetch)
2363 (uri (pypi-uri "Flask-HTMLmin" version))
2364 (sha256
2365 (base32
2366 "1n6zlq72kakkw0z2jpq6nh74lfsmxybm4g053pwhc14fbr809348"))))
2367 (propagated-inputs
2368 `(("python-flask" ,python-flask)
2369 ("python-htmlmin" ,python-htmlmin)))
2370 (build-system python-build-system)
2371 (home-page "https://github.com/hamidfzm/Flask-HTMLmin")
2372 (synopsis "HTML response minifier for Flask")
2373 (description
2374 "Minify @code{text/html} MIME type responses when using @code{Flask}.")
2375 (license license:bsd-3)))
2376
2377 (define-public python2-flask-htmlmin
2378 (package-with-python2 python-flask-htmlmin))
2379
2380 (define-public python-jsmin
2381 (package
2382 (name "python-jsmin")
2383 (version "2.2.2")
2384 (source
2385 (origin
2386 (method url-fetch)
2387 (uri (pypi-uri "jsmin" version))
2388 (sha256
2389 (base32
2390 "0fsmqbjvpxvff0984x7c0y8xmf49ax9mncz48b9xjx8wrnr9kpxn"))))
2391 (build-system python-build-system)
2392 (home-page "https://github.com/tikitu/jsmin/")
2393 (synopsis "Python JavaScript minifier")
2394 (description
2395 "@code{jsmin} is a JavaScript minifier, usable from both Python code and
2396 on the command line.")
2397 (license license:expat)))
2398
2399 (define-public python-flask-login
2400 (package
2401 (name "python-flask-login")
2402 (version "0.5.0")
2403 (source
2404 (origin
2405 (method git-fetch)
2406 (uri (git-reference
2407 (url "https://github.com/maxcountryman/flask-login.git")
2408 (commit version)))
2409 (file-name (git-file-name name version))
2410 (sha256
2411 (base32 "11ac924w0y4m0kf3mxnxdlidy88jfa7njw5yyrq16dvnx4iwd8gg"))))
2412 (build-system python-build-system)
2413 (propagated-inputs
2414 `(("python-flask" ,python-flask)))
2415 (native-inputs
2416 ;; For tests.
2417 `(("python-blinker" ,python-blinker)
2418 ("python-coverage" ,python-coverage)
2419 ("python-mock" ,python-mock)
2420 ("python-pycodestyle" ,python-pycodestyle)
2421 ("python-pyflakes" ,python-pyflakes)
2422 ("python-pytest" ,python-pytest)
2423 ("python-semantic-version" ,python-semantic-version)
2424 ("python-werkzeug" ,python-werkzeug)))
2425 (home-page "https://github.com/maxcountryman/flask-login")
2426 (synopsis "User session management for Flask")
2427 (description
2428 "@code{Flask-Login} provides user session management for Flask. It
2429 handles the common tasks of logging in, logging out, and remembering your
2430 users' sessions over extended periods of time.")
2431 (license license:expat)))
2432
2433 (define-public python2-flask-login
2434 (package-with-python2 python-flask-login))
2435
2436 (define-public python-oauth2client
2437 (package
2438 (name "python-oauth2client")
2439 (version "4.0.0")
2440 (source
2441 (origin
2442 (method url-fetch)
2443 (uri (pypi-uri "oauth2client" version))
2444 (sha256
2445 (base32
2446 "1irqqap2zibysf8dba8sklfqikia579srd0phm5n754ni0h59gl0"))))
2447 (build-system python-build-system)
2448 (arguments
2449 `(#:tests? #f))
2450 (propagated-inputs
2451 `(("python-httplib2" ,python-httplib2)
2452 ("python-pyasn1" ,python-pyasn1)
2453 ("python-pyasn1-modules" ,python-pyasn1-modules)
2454 ("python-rsa" ,python-rsa)
2455 ("python-six" ,python-six)))
2456 (home-page "https://github.com/google/oauth2client/")
2457 (synopsis "OAuth 2.0 client library")
2458 (description "@code{python-oauth2client} provides an OAuth 2.0 client
2459 library for Python")
2460 (license license:asl2.0)))
2461
2462 (define-public python2-oauth2client
2463 (package-with-python2 python-oauth2client))
2464
2465 (define-public python-flask-oidc
2466 (package
2467 (name "python-flask-oidc")
2468 (version "1.1.1")
2469 (source
2470 (origin
2471 (method url-fetch)
2472 (uri (pypi-uri "flask-oidc" version))
2473 (sha256
2474 (base32
2475 "1ay5j0mf174bix7i67hclr95gv16z81fpx0dijvi0gydvdj3ddy2"))))
2476 (build-system python-build-system)
2477 (propagated-inputs
2478 `(("python-flask" ,python-flask)
2479 ("python-itsdangerous" ,python-itsdangerous)
2480 ("python-oauth2client" ,python-oauth2client)
2481 ("python-six" ,python-six)))
2482 (native-inputs
2483 `(("python-nose" ,python-nose)
2484 ("python-mock" ,python-mock)))
2485 (home-page "https://github.com/puiterwijk/flask-oidc")
2486 (synopsis "OpenID Connect extension for Flask")
2487 (description "@code{python-flask-oidc} provides an OpenID Connect extension
2488 for Flask.")
2489 (license license:bsd-2)))
2490
2491 (define-public python-webassets
2492 (package
2493 (name "python-webassets")
2494 (version "0.12.1")
2495 (source
2496 (origin
2497 (method url-fetch)
2498 (uri (pypi-uri "webassets" version))
2499 (sha256
2500 (base32
2501 "1nrqkpb7z46h2b77xafxihqv3322cwqv6293ngaky4j3ff4cing7"))))
2502 (build-system python-build-system)
2503 (native-inputs
2504 `(("python-jinja2" ,python-jinja2)
2505 ("python-mock" ,python-mock)
2506 ("python-nose" ,python-nose)
2507 ("python-pytest" ,python-pytest)))
2508 (home-page "https://github.com/miracle2k/webassets")
2509 (synopsis "Media asset management")
2510 (description "Merges, minifies and compresses Javascript and CSS files,
2511 supporting a variety of different filters, including YUI, jsmin, jspacker or
2512 CSS tidy. Also supports URL rewriting in CSS files.")
2513 (license license:bsd-2)))
2514
2515 (define-public python-cssmin
2516 (package
2517 (name "python-cssmin")
2518 (version "0.2.0")
2519 (source
2520 (origin
2521 (method url-fetch)
2522 (uri (pypi-uri "cssmin" version))
2523 (sha256
2524 (base32
2525 "1dk723nfm2yf8cp4pj785giqlwv42l0kj8rk40kczvq1hk6g04p0"))))
2526 (build-system python-build-system)
2527 (home-page "https://github.com/zacharyvoase/cssmin")
2528 (synopsis "Python port of the YUI CSS Compressor")
2529 (description "Python port of the YUI CSS Compressor.")
2530 (license (list license:expat license:bsd-3))))
2531
2532 (define-public python2-cssmin
2533 (package-with-python2 python-cssmin))
2534
2535 (define-public python-elasticsearch
2536 (package
2537 (name "python-elasticsearch")
2538 (version "7.1.0")
2539 (source
2540 (origin
2541 (method url-fetch)
2542 (uri (pypi-uri "elasticsearch" version))
2543 (sha256
2544 (base32
2545 "0rnjvlhw4v3vg14l519qliy1s1zpmx3827q0xfviwvk42rr7hh01"))))
2546 (build-system python-build-system)
2547 (native-inputs
2548 `(("python-mock" ,python-mock)
2549 ("python-nosexcover" ,python-nosexcover)
2550 ("python-pyaml" ,python-pyaml)
2551 ("python-requests" ,python-requests)))
2552 (propagated-inputs
2553 `(("urllib3" ,python-urllib3)))
2554 (arguments
2555 ;; tests require the test_elasticsearch module but it is not distributed.
2556 `(#:tests? #f))
2557 (home-page "https://github.com/elastic/elasticsearch-py")
2558 (synopsis "Low-level client for Elasticsearch")
2559 (description "Official low-level client for Elasticsearch. Its goal is to
2560 provide common ground for all Elasticsearch-related code in Python; because of
2561 this it tries to be opinion-free and very extendable.")
2562 (license license:expat)))
2563
2564 (define-public python2-elasticsearch
2565 (package-with-python2 python-elasticsearch))
2566
2567 (define-public python-flask-script
2568 (package
2569 (name "python-flask-script")
2570 (version "2.0.6")
2571 (source
2572 (origin
2573 (method url-fetch)
2574 (uri (pypi-uri "Flask-Script" version))
2575 (sha256
2576 (base32
2577 "0r8w2v89nj6b9p91p495cga5m72a673l2wc0hp0zqk05j4yrc9b4"))))
2578 (build-system python-build-system)
2579 (arguments
2580 `(#:phases
2581 (modify-phases %standard-phases
2582 (add-after 'unpack 'patch-tests
2583 (lambda _
2584 (substitute* "tests.py"
2585 (("flask\\.ext\\.script") "flask_script"))
2586 #t)))))
2587 (propagated-inputs
2588 `(("python-flask" ,python-flask)
2589 ("python-argcomplete" ,python-argcomplete)
2590 ("python-werkzeug" ,python-werkzeug)))
2591 (native-inputs
2592 `(("python-pytest" ,python-pytest)))
2593 (home-page
2594 "https://github.com/smurfix/flask-script")
2595 (synopsis "Scripting support for Flask")
2596 (description "The Flask-Script extension provides support for writing
2597 external scripts in Flask. This includes running a development server,
2598 a customised Python shell, scripts to set up your database, cronjobs,
2599 and other command-line tasks that belong outside the web application
2600 itself.")
2601 (license license:bsd-3)))
2602
2603 (define-public python2-flask-script
2604 (package-with-python2 python-flask-script))
2605
2606 (define-public python-flask-migrate
2607 (package
2608 (name "python-flask-migrate")
2609 (version "2.5.3")
2610 (source
2611 (origin
2612 (method url-fetch)
2613 (uri (pypi-uri "Flask-Migrate" version))
2614 (sha256
2615 (base32
2616 "1vip9ww6l18dxffjsggm83k71zkvihxpnhaswpv8klh95s6517d6"))))
2617 (build-system python-build-system)
2618 (propagated-inputs
2619 `(("python-flask" ,python-flask)
2620 ("python-alembic" ,python-alembic)
2621 ("python-sqlalchemy" ,python-sqlalchemy)
2622 ("python-flask-script" ,python-flask-script)
2623 ("python-flask-sqlalchemy" ,python-flask-sqlalchemy)))
2624 (home-page "https://github.com/miguelgrinberg/flask-migrate/")
2625 (synopsis "SQLAlchemy database migrations for Flask programs using
2626 Alembic")
2627 (description "This package contains SQLAlchemy database migration tools
2628 for Flask programs that are using @code{python-alembic}.")
2629 (license license:expat)))
2630
2631 (define-public python2-flask-migrate
2632 (package-with-python2 python-flask-migrate))
2633
2634 (define-public python-genshi
2635 (package
2636 (name "python-genshi")
2637 (version "0.7.2")
2638 (source
2639 (origin
2640 (method git-fetch)
2641 (uri (git-reference
2642 (url "https://github.com/edgewall/genshi.git")
2643 (commit version)))
2644 (file-name (git-file-name name version))
2645 (sha256
2646 (base32 "06rch30x10l105k5b6rahd839lkhmgrzn6691wbci0cb2fzps32w"))))
2647 (build-system python-build-system)
2648 (home-page "https://genshi.edgewall.org/")
2649 (synopsis "Toolkit for generation of output for the web")
2650 (description "Genshi is a Python library that provides an integrated set
2651 of components for parsing, generating, and processing HTML, XML or other
2652 textual content for output generation on the web.")
2653 (license license:bsd-3)))
2654
2655 (define-public python2-genshi
2656 (package-with-python2 python-genshi))
2657
2658 (define-public python-flask-principal
2659 (package
2660 (name "python-flask-principal")
2661 (version "0.4.0")
2662 (source
2663 (origin
2664 (method url-fetch)
2665 (uri (pypi-uri "Flask-Principal" version))
2666 (sha256
2667 (base32
2668 "0lwlr5smz8vfm5h9a9i7da3q1c24xqc6vm9jdywdpgxfbi5i7mpm"))))
2669 (build-system python-build-system)
2670 (propagated-inputs
2671 `(("python-blinker" ,python-blinker)))
2672 (native-inputs
2673 `(("python-flask" ,python-flask)
2674 ("python-nose" ,python-nose)))
2675 (home-page "https://pythonhosted.org/Flask-Principal/")
2676 (synopsis "Identity management for Flask")
2677 (description "@code{flask_principal} is a identity management library for
2678 Flask. It supports managing both authentication and authorization data in a
2679 thread-local variable.")
2680 (license license:expat)))
2681
2682 (define-public python2-flask-principal
2683 (package-with-python2 python-flask-principal))
2684
2685 (define-public python-flask-httpauth
2686 (package
2687 (name "python-flask-httpauth")
2688 (version "3.2.3")
2689 (source
2690 (origin
2691 (method url-fetch)
2692 (uri (pypi-uri "Flask-HTTPAuth" version))
2693 (sha256
2694 (base32
2695 "13gff5w1mqpzm5nccyg02v3ifb9ifqh5k866cssjhghhg6msfjsz"))))
2696 (build-system python-build-system)
2697 (native-inputs
2698 `(("python-flask" ,python-flask)))
2699 (home-page "https://github.com/miguelgrinberg/flask-httpauth/")
2700 (synopsis "Basic and Digest HTTP authentication for Flask routes")
2701 (description "@code{flask_httpauth} provides Basic and Digest HTTP
2702 authentication for Flask routes.")
2703 (license license:expat)))
2704
2705 (define-public python2-flask-httpauth
2706 (package-with-python2 python-flask-httpauth))
2707
2708 (define-public python-uritemplate
2709 (package
2710 (name "python-uritemplate")
2711 (version "3.0.0")
2712 (source
2713 (origin
2714 (method url-fetch)
2715 (uri (pypi-uri "uritemplate" version))
2716 (sha256
2717 (base32
2718 "0781gm9g34wa0asc19dx81ng0nqq07igzv3bbvdqmz13pv7469n0"))))
2719 (build-system python-build-system)
2720 (home-page "https://uritemplate.readthedocs.org")
2721 (synopsis "Library to deal with URI Templates")
2722 (description "@code{uritemplate} provides Python library to deal with URI
2723 Templates.")
2724 (license license:bsd-2)))
2725
2726 (define-public python2-uritemplate
2727 (package-with-python2 python-uritemplate))
2728
2729 (define-public python-publicsuffix
2730 (package
2731 (name "python-publicsuffix")
2732 (version "1.1.0")
2733 (source (origin
2734 (method url-fetch)
2735 (uri (pypi-uri "publicsuffix" version))
2736 (sha256
2737 (base32
2738 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
2739 (build-system python-build-system)
2740 (arguments
2741 `(#:tests? #f)) ; tests use the internet
2742 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
2743 (synopsis "Get suffix for a domain name")
2744 (description "Get a public suffix for a domain name using the Public Suffix
2745 List.")
2746 (license license:expat)))
2747
2748 (define-public python2-publicsuffix
2749 (package-with-python2 python-publicsuffix))
2750
2751 (define-public python-publicsuffix2
2752 (package
2753 (name "python-publicsuffix2")
2754 (version "2.20191221")
2755 (source
2756 (origin
2757 (method url-fetch)
2758 (uri (pypi-uri "publicsuffix2" version))
2759 (sha256
2760 (base32 "0yzysvfj1najr1mb4pcqrbmjir3xpb69rlffln95a3cdm8qwry00"))))
2761 (build-system python-build-system)
2762 (arguments
2763 '(#:phases
2764 (modify-phases %standard-phases
2765 (add-after 'unpack 'ignore-maintainer-inputs
2766 (lambda _
2767 ;; Comment out a demand for python-requests, which is used only by
2768 ;; the unused ‘update_psl’ helper command.
2769 (substitute* "setup.py"
2770 (("'requests " match)
2771 (format "# ~a" match)))
2772 #t)))
2773 #:tests? #f)) ; the test suite requires network access
2774 (home-page "https://github.com/pombredanne/python-publicsuffix2")
2775 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
2776 (description "Get a public suffix for a domain name using the Public Suffix
2777 List. Forked from and using the same API as the publicsuffix package.")
2778 (license (list license:expat license:mpl2.0))))
2779
2780 (define-public python2-publicsuffix2
2781 (package-with-python2 python-publicsuffix2))
2782
2783 (define-public python-werkzeug
2784 (package
2785 (name "python-werkzeug")
2786 (version "1.0.0")
2787 (source
2788 (origin
2789 (method url-fetch)
2790 (uri (pypi-uri "Werkzeug" version))
2791 (sha256
2792 (base32
2793 "15kh0z61klp62mrc1prka13xsshxn0rsp1j1s2964iw86yisi6qn"))))
2794 (build-system python-build-system)
2795 (arguments
2796 '(#:phases
2797 (modify-phases %standard-phases
2798 (delete 'check)
2799 (add-after 'install 'check
2800 (lambda* (#:key inputs outputs #:allow-other-keys)
2801 (add-installed-pythonpath inputs outputs)
2802 (invoke "python" "-m" "pytest"))))))
2803 (propagated-inputs
2804 `(("python-requests" ,python-requests)))
2805 (native-inputs
2806 `(("python-pytest" ,python-pytest)
2807 ("python-pytest-timeout" ,python-pytest-timeout)))
2808 (home-page "https://www.palletsprojects.org/p/werkzeug/")
2809 (synopsis "Utilities for WSGI applications")
2810 (description "One of the most advanced WSGI utility modules. It includes a
2811 powerful debugger, full-featured request and response objects, HTTP utilities to
2812 handle entity tags, cache control headers, HTTP dates, cookie handling, file
2813 uploads, a powerful URL routing system and a bunch of community-contributed
2814 addon modules.")
2815 (license license:x11)))
2816
2817 (define-public python2-werkzeug
2818 (package-with-python2 python-werkzeug))
2819
2820 (define-public python-bottle
2821 (package
2822 (name "python-bottle")
2823 (version "0.12.13")
2824 (source
2825 (origin
2826 (method url-fetch)
2827 (uri (pypi-uri "bottle" version))
2828 (sha256
2829 (base32
2830 "0m9k2a7yxvggc4kw8fsvj381vgsvfcdshg5nzy6vwrxiw2p53drr"))))
2831 (build-system python-build-system)
2832 (home-page "http://bottlepy.org/")
2833 (synopsis "WSGI framework for small web-applications.")
2834 (description "@code{python-bottle} is a WSGI framework for small web-applications.")
2835 (license license:expat)))
2836
2837 (define-public python2-bottle
2838 (package-with-python2 python-bottle))
2839
2840 (define-public python-wtforms
2841 (package
2842 (name "python-wtforms")
2843 (version "2.1")
2844 (source
2845 (origin
2846 (method url-fetch)
2847 (uri (pypi-uri "WTForms" version ".zip"))
2848 (sha256
2849 (base32
2850 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
2851 (build-system python-build-system)
2852 (arguments
2853 '(#:phases
2854 (modify-phases %standard-phases
2855 (add-after 'unpack 'remove-django-test
2856 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
2857 (lambda _
2858 (substitute*
2859 "tests/runtests.py"
2860 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
2861 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
2862 #t)))))
2863 (native-inputs
2864 `(("unzip" ,unzip)))
2865 (home-page "http://wtforms.simplecodes.com/")
2866 (synopsis
2867 "Form validation and rendering library for Python web development")
2868 (description
2869 "WTForms is a flexible forms validation and rendering library
2870 for Python web development. It is very similar to the web form API
2871 available in Django, but is a standalone package.")
2872 (license license:bsd-3)))
2873
2874 (define-public python2-wtforms
2875 (package-with-python2 python-wtforms))
2876
2877 (define-public python-paste
2878 (package
2879 (name "python-paste")
2880 (version "3.0.6")
2881 (source
2882 (origin
2883 (method url-fetch)
2884 (uri (pypi-uri "Paste" version))
2885 (sha256
2886 (base32
2887 "14lbi9asn5agsdf7r97prkjpz7amgmp529lbvfhf0nv881xczah6"))
2888 (patches (search-patches "python-paste-remove-timing-test.patch"))
2889 (modules '((guix build utils)))
2890 (snippet
2891 '(begin
2892 ;; This test calls out to the internet.
2893 (delete-file "tests/test_proxy.py") #t))))
2894 (build-system python-build-system)
2895 (native-inputs
2896 `(("python-pytest" ,python-pytest)
2897 ("python-pytest-runner" ,python-pytest-runner)
2898 ("python-nose" ,python-nose)))
2899 (propagated-inputs
2900 `(("python-six" ,python-six)))
2901 (home-page "https://pythonpaste.readthedocs.io/")
2902 (synopsis
2903 "Python web development tools, focusing on WSGI")
2904 (description
2905 "Paste provides a variety of web development tools and middleware which
2906 can be nested together to build web applications. Paste's design closely
2907 follows ideas flowing from WSGI (Web Standard Gateway Interface).")
2908 (license license:expat)))
2909
2910 (define-public python2-paste
2911 (package-with-python2 python-paste))
2912
2913 (define-public python-pastescript
2914 (package
2915 (name "python-pastescript")
2916 (version "2.0.2")
2917 (source
2918 (origin
2919 (method url-fetch)
2920 (uri (pypi-uri "PasteScript" version))
2921 (sha256
2922 (base32
2923 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
2924 (build-system python-build-system)
2925 (native-inputs
2926 `(("python-nose" ,python-nose)))
2927 (propagated-inputs
2928 `(("python-paste" ,python-paste)
2929 ("python-pastedeploy" ,python-pastedeploy)))
2930 (home-page (string-append "https://web.archive.org/web/20161025192515/"
2931 "http://pythonpaste.org/script/"))
2932 (arguments
2933 '(;; Unfortunately, this requires the latest unittest2,
2934 ;; but that requires traceback2 which requires linecache2 which requires
2935 ;; unittest2. So we're skipping tests for now.
2936 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
2937 ;; so in theory we could get around this situation somehow.)
2938 #:tests? #f))
2939 (synopsis
2940 "Pluggable command line tool for serving web applications and more")
2941 (description
2942 "PasteScript is a plugin-friendly command line tool which provides a
2943 variety of features, from launching web applications to bootstrapping project
2944 layouts.")
2945 (license license:expat)))
2946
2947 (define-public python2-pastescript
2948 (package-with-python2 python-pastescript))
2949
2950 (define-public python2-urlgrabber
2951 (package
2952 (name "python2-urlgrabber")
2953 (version "3.10.2")
2954 (source
2955 (origin
2956 (method url-fetch)
2957 (uri (pypi-uri "urlgrabber" version))
2958 (sha256
2959 (base32 "0w1h7hlsq406bxfy2pn4i9bd003bwl0q9b7p03z3g6yl0d21ddq5"))))
2960 (build-system python-build-system)
2961 (arguments `(#:python ,python-2)) ; urlgrabber supports python2 only
2962 (home-page "http://urlgrabber.baseurl.org")
2963 (synopsis "High-level cross protocol url-grabber")
2964 (description "@code{urlgrabber} is Python2 library that unifies access to
2965 files available on web, FTP or locally. It supports HTTP, FTP and file://
2966 protocols, it supports features like HTTP keep-alive, reget, throttling and
2967 more.")
2968 (license license:lgpl2.1+)))
2969
2970 (define-public python-pycares
2971 (package
2972 (name "python-pycares")
2973 (version "2.3.0")
2974 (source
2975 (origin
2976 (method url-fetch)
2977 (uri (pypi-uri "pycares" version))
2978 (sha256
2979 (base32
2980 "0h4fxw5drrhfyslzmfpljk0qnnpbhhb20hnnndzahhbwylyw1x1n"))))
2981 (build-system python-build-system)
2982 (arguments
2983 `(#:tests? #f)) ;tests require internet access
2984 (home-page "http://github.com/saghul/pycares")
2985 (synopsis "Python interface for @code{c-ares}")
2986 (description "@code{pycares} is a Python module which provides an
2987 interface to @code{c-ares}, a C library that performs DNS requests and
2988 name resolutions asynchronously.")
2989 (license license:expat)))
2990
2991 (define-public python-yarl
2992 (package
2993 (name "python-yarl")
2994 (version "1.1.1")
2995 (source
2996 (origin
2997 (method url-fetch)
2998 (uri (pypi-uri "yarl" version))
2999 (sha256
3000 (base32
3001 "1s6z13g8vgxfkkqwhn6imnm7pl7ky9arv4jygnn6bcndcbidg7d6"))))
3002 (build-system python-build-system)
3003 (native-inputs
3004 `(("python-pytest" ,python-pytest)
3005 ("python-pytest-runner" ,python-pytest-runner)))
3006 (propagated-inputs
3007 `(("python-idna" ,python-idna)
3008 ("python-multidict" ,python-multidict)))
3009 (home-page "https://github.com/aio-libs/yarl/")
3010 (synopsis "Yet another URL library")
3011 (description "@code{yarl} module provides handy @code{URL} class
3012 for URL parsing and changing.")
3013 (license license:asl2.0)))
3014
3015 (define-public python-google-api-client
3016 (package
3017 (name "python-google-api-client")
3018 (version "1.6.7")
3019 (source
3020 (origin
3021 (method url-fetch)
3022 (uri (pypi-uri "google-api-python-client" version))
3023 (sha256
3024 (base32
3025 "1wpbbbxfpy9mwxdy3kn352cb590ladv574j1aa2l4grjdqw3ln05"))))
3026 (build-system python-build-system)
3027 (arguments
3028 '(#:tests? #f)) ; tests require internet access
3029 (native-inputs
3030 `(("python-httplib2" ,python-httplib2)
3031 ("python-six" ,python-six)
3032 ("python-oauth2client" ,python-oauth2client)
3033 ("python-uritemplate" ,python-uritemplate)))
3034 (home-page "https://github.com/google/google-api-python-client")
3035 (synopsis "Core Python library for accessing Google APIs")
3036 (description "Python client library for Google's discovery based APIs")
3037 (license license:asl2.0)))
3038
3039 (define-public python2-google-api-client
3040 (package-with-python2 python-google-api-client))
3041
3042 (define-public python-hawkauthlib
3043 (package
3044 (name "python-hawkauthlib")
3045 (version "2.0.0")
3046 (source
3047 (origin
3048 (method url-fetch)
3049 (uri (pypi-uri "hawkauthlib" version))
3050 (sha256
3051 (base32
3052 "03ai47s4h8nfnrf25shbfvkm1b9n1ccd4nmmj280sg1fayi69zgg"))))
3053 (build-system python-build-system)
3054 (propagated-inputs
3055 `(("python-requests" ,python-requests)
3056 ("python-webob" ,python-webob)))
3057 (home-page "https://github.com/mozilla-services/hawkauthlib")
3058 (synopsis "Hawk Access Authentication protocol")
3059 (description
3060 "This is a low-level Python library for implementing Hawk Access Authentication,
3061 a simple HTTP request-signing scheme.")
3062 (license license:mpl2.0)))
3063
3064 (define-public python-pybrowserid
3065 (package
3066 (name "python-pybrowserid")
3067 (version "0.14.0")
3068 (source
3069 (origin
3070 (method url-fetch)
3071 (uri (pypi-uri "PyBrowserID" version))
3072 (sha256
3073 (base32
3074 "1qvi79kfb8x9kxkm5lw2mp42hm82cpps1xknmsb5ghkwx1lpc8kc"))))
3075 (build-system python-build-system)
3076 (propagated-inputs
3077 `(("python-requests" ,python-requests)))
3078 (native-inputs
3079 `(("python-mock" ,python-mock)))
3080 (home-page "https://github.com/mozilla/PyBrowserID")
3081 (synopsis "Python library for the BrowserID protocol")
3082 (description
3083 "This is a Python client library for the BrowserID protocol that
3084 underlies Mozilla Persona.")
3085 (license license:mpl2.0)))
3086
3087 (define-public python-pyfxa
3088 (package
3089 (name "python-pyfxa")
3090 (version "0.6.0")
3091 (source
3092 (origin
3093 (method url-fetch)
3094 (uri (pypi-uri "PyFxA" version))
3095 (sha256
3096 (base32
3097 "0axl16fyrz2r88gnw4b12mk7dpkqscv8c4wsc1y5hicl7bsbc4fm"))))
3098 (build-system python-build-system)
3099 (arguments '(#:tests? #f)) ; 17 tests require network access
3100 (propagated-inputs
3101 `(("python-cryptography" ,python-cryptography)
3102 ("python-hawkauthlib" ,python-hawkauthlib)
3103 ("python-pybrowserid" ,python-pybrowserid)
3104 ("python-requests" ,python-requests)
3105 ("python-six" ,python-six)))
3106 (native-inputs
3107 `(("python-grequests" ,python-grequests)
3108 ("python-mock" ,python-mock)
3109 ("python-responses" ,python-responses)
3110 ("python-unittest2" ,python-unittest2)))
3111 (home-page "https://github.com/mozilla/PyFxA")
3112 (synopsis "Firefox Accounts client library for Python")
3113 (description
3114 "This is a Python library for interacting with the Firefox Accounts
3115 ecosystem.")
3116 (license license:mpl2.0)))
3117
3118 (define-public python-hyperlink
3119 (package
3120 (name "python-hyperlink")
3121 (version "19.0.0")
3122 (source
3123 (origin
3124 (method url-fetch)
3125 (uri (pypi-uri "hyperlink" version))
3126 (sha256
3127 (base32
3128 "0m2nhi0j8wmgfscf974wd5v1xfq8mah286hil6npy1ys0m3y7222"))))
3129 (build-system python-build-system)
3130 (propagated-inputs
3131 `(("python-idna" ,python-idna)))
3132 (home-page "https://github.com/python-hyper/hyperlink")
3133 (synopsis "Python module to create immutable URLs according to spec")
3134 (description "This package provides a Python module to create immutable, and
3135 correct URLs for Python according to RFCs 3986 and 3987.")
3136 (license license:expat)))
3137
3138 (define-public python-treq
3139 (package
3140 (name "python-treq")
3141 (version "18.6.0")
3142 (source
3143 (origin
3144 (method url-fetch)
3145 (uri (pypi-uri "treq" version))
3146 (sha256
3147 (base32
3148 "0j4zwq9p1c9piv1vc66nxcv9s6hdinf90jwkbsm91k14npv9zq4i"))))
3149 (build-system python-build-system)
3150 (propagated-inputs
3151 `(("python-attrs" ,python-attrs)
3152 ("python-idna" ,python-idna)
3153 ("python-incremental" ,python-incremental)
3154 ("python-requests" ,python-requests)
3155 ("python-service-identity" ,python-service-identity)
3156 ("python-twisted" ,python-twisted)))
3157 (home-page "https://github.com/twisted/treq")
3158 (synopsis "Requests-like API built on top of twisted.web's Agent")
3159 (description "This package provides an HTTP library inspired by
3160 @code{requests}} but written on top of Twisted's @code{Agents}. It offers a
3161 high level API for making HTTP requests when using Twisted.")
3162 (license license:expat)))
3163
3164 (define-public python-autobahn
3165 (package
3166 (name "python-autobahn")
3167 (version "19.2.1")
3168 (source
3169 (origin
3170 (method url-fetch)
3171 (uri (pypi-uri "autobahn" version))
3172 (sha256
3173 (base32
3174 "1mm7j24ls01c7jb1ad5p5cpyxvzgydiyf8b04ihykh2v8g98j0x7"))))
3175 (build-system python-build-system)
3176 (arguments
3177 ;; The tests fail to run:
3178 ;; https://github.com/crossbario/autobahn-python/issues/1117
3179 `(#:tests? #f))
3180 (propagated-inputs
3181 `(("python-cffi" ,python-cffi)
3182 ("python-twisted" ,python-twisted)
3183 ("python-txaio" ,python-txaio)))
3184 (home-page "https://crossbar.io/autobahn/")
3185 (synopsis "Web Application Messaging Protocol implementation")
3186 (description "This package provides an implementation of the @dfn{Web Application
3187 Messaging Protocol} (WAMP). WAMP connects components in distributed
3188 applications using Publish and Subscribe (PubSub) and routed Remote Procedure
3189 Calls (rRPC). It is ideal for distributed, multi-client and server applications
3190 such as IoT applications or multi-user database-driven business applications.")
3191 (license license:expat)))
3192
3193 (define-public python-ws4py
3194 (package
3195 (name "python-ws4py")
3196 (version "0.5.1")
3197 (source
3198 (origin
3199 (method url-fetch)
3200 (uri (pypi-uri "ws4py" version))
3201 (sha256
3202 (base32
3203 "10slbbf2jm4hpr92jx7kh7mhf48sjl01v2w4d8z3f1p0ybbp7l19"))))
3204 (build-system python-build-system)
3205 (arguments
3206 `(#:phases
3207 (modify-phases %standard-phases
3208 (add-after 'unpack 'python3.7-compatibility
3209 (lambda _
3210 (substitute* '("ws4py/server/tulipserver.py"
3211 "ws4py/async_websocket.py")
3212 (("asyncio.async")
3213 "asyncio.ensure_future"))
3214 #t))
3215 ;; We don't have a package for cherrypy.
3216 (add-after 'unpack 'remove-cherrypy-support
3217 (lambda _
3218 (delete-file "ws4py/server/cherrypyserver.py")
3219 #t)))))
3220 (propagated-inputs
3221 `(("python-gevent" ,python-gevent)
3222 ("python-tornado" ,python-tornado)))
3223 (home-page "https://github.com/Lawouach/WebSocket-for-Python")
3224 (synopsis "WebSocket client and server library")
3225 (description
3226 "This package provides a WebSocket client and server library for
3227 Python.")
3228 (license license:bsd-3)))
3229
3230 ;; kaldi-gstreamer-server does not yet work with python-ws4py > 0.3.2
3231 (define-public python2-ws4py-for-kaldi-gstreamer-server
3232 (package (inherit python-ws4py)
3233 (name "python2-ws4py")
3234 (version "0.3.2")
3235 (source
3236 (origin
3237 (method url-fetch)
3238 (uri (pypi-uri "ws4py" version))
3239 (sha256
3240 (base32
3241 "12ys3dv98awhrxd570vla3hqgzq3avjhq4yafhghhq3a942y1928"))))
3242 (build-system python-build-system)
3243 (arguments
3244 `(#:python ,python-2
3245 #:phases
3246 (modify-phases %standard-phases
3247 ;; We don't have a package for cherrypy.
3248 (add-after 'unpack 'remove-cherrypy-support
3249 (lambda _
3250 (delete-file "ws4py/server/cherrypyserver.py")
3251 #t)))))
3252 (propagated-inputs
3253 `(("python-gevent" ,python2-gevent)
3254 ("python-tornado" ,python2-tornado)))))
3255
3256 (define-public python-slugify
3257 (package
3258 (name "python-slugify")
3259 (version "3.0.4")
3260 (source
3261 (origin
3262 (method url-fetch)
3263 (uri (pypi-uri "python-slugify" version))
3264 (sha256
3265 (base32 "0dv97yi5fq074q5qyqbin09pmi8ixg36caf5nkpw2bqkd8jh6pap"))
3266 (patches
3267 (search-patches "python-slugify-depend-on-unidecode.patch"))))
3268 (native-inputs
3269 `(("python-wheel" ,python-wheel)))
3270 (propagated-inputs
3271 `(("python-unidecode" ,python-unidecode)))
3272 (arguments
3273 `(#:phases
3274 (modify-phases %standard-phases
3275 (replace 'check
3276 (lambda _
3277 (invoke "python" "test.py"))))))
3278 (build-system python-build-system)
3279 (home-page "https://github.com/un33k/python-slugify")
3280 (synopsis "Python Slugify application that handles Unicode")
3281 (description "This package provides a @command{slufigy} command and
3282 library to create slugs from unicode strings while keeping it DRY.")
3283 (license license:expat)))
3284
3285 (define-public python-branca
3286 (package
3287 (name "python-branca")
3288 (version "0.3.1")
3289 (source
3290 (origin
3291 (method url-fetch)
3292 (uri (pypi-uri "branca" version))
3293 (sha256
3294 (base32
3295 "0pmigd521j2228xf8x34vbx0niwvms7xl7za0lymywj0vydjqxiy"))))
3296 (build-system python-build-system)
3297 (propagated-inputs
3298 `(("python-jinja2" ,python-jinja2)
3299 ("python-six" ,python-six)))
3300 (native-inputs
3301 `(("python-pytest" ,python-pytest)))
3302 (home-page "https://github.com/python-visualization/branca")
3303 (synopsis "Generate complex HTML+JS pages with Python")
3304 (description "Generate complex HTML+JS pages with Python")
3305 (license license:expat)))
3306
3307 (define-public python-tinycss2
3308 (package
3309 (name "python-tinycss2")
3310 (version "1.0.2")
3311 (source
3312 (origin
3313 (method url-fetch)
3314 (uri (pypi-uri "tinycss2" version))
3315 (sha256
3316 (base32 "1kw84y09lggji4krkc58jyhsfj31w8npwhznr7lf19d0zbix09v4"))))
3317 (build-system python-build-system)
3318 (arguments
3319 `(#:phases
3320 (modify-phases %standard-phases
3321 (replace 'check
3322 (lambda _ (invoke "pytest"))))))
3323 (propagated-inputs
3324 `(("python-webencodings" ,python-webencodings)))
3325 (native-inputs
3326 `(("python-pytest-flake8" ,python-pytest-flake8)
3327 ("python-pytest-isort" ,python-pytest-isort)
3328 ("python-pytest-runner" ,python-pytest-runner)))
3329 (home-page "https://tinycss2.readthedocs.io/")
3330 (synopsis "Low-level CSS parser for Python")
3331 (description "@code{tinycss2} can parse strings, return Python objects
3332 representing tokens and blocks, and generate CSS strings corresponding to
3333 these objects.
3334
3335 Based on the CSS Syntax Level 3 specification, @code{tinycss2} knows the
3336 grammar of CSS but doesn’t know specific rules, properties or values supported
3337 in various CSS modules.")
3338 (license license:bsd-3)))
3339
3340 (define-public python-cssselect2
3341 (package
3342 (name "python-cssselect2")
3343 (version "0.2.2")
3344 (source
3345 (origin
3346 (method url-fetch)
3347 (uri (pypi-uri "cssselect2" version))
3348 (sha256
3349 (base32 "0skymzb4ncrm2zdsy80f53vi0arf776lvbp51hzh4ayp1il5lj3h"))))
3350 (build-system python-build-system)
3351 (arguments
3352 `(#:phases
3353 (modify-phases %standard-phases
3354 (replace 'check
3355 (lambda _ (invoke "pytest"))))))
3356 (propagated-inputs
3357 `(("python-tinycss2" ,python-tinycss2)))
3358 (native-inputs
3359 `(("python-pytest-cov" ,python-pytest-cov)
3360 ("python-pytest-flake8" ,python-pytest-flake8)
3361 ("python-pytest-isort" ,python-pytest-isort)
3362 ("python-pytest-runner" ,python-pytest-runner)))
3363 (home-page "https://cssselect2.readthedocs.io/")
3364 (synopsis "CSS selectors for Python ElementTree")
3365 (description "@code{cssselect2} is a straightforward implementation of
3366 CSS3 Selectors for markup documents (HTML, XML, etc.) that can be read by
3367 ElementTree-like parsers (including cElementTree, lxml, html5lib, etc.).
3368
3369 Unlike the Python package @code{cssselect}, it does not translate selectors to
3370 XPath and therefore does not have all the correctness corner cases that are
3371 hard or impossible to fix in cssselect.")
3372 (license license:bsd-3)))
3373
3374 (define-public gunicorn
3375 (package
3376 (name "gunicorn")
3377 (version "20.0.0")
3378 (source
3379 (origin
3380 (method url-fetch)
3381 (uri (pypi-uri "gunicorn" version))
3382 (sha256
3383 (base32
3384 "0l1zm8a0vz8ws3lkn8q9a0f93ipdzyvlf2zlwdj5xyadh6jdwsgg"))))
3385 (outputs '("out" "doc"))
3386 (build-system python-build-system)
3387 (arguments
3388 `(#:phases
3389 (modify-phases %standard-phases
3390 (add-after 'build 'build-doc
3391 (lambda _
3392 (invoke "make" "-C" "docs" "PAPER=a4" "html" "info")
3393 (delete-file "docs/build/texinfo/Makefile")
3394 (delete-file "docs/build/texinfo/Gunicorn.texi")
3395 #t))
3396 (replace 'check
3397 (lambda _
3398 (setenv "PYTHONPATH"
3399 (string-append ".:" (getenv "PYTHONPATH")))
3400 ;; Remove test modules failing due to libc not found due to
3401 ;; section '.dynamic' not found in libc.so
3402 (delete-file "tests/test_arbiter.py")
3403 (delete-file "tests/test_config.py")
3404 (delete-file "tests/test_sock.py")
3405 (invoke "pytest")))
3406 (add-after 'install 'install-doc
3407 (lambda* (#:key outputs #:allow-other-keys)
3408 (let* ((doc (string-append (assoc-ref outputs "doc")
3409 "/share/doc/" ,name "-" ,version))
3410 (html (string-append doc "/html"))
3411 (info (string-append doc "/info"))
3412 (examples (string-append doc "/examples")))
3413 (mkdir-p html)
3414 (mkdir-p info)
3415 (mkdir-p examples)
3416 (copy-recursively "docs/build/html" html)
3417 (copy-recursively "docs/build/texinfo" info)
3418 (copy-recursively "examples" examples)
3419 (for-each (lambda (file)
3420 (copy-file file (string-append doc "/" file)))
3421 '("README.rst" "NOTICE" "LICENSE" "THANKS")))
3422 #t)))))
3423 (native-inputs
3424 `(("binutils" ,binutils) ;; for ctypes.util.find_library()
3425 ("python-aiohttp", python-aiohttp)
3426 ("python-pytest" ,python-pytest)
3427 ("python-pytest-cov" ,python-pytest-cov)
3428 ("python-sphinx" ,python-sphinx)
3429 ("texinfo" ,texinfo)))
3430 (home-page "https://gunicorn.org/")
3431 (synopsis "Python WSGI HTTP Server for UNIX")
3432 (description "Gunicorn ‘Green Unicorn’ is a Python WSGI HTTP
3433 Server for UNIX. It’s a pre-fork worker model ported from Ruby’s
3434 Unicorn project. The Gunicorn server is broadly compatible with
3435 various web frameworks, simply implemented, light on server resources,
3436 and fairly speedy.")
3437 (license license:expat)))
3438
3439 (define-public python-translation-finder
3440 (package
3441 (name "python-translation-finder")
3442 (version "1.7")
3443 (source
3444 (origin
3445 (method url-fetch)
3446 (uri (pypi-uri "translation-finder" version))
3447 (sha256
3448 (base32
3449 "1pcy9z8gmb8x41gjhw9x0lkr0d2mv5mdxcs2hwg6q8mxs857j589"))))
3450 (build-system python-build-system)
3451 (arguments
3452 `(#:phases
3453 (modify-phases %standard-phases
3454 (add-before 'build 'remove-failing-test
3455 (lambda _
3456 (delete-file "translation_finder/test_api.py")
3457 #t)))))
3458 (propagated-inputs
3459 `(("python-chardet" ,python-chardet)
3460 ("python-pathlib2" ,python-pathlib2)
3461 ("python-ruamel.yaml" ,python-ruamel.yaml)
3462 ("python-six" ,python-six)))
3463 (native-inputs
3464 `(("python-codecov" ,python-codecov)
3465 ("python-codacy-coverage" ,python-codacy-coverage)
3466 ("python-pytest-cov" ,python-pytest-cov)
3467 ("python-pytest-runner" ,python-pytest-runner)
3468 ("python-twine" ,python-twine)))
3469 (home-page "https://weblate.org/")
3470 (synopsis "Translation file finder for Weblate")
3471 (description "This package provides a function to find translation file in
3472 the source code of a project. It supports many translation file formats and
3473 is part of the Weblate translation platform.")
3474 (license license:gpl3+)))
3475
3476 (define-public python-gitlab
3477 (package
3478 (name "python-gitlab")
3479 (version "1.15.0")
3480 (source
3481 (origin
3482 (method url-fetch)
3483 (uri (pypi-uri "python-gitlab" version))
3484 (sha256
3485 (base32
3486 "0zl6kz8v8cg1bcy2r78b2snb0lpw0b573gdx2x1ps0nhsh75l4j5"))))
3487 (build-system python-build-system)
3488 (propagated-inputs
3489 `(("python-requests" ,python-requests)
3490 ("python-six" ,python-six)))
3491 (native-inputs
3492 `(("python-httmock" ,python-httmock)
3493 ("python-mock" ,python-mock)))
3494 (home-page
3495 "https://github.com/python-gitlab/python-gitlab")
3496 (synopsis "Interact with GitLab API")
3497 (description "This package provides an extended library for interacting
3498 with GitLab instances through their API.")
3499 (license license:lgpl3+)))
3500
3501 (define-public python-path-and-address
3502 (package
3503 (name "python-path-and-address")
3504 (version "2.0.1")
3505 (source
3506 (origin
3507 ;; The source distributed on PyPI doesn't include tests.
3508 (method git-fetch)
3509 (uri (git-reference
3510 (url "https://github.com/joeyespo/path-and-address")
3511 (commit (string-append "v" version))))
3512 (file-name (git-file-name name version))
3513 (sha256
3514 (base32
3515 "0b0afpsaim06mv3lhbpm8fmawcraggc11jhzr6h72kdj1cqjk5h6"))))
3516 (build-system python-build-system)
3517 (arguments
3518 `(#:phases
3519 (modify-phases %standard-phases
3520 (replace 'check
3521 (lambda* (#:key inputs outputs #:allow-other-keys)
3522 (add-installed-pythonpath inputs outputs)
3523 (invoke "py.test"))))))
3524 (native-inputs
3525 `(("python-pytest" ,python-pytest)))
3526 (home-page "https://github.com/joeyespo/path-and-address")
3527 (synopsis "Functions for command-line server tools used by humans")
3528 (description "Path-and-address resolves ambiguities of command-line
3529 interfaces, inferring which argument is the path, and which is the address.")
3530 (license license:expat)))
3531
3532 (define-public grip
3533 ;; No release by upstream for quite some time, some bugs fixed since. See:
3534 ;; https://github.com/joeyespo/grip/issues/304
3535 (let ((commit "27a4d6d87ea1d0ea7f7f120de55baabee3de73e3"))
3536 (package
3537 (name "grip")
3538 (version (git-version "4.5.2" "1" commit))
3539 (source
3540 (origin
3541 (method git-fetch)
3542 (uri (git-reference
3543 (url "https://github.com/joeyespo/grip")
3544 (commit commit)))
3545 (file-name (git-file-name name version))
3546 (sha256
3547 (base32
3548 "0kx5hgb3q19i4l18a4vqdq9af390xgpk88lp2ay75qi96k0dc68w"))))
3549 (build-system python-build-system)
3550 (propagated-inputs
3551 `(("python-docopt" ,python-docopt)
3552 ("python-flask" ,python-flask)
3553 ("python-markdown" ,python-markdown)
3554 ("python-path-and-address" ,python-path-and-address)
3555 ("python-pygments" ,python-pygments)
3556 ("python-requests" ,python-requests)))
3557 (native-inputs
3558 `(("python-pytest" ,python-pytest)
3559 ("python-responses" ,python-responses)))
3560 (arguments
3561 `(#:phases
3562 (modify-phases %standard-phases
3563 (replace 'check
3564 (lambda* (#:key inputs outputs #:allow-other-keys)
3565 (add-installed-pythonpath inputs outputs)
3566 (setenv "PATH" (string-append
3567 (getenv "PATH") ":"
3568 (assoc-ref %outputs "out") "/bin"))
3569 (invoke "py.test" "-m" "not assumption"))))))
3570 (home-page "https://github.com/joeyespo/grip")
3571 (synopsis "Preview Markdown files using the GitHub API")
3572 (description "Grip is a command-line server application written in Python
3573 that uses the GitHub Markdown API to render a local Markdown file. The styles
3574 and rendering come directly from GitHub, so you'll know exactly how it will
3575 appear. Changes you make to the file will be instantly reflected in the browser
3576 without requiring a page refresh.")
3577 (license license:expat))))