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