gnu: nnn: Don't use NAME in source URI.
[jackhill/guix/guix.git] / gnu / packages / python-web.scm
CommitLineData
1b2f753d
LC
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
354d27e5 3;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
1b2f753d 4;;; Copyright © 2017 Christopher Baines <mail@cbaines.net>
98c6a025 5;;; Copyright © 2016, 2017 Danny Milosavljevic <dannym+a@scratchpost.org>
1b2f753d
LC
6;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
7;;; Copyright © 2016, 2017 Marius Bakke <mbakke@fastmail.com>
d47b21c6 8;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
1b2f753d
LC
9;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
10;;; Copyright © 2016, 2017 Julien Lepiller <julien@lepiller.eu>
4a78fd46 11;;; Copyright © 2016, 2017 Nils Gillmann <ng0@n0.is>
1b2f753d
LC
12;;; Copyright © 2014, 2017 Eric Bavier <bavier@member.fsf.org>
13;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
14;;; Copyright © 2015 Cyril Roelandt <tipecaml@gmail.com>
15;;; Copyright © 2015, 2016, 2017 Leo Famulari <leo@famulari.name>
16;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
331ebb7f 17;;; Copyright © 2016, 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
1b2f753d
LC
18;;; Copyright © 2015, 2017 Ben Woodcroft <donttrustben@gmail.com>
19;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
20;;; Copyright © 2017 Adriano Peluso <catonano@gmail.com>
21;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
22;;; Copyright © 2016 David Craven <david@craven.ch>
23;;; Copyright © 2017 Oleg Pykhalov <go.wigust@gmail.com>
589e3f4e 24;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
eaa8292e 25;;; Copyright © 2017 Mark Meyer <mark@ofosos.org>
c5964611 26;;; Copyright © 2018 Tomáš Čech <sleep_walker@gnu.org>
85ccc0c2 27;;; Copyright © 2018 Nicolas Goaziou <mail@nicolasgoaziou.fr>
1ceca46b 28;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com>
bb840999 29;;; Copyright © 2018 Maxim Cournoyer <maxim.cournoyer@gmail.com>
1b2f753d
LC
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)
7c8b1bf6 49 #:use-module (guix git-download)
1b2f753d 50 #:use-module (guix build-system python)
e3e74e40 51 #:use-module (guix utils)
1b2f753d 52 #:use-module (gnu packages)
ac257f12 53 #:use-module (gnu packages check)
1b2f753d 54 #:use-module (gnu packages compression)
eaa8292e 55 #:use-module (gnu packages curl)
a8714bf6 56 #:use-module (gnu packages databases)
1b2f753d
LC
57 #:use-module (gnu packages django)
58 #:use-module (gnu packages pkg-config)
59 #:use-module (gnu packages python)
cc6f4912 60 #:use-module (gnu packages python-crypto)
44d10b1f 61 #:use-module (gnu packages python-xyz)
eaa8292e 62 #:use-module (gnu packages tls)
33dc54b0 63 #:use-module (gnu packages time)
56a5ef4c 64 #:use-module (gnu packages web)
1b2f753d
LC
65 #:use-module (gnu packages xml)
66 #:use-module ((guix licenses) #:prefix license:)
67 #:use-module (srfi srfi-1))
68
321ba568
NG
69(define-public python-aiohttp
70 (package
71 (name "python-aiohttp")
62c2cef0 72 (version "3.4.4")
321ba568
NG
73 (source
74 (origin
75 (method url-fetch)
76 (uri (pypi-uri "aiohttp" version))
77 (sha256
78 (base32
62c2cef0 79 "1ykm6kdjkrg556j0zd7dx2l1rsrbh0d9g27ivr6dmaahz9pyrbsi"))))
321ba568
NG
80 (build-system python-build-system)
81 (arguments
62c2cef0 82 `(#:tests? #f)) ;missing pytest-timeout
321ba568
NG
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
94framework.
95
96Its 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
100Callback Hell.
101@item Web-server has middlewares and pluggable routing.
102@end itemize")
103 (license license:asl2.0)))
104
f90f4c9c
NG
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
124asynchronous DNS resolutions with a synchronous looking interface by
125using @url{https://github.com/saghul/pycares,pycares}.")
126 (license license:expat)))
127
bb840999
MC
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
162backends 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
166classes
167@item Access to headers and bodies through request and response
168classes
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
66a9f08b
MC
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
199sharing} (CORS) support for Falcon. It allows applying a specially crafted
200CORS object to the incoming requests, enabling the ability to serve resources
201over 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
589e3f4e
LC
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
1b2f753d
LC
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
249other HTTP libraries.")
250 (license license:expat)))
251
252(define-public python2-httplib2
253 (package-with-python2 python-httplib2))
254
56a5ef4c
TGR
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
285websites. It automatically stores and sends cookies, follows redirects, and can
286follow 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
1b2f753d
LC
292(define-public python-sockjs-tornado
293 (package
294 (name "python-sockjs-tornado")
83397e07 295 (version "1.0.5")
1b2f753d
LC
296 (source
297 (origin
298 (method url-fetch)
299 (uri (pypi-uri "sockjs-tornado" version))
300 (sha256
301 (base32
83397e07 302 "0zhq8wnnhkfbvdnsggqrc3pp97pqpilsf7fh6ymvnf52r0rwyjsc"))))
1b2f753d
LC
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)))
9be5ecdf 310 (home-page "https://github.com/mrjoes/sockjs-tornado/")
1b2f753d 311 (synopsis
1f7fe26f 312 "SockJS Python server implementation on top of the Tornado framework")
1b2f753d 313 (description
1f7fe26f 314 "SockJS-tornado provides the server-side counterpart to a SockJS client
1b2f753d
LC
315library, through the Tornado framework.
316
1f7fe26f 317SockJS provides a low-latency, full-duplex, cross-domain communication channel
1b2f753d
LC
318between 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")
1a6fb8da 327 (version "0.11.2")
1b2f753d
LC
328 (source
329 (origin
330 (method url-fetch)
331 (uri (pypi-uri "Flask-Babel" version))
332 (sha256
333 (base32
1a6fb8da 334 "0ff9n165vhf1nhv6807ckhpp224jw7k7sd7jz5kfh3sbpl85gmy0"))))
1b2f753d
LC
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
344support for Flask. This is based on the Python babel module as well as pytz -
345both 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")
4ef80b2f 354 (version "1.0.1")
1b2f753d
LC
355 (source
356 (origin
357 (method url-fetch)
358 (uri (pypi-uri "html5lib" version))
359 (sha256
360 (base32
4ef80b2f 361 "0dipzfrycv6j1jw82v9b7d8lzggx3x8xngx6l4xrqkxwvg7hvjv6"))))
1b2f753d
LC
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
374and 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")
5e517e9b 399 (version "0.4.5")
1b2f753d
LC
400 (source (origin
401 (method url-fetch)
402 (uri (pypi-uri "html5-parser" version))
403 (sha256
404 (base32
5e517e9b 405 "01mx33sx4dhl4kj6wc48nj6jz7ry60rkhjv0s6k8h5xmjf5yy0x9"))))
1b2f753d
LC
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
417parsing spec for Python. Parsing is done in C using a variant of the gumbo
418parser. The gumbo parse tree is then transformed into an lxml tree, also in
419C, 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
eaa8292e
MM
427(define-public python-pycurl
428 (package
429 (name "python-pycurl")
0d35a954 430 (version "7.43.0.2")
eaa8292e
MM
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
0d35a954 437 (base32 "1915kb04k1j4y6k1dx1sgnbddxrl9r1n4q928if2lkrdm73xy30g"))))
eaa8292e
MM
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.
60667159
MB
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)))))
eaa8292e
MM
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
460high-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
1b2f753d
LC
469(define-public python-webencodings
470 (package
471 (name "python-webencodings")
b0a2c9cb 472 (version "0.5.1")
1b2f753d
LC
473 (source (origin
474 (method url-fetch)
475 (uri (pypi-uri "webencodings" version))
476 (sha256
477 (base32
b0a2c9cb 478 "08qrgrc4hrximb2gqnl69g01s93rhf2842jfxdjljc1dbwj1qsmk"))))
1b2f753d
LC
479 (build-system python-build-system)
480 (arguments
481 '(#:phases
482 (modify-phases %standard-phases
483 (replace 'check
484 (lambda _
12adfdf0
TGR
485 (invoke "py.test" "-v" "webencodings/tests.py")
486 #t)))))
1b2f753d
LC
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
493something like @code{Content-Type: text/html; charset=latin1}, tools need
494to use a particular set of aliases for encoding labels as well as some
495overriding rules. For example, @code{US-ASCII} and @code{iso-8859-1} on
a40f732b 496the web are actually aliases for @code{windows-1252}, and a @code{UTF-8}
1b2f753d
LC
497or @code{UTF-16} BOM takes precedence over any other encoding declaration.
498The WHATWG @url{https://encoding.spec.whatwg.org/,Encoding} standard
499defines all such details so that implementations do not have to
500reverse-engineer each other.
501
502This module implements the Encoding standard and has encoding labels and
503BOM detection, but the actual implementation for encoders and decoders
504is 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")
10275b74 513 (version "3.1.0")
1b2f753d
LC
514 (source
515 (origin
516 (method url-fetch)
517 (uri (pypi-uri "python3-openid" version))
518 (sha256
519 (base32
10275b74 520 "00l5hrjh19740w00b3fnsqldnla41wbr2rics09dl4kyd1fkd3b2"))))
1b2f753d
LC
521 (build-system python-build-system)
522 (arguments
523 `(#:phases
524 (modify-phases %standard-phases
525 (replace 'check
526 (lambda _
10275b74
EF
527 (invoke "coverage" "run" "-m"
528 "unittest" "openid.test.test_suite"))))))
1b2f753d
LC
529 (properties `((python2-variant . ,(delay python2-openid))))
530 (propagated-inputs
531 `(("python-defusedxml" ,python-defusedxml)))
532 (native-inputs
10275b74
EF
533 `(("python-coverage" ,python-coverage)
534 ("python-psycopg2" ,python-psycopg2)
1b2f753d
LC
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
539for 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
560for clients and servers.")
561 (license license:asl2.0)))
562
563(define-public python-cssutils
564 (package
565 (name "python-cssutils")
3c5658c5 566 (version "1.0.2")
1b2f753d
LC
567 (source
568 (origin
569 (method url-fetch)
570 (uri (pypi-uri "cssutils" version))
571 (sha256
572 (base32
3c5658c5 573 "1bxchrbqzapwijap0yhlxdil1w9bmwvgx77aizlkhc2mcxjg1z52"))))
1b2f753d
LC
574 (build-system python-build-system)
575 (native-inputs
3c5658c5 576 `(("unzip" ,unzip))) ; for unpacking the source
1b2f753d 577 (arguments
3c5658c5 578 `(#:tests? #f)) ; tests require python-pbr < 1.7.0
1b2f753d
LC
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
584Cascading Style Sheets. Currently it provides a DOM only and no rendering
585options.")
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
613them to XPath 1.0 expressions. Such expressions can be used in lxml or
614another 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
636contributor 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
659teams 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")
3fcaf42a 668 (version "5.1.1")
1b2f753d
LC
669 (source
670 (origin
671 (method url-fetch)
672 (uri (pypi-uri "tornado" version))
673 (sha256
3fcaf42a
EF
674 (base32
675 "02clqk2116jbnq8lnaqmdw3p52nqrd9ib59r4xz2ll43fpcmhlaf"))))
1b2f753d
LC
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:
3fcaf42a 686 ;; (invoke "python" "-m" "tornado.test.runtests")
12adfdf0 687 ;; #t)))
1b2f753d
LC
688 #:tests? #f))
689 (native-inputs
690 `(("python-certifi" ,python-certifi)))
3fcaf42a 691 (home-page "https://www.tornadoweb.org/")
1b2f753d
LC
692 (synopsis "Python web framework and asynchronous networking library")
693 (description
694 "Tornado is a Python web framework and asynchronous networking library,
695originally developed at FriendFeed. By using non-blocking network I/O,
696Tornado can scale to tens of thousands of open connections, making it ideal
697for long polling, WebSockets, and other applications that require a long-lived
698connection 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)
3fcaf42a 708 ("python2-backports-abc" ,python2-backports-abc)
1b2f753d
LC
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
732web 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")
d47b21c6 738 (version "0.8.1")
1b2f753d
LC
739 (source
740 (origin
741 (method url-fetch)
742 (uri (pypi-uri "terminado" version))
743 (sha256
744 (base32
d47b21c6 745 "0yh69k6579g848rmjyllb5h75pkvgcy27r1l3yzgkf33wnnzkasm"))))
1b2f753d
LC
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
d47b21c6 756 (lambda _ (invoke "nosetests") #t)))))
1b2f753d
LC
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
760term.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
589e3f4e
LC
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)
2b221866 778 (uri (pypi-uri "wsgi_intercept" version))
589e3f4e
LC
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
792URI for testing. Testing a WSGI application normally involves starting a
793server at a local host and port, then pointing your test code to that address.
794Instead, this library lets you intercept calls to any specific host/port
795combination and redirect them into a WSGI application importable by your test
796program. Thus, you can avoid spawning multiple processes or threads to test
797your Web app.")
798 (home-page "https://github.com/cdent/wsgi-intercept")
799 (license license:expat)))
800
1b2f753d
LC
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)))
9be5ecdf 815 (home-page "https://webob.org/")
1b2f753d
LC
816 (synopsis "WSGI request and response object")
817 (description
818 "WebOb provides wrappers around the WSGI request environment, and an
819object 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)
da501c49 832 (uri (pypi-uri "zope.event" version))
1b2f753d
LC
833 (sha256
834 (base32
835 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
836 (build-system python-build-system)
9be5ecdf 837 (home-page "https://pypi.python.org/pypi/zope.event")
1b2f753d
LC
838 (synopsis "Event publishing system for Python")
839 (description "Zope.event provides an event publishing API, intended for
840use by applications which are unaware of any subscribers to their events. It
841is a simple event-dispatching system on which more sophisticated event
842dispatching 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)
ba93e239 855 (uri (pypi-uri "zope.interface" version))
1b2f753d
LC
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\"
864methodology")
865 (description "Zope.interface provides an implementation of \"object
866interfaces\" for Python. Interfaces are a mechanism for labeling objects as
867conforming 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)
3d010466 880 (uri (pypi-uri "zope.exceptions" version))
1b2f753d
LC
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
892that 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")
9d981019 901 (version "4.6.2")
1b2f753d
LC
902 (source
903 (origin
904 (method url-fetch)
f9a6457d 905 (uri (pypi-uri "zope.testing" version))
1b2f753d
LC
906 (sha256
907 (base32
9d981019 908 "0iiq54hjhkk2gpvzfjac70vyn4r0kw0ngvicshxbdwrkgf2gjq3g"))
1b2f753d
LC
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)
9be5ecdf 916 (home-page "https://pypi.python.org/pypi/zope.testing")
1b2f753d
LC
917 (synopsis "Zope testing helpers")
918 (description "Zope.testing provides a number of testing utilities for HTML
919forms, 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)
d409c993 932 (uri (pypi-uri "zope.testrunner" version ".zip"))
1b2f753d
LC
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)))
9be5ecdf 947 (home-page "https://pypi.python.org/pypi/zope.testrunner")
1b2f753d
LC
948 (synopsis "Zope testrunner script")
949 (description "Zope.testrunner provides a script for running Python
950tests.")
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)
8a84d796 969 (uri (pypi-uri "zope.i18nmessageid" version))
1b2f753d
LC
970 (sha256
971 (base32
972 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
973 (build-system python-build-system)
9be5ecdf 974 (home-page "https://pypi.python.org/pypi/zope.i18nmessageid")
1b2f753d
LC
975 (synopsis "Message identifiers for internationalization")
976 (description "Zope.i18nmessageid provides facilities for declaring
977internationalized 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)
ab9e1740 990 (uri (pypi-uri "zope.schema" version))
1b2f753d
LC
991 (sha256
992 (base32
993 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
994 (build-system python-build-system)
995 (arguments
996 '(#:tests? #f)) ; FIXME: Tests can't find zope.event.
997 (propagated-inputs
998 `(("python-zope-event" ,python-zope-event)
c695fb76 999 ("python-zope-exceptions" ,python-zope-exceptions)
1b2f753d
LC
1000 ("python-zope-interface" ,python-zope-interface)))
1001 (native-inputs
1002 `(("python-zope-testing" ,python-zope-testing)
1003 ("python-coverage" ,python-coverage)
1004 ("python-nose" ,python-nose)))
9be5ecdf 1005 (home-page "https://pypi.python.org/pypi/zope.schema")
1b2f753d
LC
1006 (synopsis "Zope data schemas")
1007 (description "Zope.scheme provides extensions to zope.interface for
1008defining data schemas.")
1009 (license license:zpl2.1)))
1010
1011(define-public python2-zope-schema
1012 (package-with-python2 python-zope-schema))
1013
1014(define-public python-zope-configuration
1015 (package
1016 (name "python-zope-configuration")
1017 (version "4.0.3")
1018 (source (origin
1019 (method url-fetch)
cdf14a67 1020 (uri (pypi-uri "zope.configuration" version))
1b2f753d
LC
1021 (sha256
1022 (base32
1023 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
1024 (build-system python-build-system)
1025 (arguments
1026 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
1027 (propagated-inputs
1028 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
1029 ("python-zope-schema" ,python-zope-schema)))
9be5ecdf 1030 (home-page "https://pypi.python.org/pypi/zope.configuration")
1b2f753d
LC
1031 (synopsis "Zope Configuration Markup Language")
1032 (description "Zope.configuration implements ZCML, the Zope Configuration
1033Markup Language.")
1034 (license license:zpl2.1)))
1035
1036(define-public python2-zope-configuration
1037 (package-with-python2 python-zope-configuration))
1038
1039(define-public python-zope-proxy
1040 (package
1041 (name "python-zope-proxy")
1042 (version "4.1.6")
1043 (source
1044 (origin
1045 (method url-fetch)
510cacc7 1046 (uri (pypi-uri "zope.proxy" version))
1b2f753d
LC
1047 (sha256
1048 (base32
1049 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
1050 (build-system python-build-system)
1051 (arguments
1052 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
1053 (propagated-inputs
1054 `(("python-zope-interface" ,python-zope-interface)))
9be5ecdf 1055 (home-page "https://pypi.python.org/pypi/zope.proxy")
1b2f753d
LC
1056 (synopsis "Generic, transparent proxies")
1057 (description "Zope.proxy provides generic, transparent proxies for Python.
1058Proxies are special objects which serve as mostly-transparent wrappers around
1059another object, intervening in the apparent behavior of the wrapped object
1060only when necessary to apply the policy (e.g., access checking, location
1061brokering, etc.) for which the proxy is responsible.")
1062 (license license:zpl2.1)))
1063
1064(define-public python2-zope-proxy
1065 (package-with-python2 python-zope-proxy))
1066
1067(define-public python-zope-location
1068 (package
1069 (name "python-zope-location")
1070 (version "4.0.3")
1071 (source
1072 (origin
1073 (method url-fetch)
6e6bbc02 1074 (uri (pypi-uri "zope.location" version))
1b2f753d
LC
1075 (sha256
1076 (base32
1077 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
1078 (build-system python-build-system)
1079 (arguments
1080 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
1081 (propagated-inputs
1082 `(("python-zope-proxy" ,python-zope-proxy)
1083 ("python-zope-schema" ,python-zope-schema)))
9be5ecdf 1084 (home-page "https://pypi.python.org/pypi/zope.location/")
1b2f753d
LC
1085 (synopsis "Zope location library")
1086 (description "Zope.location implements the concept of \"locations\" in
1087Zope3, which are are special objects that have a structural location.")
1088 (license license:zpl2.1)))
1089
1090(define-public python2-zope-location
1091 (package-with-python2 python-zope-location))
1092
1093(define-public python-zope-security
1094 (package
1095 (name "python-zope-security")
1096 (version "4.0.3")
1097 (source
1098 (origin
1099 (method url-fetch)
fc283a5e 1100 (uri (pypi-uri "zope.security" version))
1b2f753d
LC
1101 (sha256
1102 (base32
1103 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
1104 (build-system python-build-system)
1105 (arguments
1106 '(#:tests? #f)) ; FIXME: Tests can't find zope.testrunner.
1107 (propagated-inputs
1108 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
1109 ("python-zope-proxy" ,python-zope-proxy)
1110 ("python-zope-schema" ,python-zope-schema)))
1111 (native-inputs
1112 `(("python-six" ,python-six)
1113 ("python-zope-component" ,python-zope-component)
1114 ("python-zope-configuration" ,python-zope-configuration)
1115 ("python-zope-location" ,python-zope-location)
1116 ("python-zope-testrunner" ,python-zope-testrunner)
1117 ("python-zope-testing" ,python-zope-testing)))
9be5ecdf 1118 (home-page "https://pypi.python.org/pypi/zope.security")
1b2f753d
LC
1119 (synopsis "Zope security framework")
1120 (description "Zope.security provides a generic mechanism to implement
1121security policies on Python objects.")
1122 (license license:zpl2.1)))
1123
1124(define-public python2-zope-security
1125 (let ((zope-security (package-with-python2 python-zope-security)))
1126 (package (inherit zope-security)
1127 (propagated-inputs
1128 `(("python2-zope-testrunner" ,python2-zope-testrunner)
1129 ,@(alist-delete
1130 "python-zope-testrunner"
1131 (package-propagated-inputs zope-security)))))))
1132
1133(define-public python-zope-component
1134 (package
1135 (name "python-zope-component")
1136 (version "4.3.0")
1137 (source
1138 (origin
1139 (method url-fetch)
1140 (uri (pypi-uri "zope.component" version))
1141 (sha256
1142 (base32
1143 "1hlvzwj1kcfz1qms1dzhwsshpsf38z9clmyksb1gh41n8k3kchdv"))))
1144 (build-system python-build-system)
1145 (arguments
1146 ;; Skip tests due to circular dependency with python-zope-security.
1147 '(#:tests? #f))
1148 (native-inputs
1149 `(("python-zope-testing" ,python-zope-testing)))
1150 (propagated-inputs
1151 `(("python-zope-event" ,python-zope-event)
1152 ("python-zope-interface" ,python-zope-interface)
1153 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
1154 ("python-zope-configuration" ,python-zope-configuration)))
1155 (home-page "https://github.com/zopefoundation/zope.component")
1156 (synopsis "Zope Component Architecture")
1157 (description "Zope.component represents the core of the Zope Component
1158Architecture. Together with the zope.interface package, it provides
1159facilities for defining, registering and looking up components.")
1160 (license license:zpl2.1)))
1161
1162(define-public python2-zope-component
1163 (package-with-python2 python-zope-component))
1164
1165(define-public python-ndg-httpsclient
1166 (package
1167 (name "python-ndg-httpsclient")
57d5d3da 1168 (version "0.5.1")
1b2f753d
LC
1169 (source (origin
1170 (method url-fetch)
1171 (uri (pypi-uri "ndg_httpsclient" version))
1172 (sha256
1173 (base32
57d5d3da 1174 "0412b7i1s4vj7lz9r72nmb28h9syd4q2x89bdirkkc3a6z8awbyp"))))
1b2f753d
LC
1175 (build-system python-build-system)
1176 (arguments
1177 '(;; The tests appear to require networking.
1178 #:tests? #f))
1179 (propagated-inputs
1180 `(("python-pyopenssl" ,python-pyopenssl)))
1181 (synopsis "HTTPS support for Python's httplib and urllib2")
1182 (description "This is a HTTPS client implementation for httplib and urllib2
eed0f1e8
TGR
1183based on PyOpenSSL. PyOpenSSL provides a more fully-featured SSL implementation
1184over the default provided with Python and, importantly, enables full
1185verification of the SSL peer.")
1b2f753d
LC
1186 (home-page "https://github.com/cedadev/ndg_httpsclient/")
1187 (license license:bsd-3)))
1188
1189;; python2-openssl requires special care, so package-with-python2 is
1190;; insufficient.
1191(define-public python2-ndg-httpsclient
1192 (package (inherit python-ndg-httpsclient)
1193 (name "python2-ndg-httpsclient")
e3e74e40
TGR
1194 (arguments
1195 (substitute-keyword-arguments (package-arguments python-ndg-httpsclient)
1196 ((#:python _) python-2)))
1b2f753d
LC
1197 (propagated-inputs
1198 `(("python2-pyopenssl" ,python2-pyopenssl)))))
1199
1200(define-public python-websocket-client
1201 (package
1202 (name "python-websocket-client")
354d27e5 1203 (version "0.54.0")
1b2f753d
LC
1204 (source
1205 (origin
1206 (method url-fetch)
1207 (uri (pypi-uri "websocket_client" version))
1208 (sha256
1209 (base32
354d27e5 1210 "0j88zmikaypf38lvpkf4aaxrjp9j07dmy5ghj7kli0fv3p4n45g5"))))
1b2f753d
LC
1211 (build-system python-build-system)
1212 (propagated-inputs
1213 `(("python-six" ,python-six)))
1214 (home-page "https://github.com/liris/websocket-client")
1215 (synopsis "WebSocket client for Python")
1216 (description "The Websocket-client module provides the low level APIs for
1217WebSocket usage in Python programs.")
354d27e5 1218 (properties `((python2-variant . ,(delay python2-websocket-client))))
1b2f753d
LC
1219 (license license:lgpl2.1+)))
1220
1221(define-public python2-websocket-client
354d27e5
EF
1222 (let ((base (package-with-python2
1223 (strip-python2-variant python-websocket-client))))
1224 (package
1225 (inherit base)
1226 (native-inputs
1227 `(("python2-backport-ssl-match-hostname"
1228 ,python2-backport-ssl-match-hostname)
1229 ,@(package-native-inputs base))))))
1b2f753d 1230
589e3f4e
LC
1231(define-public python-requests
1232 (package
1233 (name "python-requests")
1234 (version "2.13.0")
1235 (source (origin
1236 (method url-fetch)
1237 (uri (pypi-uri "requests" version))
1238 (sha256
1239 (base32
1240 "1s0wg4any4dsv5l3hqjxqk2zgb7pdbqhy9rhc8kh3aigfq4ws8jp"))))
1241 ;; TODO: unbundle urllib3 and chardet.
1242 (build-system python-build-system)
1243 (arguments
1244 ;; FIXME: Some tests require network access.
1245 '(#:tests? #f))
1246 (home-page "http://python-requests.org/")
1247 (synopsis "Python HTTP library")
1248 (description
1249 "Requests is a Python HTTP client library. It aims to be easier to use
1250than Python’s urllib2 library.")
1251 (license license:asl2.0)))
1252
1253;; Some software requires an older version of Requests, notably Docker
1254;; Compose.
1255(define-public python-requests-2.7
1256 (package (inherit python-requests)
1257 (version "2.7.0")
1258 (source (origin
1259 (method url-fetch)
1260 (uri (pypi-uri "requests" version))
1261 (sha256
1262 (base32
1263 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
1264
1265(define-public python2-requests
1266 (package-with-python2 python-requests))
1267
1b2f753d
LC
1268(define-public python-requests-mock
1269 (package
1270 (name "python-requests-mock")
1271 (version "1.3.0")
1272 (source
1273 (origin
1274 (method url-fetch)
1275 (uri (pypi-uri "requests-mock" version))
1276 (sha256
1277 (base32
1278 "0jr997dvk6zbmhvbpcv3rajrgag69mcsm1ai3w3rgk2jdh6rg1mx"))))
1279 (build-system python-build-system)
1280 (propagated-inputs
1281 `(("python-requests" ,python-requests)
1282 ("python-six" ,python-six)))
1283 (native-inputs
1284 `(("python-pbr" ,python-pbr)
1285 ("python-discover" ,python-discover)
1286 ("python-docutils" ,python-docutils)
1287 ("python-fixtures" ,python-fixtures)
1288 ("python-mock" ,python-mock)
1289 ("python-sphinx" ,python-sphinx)
1290 ("python-testrepository" ,python-testrepository)
1291 ("python-testtools" ,python-testtools)))
1292 (home-page "https://requests-mock.readthedocs.org/")
1293 (synopsis "Mock out responses from the requests package")
1294 (description
1295 "This module provides a building block to stub out the HTTP requests
1296portions of your testing code.")
1297 (properties `((python2-variant . ,(delay python2-requests-mock))))
1298 (license license:asl2.0)))
1299
1300(define-public python2-requests-mock
1301 (package (inherit (package-with-python2
1302 (strip-python2-variant python-requests-mock)))
1303 (arguments
1304 `(#:python ,python-2
1305 ;; FIXME: 'subunit.run discover: error: no such option: --list'
1306 #:tests? #f))))
1307
1308(define-public python-requests-toolbelt
1309 (package
1310 (name "python-requests-toolbelt")
1311 (version "0.8.0")
1312 (source (origin
1313 (method url-fetch)
1314 (uri (pypi-uri "requests-toolbelt" version))
1315 (sha256
1316 (base32
1317 "1dc7l42i4080r8i4m9fj51jx367lqkai170vrv7wd93gdj9k39gn"))))
1318 (build-system python-build-system)
1319 (native-inputs
1320 `(("python-betamax" ,python-betamax)
1321 ("python-mock" ,python-mock)
1322 ("python-pytest" ,python-pytest)))
1323 (propagated-inputs
1324 `(("python-requests" ,python-requests)))
1325 (synopsis "Extensions to python-requests")
1326 (description "This is a toolbelt of useful classes and functions to be used
1327with python-requests.")
1328 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
1329 (license license:asl2.0)))
1330
1331(define-public python2-requests-toolbelt
1332 (package-with-python2 python-requests-toolbelt))
1333
589e3f4e
LC
1334(define-public python-oauthlib
1335 (package
1336 (name "python-oauthlib")
1337 (version "1.0.3")
1338 (source (origin
1339 (method url-fetch)
1340 (uri (pypi-uri "oauthlib" version))
1341 (sha256
1342 (base32
1343 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
1344 (build-system python-build-system)
1345 (native-inputs
1346 `(("python-nose" ,python-nose)
1347 ("python-mock" ,python-mock)
1348 ("python-cryptography" ,python-cryptography)
1349 ("python-pyjwt" ,python-pyjwt)
1350 ("python-blinker" ,python-blinker)))
1351 (home-page "https://github.com/idan/oauthlib")
1352 (synopsis "OAuth implementation for Python")
1353 (description
1354 "Oauthlib is a generic, spec-compliant, thorough implementation of the
1355OAuth request-signing logic.")
1356 (license license:bsd-3)
1357 (properties `((python2-variant . ,(delay python2-oauthlib))))))
1358
1359(define-public python2-oauthlib
1360 (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
1361 (package
1362 (inherit base)
1363 (native-inputs `(("python2-unittest2" ,python2-unittest2)
1364 ,@(package-native-inputs base))))))
1365
1b2f753d
LC
1366(define-public python-rauth
1367 (package
1368 (name "python-rauth")
1369 (version "0.7.3")
1370 (source
1371 (origin
1372 (method url-fetch)
1373 (uri (pypi-uri "rauth" version))
1374 (sha256
1375 (base32
1376 "02kv8w8l98ky223avyq7vw7x1f2ya9chrm59r77ylq45qb0xnk2j"))))
1377 (build-system python-build-system)
1378 (arguments
1379 `(#:test-target "check"))
1380 (propagated-inputs
1381 `(("python-requests" ,python-requests)))
1382 (home-page "https://github.com/litl/rauth")
1383 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
1384 (description
1385 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
1386provides service wrappers for convenient connection initialization and
1387authenticated session objects providing things like keep-alive.")
1388 (license license:expat)
1389 (properties `((python2-variant . ,(delay python2-rauth))))))
1390
1391(define-public python2-rauth
1392 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
1393 (package
1394 (inherit base)
1395 (native-inputs `(("python2-unittest2" ,python2-unittest2)
1396 ,@(package-native-inputs base))))))
1397
1398(define-public python-urllib3
1399 (package
1400 (name "python-urllib3")
20c5e2f4 1401 (version "1.24.1")
1b2f753d
LC
1402 (source
1403 (origin
1404 (method url-fetch)
1405 (uri (pypi-uri "urllib3" version))
1406 (sha256
1407 (base32
20c5e2f4 1408 "08lwd9f3hqznyf32vnzwvp87pchx062nkbgyrf67rwlkgj0jk5fy"))))
1b2f753d
LC
1409 (build-system python-build-system)
1410 (arguments `(#:tests? #f))
1411 (native-inputs
1412 `(;; some packages for tests
1b2f753d 1413 ("python-mock" ,python-mock)
20c5e2f4 1414 ("python-pytest" ,python-pytest)
1b2f753d
LC
1415 ("python-tornado" ,python-tornado)))
1416 (propagated-inputs
1417 `(;; These 5 inputs are used to build urrlib3[secure]
1418 ("python-certifi" ,python-certifi)
20c5e2f4 1419 ("python-cryptography" ,python-cryptography)
1b2f753d
LC
1420 ("python-idna" ,python-idna)
1421 ("python-ipaddress" ,python-ipaddress)
20c5e2f4
EF
1422 ("python-pyopenssl" ,python-pyopenssl)
1423 ("python-pysocks" ,python-pysocks)))
1424 (home-page "https://urllib3.readthedocs.io/")
1b2f753d
LC
1425 (synopsis "HTTP library with thread-safe connection pooling")
1426 (description
1427 "Urllib3 supports features left out of urllib and urllib2 libraries. It
1428can reuse the same socket connection for multiple requests, it can POST files,
1429supports url redirection and retries, and also gzip and deflate decoding.")
1430 (license license:expat)))
1431
1432(define-public python2-urllib3
1433 (package-with-python2 python-urllib3))
1434
1435(define-public awscli
1436 (package
1437 (name "awscli")
331ebb7f 1438 (version "1.14.41")
1b2f753d
LC
1439 (source
1440 (origin
1441 (method url-fetch)
1442 (uri (pypi-uri name version))
1443 (sha256
1444 (base32
331ebb7f 1445 "0sispclx263lybbk19zp1n9yhg8xxx4jddypzgi24vpjaqnsbwlc"))))
1b2f753d
LC
1446 (build-system python-build-system)
1447 (propagated-inputs
1448 `(("python-colorama" ,python-colorama)
1449 ("python-botocore" ,python-botocore)
1450 ("python-s3transfer" ,python-s3transfer)
1451 ("python-docutils" ,python-docutils)
1452 ("python-pyyaml" ,python-pyyaml)
1453 ("python-rsa" ,python-rsa)))
1454 (arguments
1455 ;; FIXME: The 'pypi' release does not contain tests.
1456 '(#:tests? #f))
1457 (home-page "https://aws.amazon.com/cli/")
1458 (synopsis "Command line client for AWS")
1459 (description "AWS CLI provides a unified command line interface to the
1460Amazon Web Services (AWS) API.")
1461 (license license:asl2.0)))
1462
1463(define-public python-wsgiproxy2
1464 (package
1465 (name "python-wsgiproxy2")
38e1095d 1466 (version "0.4.5")
1b2f753d
LC
1467 (source
1468 (origin
1469 (method url-fetch)
e38a8012 1470 (uri (pypi-uri "WSGIProxy2" version ".tar.gz"))
1b2f753d
LC
1471 (sha256
1472 (base32
38e1095d 1473 "19d9dva282vfjs784i0zkxp078lxfz4h3f621z30ij9wbf5rba6a"))))
1b2f753d 1474 (build-system python-build-system)
1b2f753d 1475 (native-inputs
e38a8012 1476 `(("python-webtest" ,python-webtest)))
1b2f753d 1477 (propagated-inputs
e38a8012
TGR
1478 `(("python-requests" ,python-requests)
1479 ("python-six" ,python-six)
1480 ("python-urllib3" ,python-urllib3)
1b2f753d 1481 ("python-webob" ,python-webob)))
e38a8012 1482 (home-page "https://github.com/gawel/WSGIProxy2/")
1b2f753d
LC
1483 (synopsis "WSGI Proxy with various http client backends")
1484 (description "WSGI turns HTTP requests into WSGI function calls.
1485WSGIProxy turns WSGI function calls into HTTP requests.
1486It also includes code to sign requests and pass private data,
1487and to spawn subprocesses to handle requests.")
1488 (license license:expat)))
1489
1490(define-public python2-wsgiproxy2
1491 (package-with-python2 python-wsgiproxy2))
1492
1493(define-public python-pastedeploy
1494 (package
1495 (name "python-pastedeploy")
1496 (version "1.5.2")
1497 (source
1498 (origin
1499 (method url-fetch)
1500 (uri (pypi-uri "PasteDeploy" version))
1501 (sha256
1502 (base32
1503 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
1504 (build-system python-build-system)
1505 (native-inputs
1506 `(("python-nose" ,python-nose)))
1507 (home-page "http://pythonpaste.org/deploy/")
1508 (synopsis
1509 "Load, configure, and compose WSGI applications and servers")
1510 (description
1511 "This tool provides code to load WSGI applications and servers from URIs;
1512these URIs can refer to Python Eggs for INI-style configuration files. Paste
1513Script provides commands to serve applications based on this configuration
1514file.")
1515 (license license:expat)))
1516
1517(define-public python2-pastedeploy
1518 (package-with-python2 python-pastedeploy))
1519
1520(define-public python-webtest
1521 (package
1522 (name "python-webtest")
a348af50 1523 (version "2.0.30")
1b2f753d
LC
1524 (source
1525 (origin
1526 (method url-fetch)
1527 (uri (pypi-uri "WebTest" version))
1528 (sha256
1529 (base32
a348af50 1530 "1mb7m4ndklv84mh0pdkhv73yrflcnra61yczj5g3bvwbqlygfsaw"))))
1b2f753d
LC
1531 (build-system python-build-system)
1532 (arguments
1533 `(;; Unfortunately we have to disable tests!
1534 ;; This release of WebTest is pinned to python-nose < 1.3,
1535 ;; but older versions of python-nose are plagued with the following
1536 ;; bug(s), which rears its ugly head during test execution:
1537 ;; https://github.com/nose-devs/nose/issues/759
1538 ;; https://github.com/nose-devs/nose/pull/811
1539 #:tests? #f))
1540 ;; Commented out code is no good, but in this case, once tests
1541 ;; are ready to be enabled again, we should put the following
1542 ;; in place:
1543 ;; (native-inputs
1544 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
1545 ;; ; but see above comment
1546 ;; ("python-coverage" ,python-coverage)
1547 ;; ("python-mock" ,python-mock)
1548 ;; ("python-pastedeploy" ,python-pastedeploy)
1549 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
1550 ;; ("python-pyquery" ,python-pyquery)))
1551 (propagated-inputs
1552 `(("python-waitress" ,python-waitress)
1553 ("python-webob" ,python-webob)
1554 ("python-six" ,python-six)
1555 ("python-beautifulsoup4" ,python-beautifulsoup4)))
1556 (home-page "http://webtest.pythonpaste.org/")
1557 (synopsis "Helper to test WSGI applications")
1558 (description "Webtest allows you to test your Python web applications
1559without starting an HTTP server. It supports anything that supports the
1560minimum of WSGI.")
1561 (license license:expat)))
1562
1563(define-public python2-webtest
1564 (package-with-python2 python-webtest))
1565
1566(define-public python-flask
1567 (package
1568 (name "python-flask")
67eda45b 1569 (version "1.0.2")
1b2f753d
LC
1570 (source (origin
1571 (method url-fetch)
67eda45b 1572 (uri (pypi-uri "flask" version))
1b2f753d
LC
1573 (sha256
1574 (base32
67eda45b 1575 "0j6f4a9rpfh25k1gp7azqhnni4mb4fgy50jammgjgddw1l3w0w92"))))
1b2f753d 1576 (build-system python-build-system)
47403955
EF
1577 (arguments
1578 '(#:phases
1579 (modify-phases %standard-phases
1580 (replace 'check
1581 (lambda _
1582 (invoke "python" "-m" "pytest"))))))
1583 (native-inputs
1584 `(("python-pytest" ,python-pytest)))
1b2f753d
LC
1585 (propagated-inputs
1586 `(("python-itsdangerous" ,python-itsdangerous)
1587 ("python-jinja2" ,python-jinja2)
1588 ("python-click" ,python-click)
1589 ("python-werkzeug" ,python-werkzeug)))
67eda45b 1590 (home-page "https://www.palletsprojects.com/p/flask/")
1b2f753d
LC
1591 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
1592 (description "Flask is a micro web framework based on the Werkzeug toolkit
1593and Jinja2 template engine. It is called a micro framework because it does not
1594presume or force a developer to use a particular tool or library.")
1595 (license license:bsd-3)))
1596
1597(define-public python2-flask
1598 (package-with-python2 python-flask))
1599
1600(define-public python-flask-wtf
1601 (package
1602 (name "python-flask-wtf")
1603 (version "0.13.1")
1604 (source
1605 (origin
1606 (method url-fetch)
1607 (uri (pypi-uri "Flask-WTF" version))
1608 (sha256
1609 (base32
1610 "04l5743j2dici46038sqlzvf0xzpg8rf7s9ld2x24xv7f4idg990"))))
1611 (build-system python-build-system)
1612 (arguments
1613 '(#:phases
1614 (modify-phases %standard-phases
1615 (add-before 'check 'drop-failing-test
1616 (lambda _
1617 ;; FIXME: This file tries resolving an external server, which
1618 ;; fails. Try to patch out the offending section instead of
1619 ;; deleting the whole thing.
1620 (delete-file "tests/test_recaptcha.py")
1621 #t)))))
1622 (propagated-inputs
1623 `(("python-flask-babel" ,python-flask-babel)
1624 ("python-babel" ,python-babel)
1625 ("python-wtforms" ,python-wtforms)))
1626 (native-inputs
1627 `(("python-nose" ,python-nose)))
1628 (home-page "https://github.com/lepture/flask-wtf")
1629 (synopsis "Simple integration of Flask and WTForms")
1630 (description "Flask-WTF integrates Flask and WTForms, including CSRF, file
1631upload, and reCAPTCHA.")
1632 (license license:bsd-3)))
1633
1634(define-public python2-flask-wtf
1635 (package-with-python2 python-flask-wtf))
1636
1637(define-public python-flask-multistatic
1638 (package
1639 (name "python-flask-multistatic")
1640 (version "1.0")
1641 (source
1642 (origin
1643 (method url-fetch)
1644 (uri (pypi-uri "flask-multistatic" version))
1645 (sha256
1646 (base32
1647 "0p4v50rwv64wcd0zlq7rzl4waprwr4hj19s3cgf1isywa7jcisgm"))))
1648 (build-system python-build-system)
1649 (propagated-inputs
1650 `(("python-flask" ,python-flask)))
1651 (home-page "https://pagure.io/flask-multistatic")
1652 (synopsis "Flask plugin to allow overriding static files")
1653 (description "@code{flask-multistatic} is a flask plugin that adds support
1654for overriding static files.")
1655 (license license:gpl3+)))
1656
1657(define-public python2-flask-multistatic
1658 (package-with-python2 python-flask-multistatic))
1659
1660(define-public python-cookies
1661 (package
1662 (name "python-cookies")
1663 (version "2.2.1")
1664 (source (origin
1665 (method url-fetch)
1666 (uri (pypi-uri "cookies" version))
1667 (sha256
1668 (base32
1669 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
1670 (build-system python-build-system)
1671 (arguments
1672 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
1673 #:tests? #f))
1674 (native-inputs
1675 `(("python-pytest" ,python2-pytest)))
1676 (synopsis "HTTP cookie parser and renderer")
1677 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
1678Python.")
1679 (home-page "https://gitlab.com/sashahart/cookies")
1680 (license license:expat)))
1681
1682(define-public python2-cookies
1683 (package-with-python2 python-cookies))
1684
1685(define-public python-responses
1686 (package
1687 (name "python-responses")
1688 (version "0.5.1")
1689 (source (origin
1690 (method url-fetch)
1691 (uri (pypi-uri "responses" version))
1692 (sha256
1693 (base32
1694 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
1695 (build-system python-build-system)
1696 (arguments
1697 `(;; Test suite is not distributed:
1698 ;; https://github.com/getsentry/responses/issues/38
1699 #:tests? #f))
1700 (native-inputs
1701 `(("python-mock" ,python-mock)))
1702 (propagated-inputs
1703 `(("python-requests" ,python-requests)
1704 ("python-cookies" ,python-cookies)
1705 ("python-six" ,python-six)))
1706 (home-page "https://github.com/getsentry/responses")
1707 (synopsis "Utility for mocking out the `requests` Python library")
1708 (description "A utility library for mocking out the `requests` Python
1709library.")
1710 (license license:asl2.0)))
1711
1712(define-public python2-responses
1713 (package-with-python2 python-responses))
1714
d08b3258
RW
1715(define-public python-grequests
1716 (package
1717 (name "python-grequests")
1718 (version "0.3.0")
1719 (source
1720 (origin
1721 (method url-fetch)
1722 (uri (pypi-uri "grequests" version))
1723 (sha256
1724 (base32
1725 "1j9icncllbkv7x5719b20mx670c6q1jrdx1sakskkarvx3pc8h8g"))))
1726 (build-system python-build-system)
1727 (propagated-inputs
1728 `(("python-gevent" ,python-gevent)
1729 ("python-requests" ,python-requests)))
1730 (native-inputs
1731 `(("python-nose" ,python-nose)))
1732 (home-page "https://github.com/kennethreitz/grequests")
1733 (synopsis "Python library for asynchronous HTTP requests")
1734 (description "GRequests is a Python library that allows you to use
1735@code{Requests} with @code{Gevent} to make asynchronous HTTP Requests easily")
1736 (license license:bsd-2)))
1737
1b2f753d
LC
1738(define-public python-geventhttpclient
1739 (package
1740 (name "python-geventhttpclient")
1741 (version "1.3.1")
1742 (source (origin
1743 (method url-fetch)
1744 (uri (pypi-uri "geventhttpclient" version))
1745 (sha256
1746 (base32
1747 "07d0q3wzmml75227r6y6mrl5a0zpf4v9gj0ni5rhbyzmaj4az1xx"))
1748 (modules '((guix build utils)))
1749 (snippet
1750 '(begin
1751 ;; Delete pre-compiled files.
1752 (for-each delete-file (find-files "src/geventhttpclient"
1753 ".*\\.pyc"))
1754 #t))))
1755 (build-system python-build-system)
1756 (arguments
1757 '(#:phases
1758 (modify-phases %standard-phases
1759 (add-after 'unpack 'delete-network-tests
1760 (lambda _
1761 (delete-file "src/geventhttpclient/tests/test_client.py")
1762 #t))
1763 (delete 'check)
1764 (add-after 'install 'check
1765 (lambda* (#:key inputs outputs #:allow-other-keys)
1766 (add-installed-pythonpath inputs outputs)
0e02e819
MB
1767 (invoke "py.test" "src/geventhttpclient/tests" "-v"
1768 ;; Append the test modules to sys.path to avoid
1769 ;; namespace conflict which breaks SSL tests.
1770 "--import-mode=append")
12adfdf0 1771 #t)))))
1b2f753d
LC
1772 (native-inputs
1773 `(("python-pytest" ,python-pytest)))
1774 (propagated-inputs
1775 `(("python-certifi" ,python-certifi)
1776 ("python-gevent" ,python-gevent)
1777 ("python-six" ,python-six)))
1778 (home-page "https://github.com/gwik/geventhttpclient")
1779 (synopsis "HTTP client library for gevent")
1780 (description "@code{python-geventhttpclient} is a high performance,
1781concurrent HTTP client library for python using @code{gevent}.")
1782 (license license:expat)))
1783
1784(define-public python2-geventhttpclient
1785 (package-with-python2 python-geventhttpclient))
1786
1787(define-public python-requests-oauthlib
1788 (package
1789 (name "python-requests-oauthlib")
1790 (version "0.6.2")
1791 (source
1792 (origin
1793 (method url-fetch)
1794 (uri (pypi-uri "requests-oauthlib" version))
1795 (sha256
1796 (base32
1797 "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
1798 (build-system python-build-system)
1799 (arguments
1800 `(#:phases
1801 (modify-phases %standard-phases
1802 ;; removes tests that require network access
1803 (add-before 'check 'pre-check
1804 (lambda _
1805 (delete-file "tests/test_core.py")
1806 #t)))))
1807 (native-inputs
1808 `(("python-requests-mock" ,python-requests-mock)
1809 ("python-mock" ,python-mock)))
1810 (propagated-inputs
1811 `(("python-oauthlib" ,python-oauthlib)
1812 ("python-requests" ,python-requests)))
1813 (home-page
1814 "https://github.com/requests/requests-oauthlib")
1815 (synopsis
1816 "OAuthlib authentication support for Requests")
1817 (description
1818 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
1819provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
1820 (license license:isc)))
1821
1822(define-public python2-requests-oauthlib
1823 (package-with-python2 python-requests-oauthlib))
1824
1825(define-public python-url
1826 (package
1827 (name "python-url")
1828 (version "0.2.0")
1829 (source (origin
1830 (method url-fetch)
1831 (uri (pypi-uri "url" version))
1832 (sha256
1833 (base32
1834 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
1835 (build-system python-build-system)
1836 (propagated-inputs
1837 `(("python-publicsuffix" ,python-publicsuffix)))
1838 (native-inputs
1839 `(("python-coverage" ,python-coverage)
1840 ("python-nose" ,python-nose)))
1841 (arguments
1842 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
1843 (home-page "https://github.com/seomoz/url-py")
1844 (synopsis "URL Parsing")
1845 (description "Library for parsing urls.")
1846 (license license:expat)
1847 (properties `((python2-variant . ,(delay python2-url))))))
1848
1849(define-public python2-url
1850 (let ((base (package-with-python2 (strip-python2-variant python-url))))
1851 (package (inherit base)
1852 (propagated-inputs
1853 `(("python2-publicsuffix" ,python2-publicsuffix))))))
1854
1855(define-public python-cachecontrol
1856 (package
1857 (name "python-cachecontrol")
1858 (version "0.11.6")
1859 (source
1860 (origin
1861 (method url-fetch)
1862 ;; Pypi does not have tests.
1863 (uri (string-append
1864 "https://github.com/ionrock/cachecontrol/archive/v"
1865 version ".tar.gz"))
1866 (file-name (string-append name "-" version ".tar.gz"))
1867 (sha256
1868 (base32
1869 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
1870 (build-system python-build-system)
1871 (arguments
1872 `(#:phases
1873 (modify-phases %standard-phases
1874 (replace 'check
1875 (lambda _
1876 ;; Drop test that requires internet access.
1877 (delete-file "tests/test_regressions.py")
1878 (setenv "PYTHONPATH"
1879 (string-append (getcwd) "/build/lib:"
1880 (getenv "PYTHONPATH")))
12adfdf0
TGR
1881 (invoke "py.test" "-vv")
1882 #t)))))
1b2f753d
LC
1883 (native-inputs
1884 `(("python-pytest" ,python-pytest)
1885 ("python-redis" ,python-redis)
1886 ("python-webtest" ,python-webtest)
1887 ("python-mock" ,python-mock)))
1888 (propagated-inputs
1889 `(("python-requests" ,python-requests)
1890 ("python-lockfile" ,python-lockfile)))
1891 (home-page "https://github.com/ionrock/cachecontrol")
1892 (synopsis "The httplib2 caching algorithms for use with requests")
1893 (description "CacheControl is a port of the caching algorithms in
1894@code{httplib2} for use with @code{requests} session objects.")
1895 (license license:asl2.0)))
1896
1897(define-public python2-cachecontrol
1898 (package-with-python2 python-cachecontrol))
1899
1900(define-public python-betamax
1901 (package
1902 (name "python-betamax")
98516883 1903 (version "0.8.1")
1b2f753d
LC
1904 (source
1905 (origin
1906 (method url-fetch)
1907 (uri (pypi-uri "betamax" version))
1908 (sha256
1909 (base32
98516883 1910 "1hki1c2vs7adq7zr56wi6i5bhrkia4s2ywpv2c98ibnczz709w2v"))))
1b2f753d
LC
1911 (build-system python-build-system)
1912 (arguments
1913 '(;; Many tests fail because they require networking.
1914 #:tests? #f))
1915 (propagated-inputs
1916 `(("python-requests" ,python-requests)))
1917 (home-page "https://github.com/sigmavirus24/betamax")
1918 (synopsis "Record HTTP interactions with python-requests")
1919 (description "Betamax will record your test suite's HTTP interactions and
1920replay them during future tests. It is designed to work with python-requests.")
1921 (license license:expat)))
1922
1923(define-public python2-betamax
1924 (package-with-python2 python-betamax))
1925
1926(define-public python-betamax-matchers
1927 (package
1928 (name "python-betamax-matchers")
1929 (version "0.4.0")
1930 (source
1931 (origin
1932 (method url-fetch)
1933 (uri (pypi-uri "betamax-matchers" version))
1934 (sha256
1935 (base32
1936 "07qpwjyq2i2aqhz5iwghnj4pqr2ys5n45v1vmpcfx9r5mhwrsq43"))))
1937 (build-system python-build-system)
1938 (propagated-inputs
1939 `(("python-betamax" ,python-betamax)
1940 ("python-requests-toolbelt" ,python-requests-toolbelt)))
1941 (home-page "https://github.com/sigmavirus24/betamax_matchers")
1942 (synopsis "VCR imitation for python-requests")
1943 (description "@code{betamax-matchers} provides a set of Matchers for
1944Betamax.")
1945 (license license:asl2.0)))
1946
1947(define-public python2-betamax-matchers
1948 (package-with-python2 python-betamax-matchers))
1949
1950(define-public python-s3transfer
1951 (package
1952 (name "python-s3transfer")
bda82eff 1953 (version "0.1.13")
1b2f753d
LC
1954 (source (origin
1955 (method url-fetch)
1956 (uri (pypi-uri "s3transfer" version))
1957 (sha256
1958 (base32
bda82eff 1959 "1harvyn1s8v54n1w5h7c0lg4bgjh68aylhg28s8n174q53h1ip4h"))))
1b2f753d
LC
1960 (build-system python-build-system)
1961 (arguments
1962 `(#:phases
1963 (modify-phases %standard-phases
1964 (replace 'check
1965 (lambda _
1966 ;; 7 of the 'integration' tests require network access or login
1967 ;; credentials.
12adfdf0
TGR
1968 (invoke "nosetests" "--exclude=integration")
1969 #t)))))
1b2f753d
LC
1970 (native-inputs
1971 `(("python-docutils" ,python-docutils)
1972 ("python-mock" ,python-mock)
1973 ("python-nose" ,python-nose)))
1974 (propagated-inputs
1975 `(("python-botocore" ,python-botocore)))
1976 (synopsis "Amazon S3 Transfer Manager")
1977 (description "S3transfer is a Python library for managing Amazon S3
1978transfers.")
1979 (home-page "https://github.com/boto/s3transfer")
1980 (license license:asl2.0)
1981 (properties `((python2-variant . ,(delay python2-s3transfer))))))
1982
1983(define-public python2-s3transfer
1984 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
1985 (package
1986 (inherit base)
1987 (native-inputs
1988 `(("python2-futures" ,python2-futures)
1989 ,@(package-native-inputs base))))))
1990
9c98d588
CB
1991(define-public python-slimit
1992 (package
1993 (name "python-slimit")
1994 (version "0.8.1")
1995 (source
1996 (origin
1997 (method url-fetch)
1998 (uri (pypi-uri "slimit" version ".zip"))
1999 (sha256
2000 (base32
2001 "02vj2x728rs1127q2nc27frrqra4fczivnb7gch6n5lzi7pxqczl"))))
2002 (build-system python-build-system)
2003 (native-inputs
2004 `(("unzip" ,unzip)))
2005 (propagated-inputs
2006 `(("python-ply" ,python-ply)))
2007 (home-page "https://slimit.readthedocs.io/")
2008 (synopsis "JavaScript minifier, parser and lexer written in Python")
2009 (description
2010 "SlimIt is a JavaScript minifier written in Python. It compiles
2011JavaScript into more compact code so that it downloads and runs faster.
2012SlimIt also provides a library that includes a JavaScript parser, lexer,
2013pretty printer and a tree visitor.")
2014 (license license:expat)))
2015
1b2f753d
LC
2016(define-public python-flask-restful
2017 (package
2018 (name "python-flask-restful")
4f8be6d9 2019 (version "0.3.7")
1b2f753d
LC
2020 (source
2021 (origin
2022 (method url-fetch)
2023 (uri (pypi-uri "Flask-RESTful" version))
2024 (sha256
4f8be6d9
EF
2025 (base32
2026 "1a9cbwkr6krryyzq4sd3f415nkkc6dyfls5i3pgyibs94g0hw97q"))))
1b2f753d
LC
2027 (build-system python-build-system)
2028 (propagated-inputs
2029 `(("python-aniso8601" ,python-aniso8601)
2030 ("python-flask" ,python-flask)
2031 ("python-pycrypto" ,python-pycrypto)
2032 ("python-pytz" ,python-pytz)))
2033 (native-inputs
2034 `(;; Optional dependency of Flask. Tests need it.
2035 ("python-blinker" ,python-blinker)
2036 ("python-mock" ,python-mock) ; For tests
2037 ("python-nose" ,python-nose) ; For tests
2038 ("python-sphinx" ,python-sphinx)))
2039 (home-page
2040 "https://www.github.com/flask-restful/flask-restful/")
2041 (synopsis
2042 "Flask module for creating REST APIs")
2043 (description
2044 "This package contains a Flask module for creating REST APIs.")
2045 (license license:bsd-3)))
2046
2047(define-public python-flask-basicauth
2048 (package
2049 (name "python-flask-basicauth")
2050 (version "0.2.0")
2051 (source
2052 (origin
2053 (method url-fetch)
2054 (uri (pypi-uri "Flask-BasicAuth" version))
2055 (sha256
2056 (base32
2057 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
2058 (build-system python-build-system)
2059 (propagated-inputs
2060 `(("python-flask" ,python-flask)))
2061 (home-page
2062 "https://github.com/jpvanhal/flask-basicauth")
2063 (synopsis
2064 "HTTP basic access authentication for Flask")
2065 (description
2066 "This package provides HTTP basic access authentication for Flask.")
2067 (license license:bsd-3)))
2068
2069(define-public python-flask-sqlalchemy
2070 (package
2071 (name "python-flask-sqlalchemy")
2072 (version "2.1")
2073 (source
2074 (origin
2075 (method url-fetch)
2076 (uri (pypi-uri "Flask-SQLAlchemy" version))
2077 (sha256
2078 (base32
2079 "1i9ps5d5snih9xlqhrvmi3qfiygkmqzxh92n25kj4pf89kj4s965"))))
2080 (build-system python-build-system)
2081 (propagated-inputs
2082 `(("python-flask" ,python-flask)
2083 ("python-sqlalchemy" ,python-sqlalchemy)))
2084 (home-page
2085 "https://github.com/mitsuhiko/flask-sqlalchemy")
2086 (synopsis
2087 "Module adding SQLAlchemy support to your Flask application")
2088 (description
2089 "This package adds SQLAlchemy support to your Flask application.")
2090 (license license:bsd-3)))
2091
2092(define-public python-flask-restplus
2093 (package
2094 (name "python-flask-restplus")
2095 (version "0.9.2")
2096 (source
2097 (origin
2098 (method url-fetch)
2099 (uri (pypi-uri "flask-restplus" version))
2100 (sha256
2101 (base32
2102 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
2103 (build-system python-build-system)
2104 (arguments
2105 '(#:tests? #f)) ; FIXME: 35/882 tests failing.
2106 ;; #:phases
2107 ;; (modify-phases %standard-phases
2108 ;; (replace 'check
2109 ;; (lambda _
12adfdf0
TGR
2110 ;; (invoke "nosetests")
2111 ;; #t)))))
1b2f753d
LC
2112 (propagated-inputs
2113 `(("python-aniso8601" ,python-aniso8601)
2114 ("python-flask" ,python-flask)
2115 ("python-jsonschema" ,python-jsonschema)
2116 ("python-pytz" ,python-pytz)
2117 ("python-six" ,python-six)))
2118 (native-inputs
2119 `(("python-tzlocal" ,python-tzlocal)
2120 ("python-blinker" ,python-blinker)
2121 ("python-nose" ,python-nose)
2122 ("python-rednose" ,python-rednose)))
2123 (home-page "https://github.com/noirbizarre/flask-restplus")
2124 (synopsis "Framework for documented API development with Flask")
2125 (description "This package provides a framework for API development with
2126the Flask web framework in Python. It is similar to package
2127@code{python-flask-restful} but supports the @code{python-swagger}
2128documentation builder.")
2129 (license license:expat)))
2130
2131(define-public python-flask-restful-swagger
2132 (package
2133 (name "python-flask-restful-swagger")
2134 (version "0.19")
2135 (source
2136 (origin
2137 (method url-fetch)
2138 (uri (pypi-uri "flask-restful-swagger" version))
2139 (sha256
2140 (base32
2141 "16msl8hd5xjmj833bpy264v98cpl5hkw5bgl5gf5vgndxbv3rm6v"))))
2142 (build-system python-build-system)
2143 (propagated-inputs
2144 `(("python-flask-restful" ,python-flask-restful)))
2145 (home-page "https://github.com/rantav/flask-restful-swagger")
2146 (synopsis "Extract Swagger specs from Flask-Restful projects")
2147 (description "This package lets you extract Swagger API documentation
2148specs from your Flask-Restful projects.")
2149 (license license:expat)))
2150
2151(define-public python2-flask-restful-swagger
2152 (package-with-python2 python-flask-restful-swagger))
2153
2154(define-public python-htmlmin
2155 (package
2156 (name "python-htmlmin")
05075433 2157 (version "0.1.12")
1b2f753d
LC
2158 (source
2159 (origin
2160 (method url-fetch)
2161 (uri (pypi-uri "htmlmin" version))
2162 (sha256
2163 (base32
05075433 2164 "0y51xhabw6x8jk8k93xl8vznshpz3jb6l28075r5sjip613fzhah"))))
1b2f753d 2165 (arguments
05075433 2166 `(#:tests? #f)) ; no tests
1b2f753d
LC
2167 (build-system python-build-system)
2168 (home-page "https://htmlmin.readthedocs.org/en/latest/")
2169 (synopsis "HTML minifier")
2170 (description "@code{htmlmin} is an HTML minifier that just works.
2171It comes with safe defaults and easily configurable options.")
2172 (license license:bsd-3)))
2173
2174(define-public python2-htmlmin
2175 (package-with-python2 python-htmlmin))
2176
2177(define-public python-flask-htmlmin
2178 (package
2179 (name "python-flask-htmlmin")
2180 (version "1.2")
2181 (source
2182 (origin
2183 (method url-fetch)
2184 (uri (pypi-uri "Flask-HTMLmin" version))
2185 (sha256
2186 (base32
2187 "1n6zlq72kakkw0z2jpq6nh74lfsmxybm4g053pwhc14fbr809348"))))
2188 (propagated-inputs
2189 `(("python-flask" ,python-flask)
2190 ("python-htmlmin" ,python-htmlmin)))
2191 (build-system python-build-system)
2192 (home-page "https://github.com/hamidfzm/Flask-HTMLmin")
2193 (synopsis "HTML response minifier for Flask")
2194 (description
2195 "Minify @code{text/html} MIME type responses when using @code{Flask}.")
2196 (license license:bsd-3)))
2197
2198(define-public python2-flask-htmlmin
2199 (package-with-python2 python-flask-htmlmin))
2200
90b9c5ad
CB
2201(define-public python-jsmin
2202 (package
2203 (name "python-jsmin")
2204 (version "2.2.2")
2205 (source
2206 (origin
2207 (method url-fetch)
2208 (uri (pypi-uri "jsmin" version))
2209 (sha256
2210 (base32
2211 "0fsmqbjvpxvff0984x7c0y8xmf49ax9mncz48b9xjx8wrnr9kpxn"))))
2212 (build-system python-build-system)
2213 (home-page "https://github.com/tikitu/jsmin/")
2214 (synopsis "Python JavaScript minifier")
2215 (description
2216 "@code{jsmin} is a JavaScript minifier, usable from both Python code and
2217on the command line.")
2218 (license license:expat)))
2219
1b2f753d
LC
2220(define-public python-flask-login
2221 (package
2222 (name "python-flask-login")
d6ab1d0a 2223 (version "0.4.1")
1b2f753d
LC
2224 (source
2225 (origin
79374801
TGR
2226 (method git-fetch)
2227 (uri (git-reference
2228 (url "https://github.com/maxcountryman/flask-login.git")
2229 (commit version)))
2230 (file-name (git-file-name name version))
1b2f753d 2231 (sha256
d6ab1d0a 2232 (base32 "1rj0qwyxapxnp84fi4lhmvh3d91fdiwz7hibw77x3d5i72knqaa9"))))
1b2f753d 2233 (arguments
d6ab1d0a
TGR
2234 `(#:phases
2235 (modify-phases %standard-phases
2236 (add-before 'check 'avoid-yanc
2237 ;; Work around '.nosetests-real: error: no such option: --with-yanc'.
2238 (lambda _
2239 (setenv "NOCOLOR" "set")
2240 #t)))))
1b2f753d 2241 (build-system python-build-system)
d6ab1d0a
TGR
2242 (propagated-inputs
2243 `(("python-flask" ,python-flask)))
2244 (native-inputs
2245 ;; For tests.
2246 `(("python-blinker" ,python-blinker)
2247 ("python-mock" ,python-mock)
2248 ("python-nose" ,python-nose)
2249 ("python-pep8" ,python-pep8)
2250 ("python-pyflakes" ,python-pyflakes)
2251 ("python-semantic-version" ,python-semantic-version)
2252 ("python-werkzeug" ,python-werkzeug)))
1b2f753d
LC
2253 (home-page "https://github.com/maxcountryman/flask-login")
2254 (synopsis "User session management for Flask")
2255 (description
2256 "@code{Flask-Login} provides user session management for Flask. It
2257handles the common tasks of logging in, logging out, and remembering your
2258users' sessions over extended periods of time.")
2259 (license license:expat)))
2260
2261(define-public python2-flask-login
2262 (package-with-python2 python-flask-login))
2263
2264(define-public python-oauth2client
2265 (package
2266 (name "python-oauth2client")
2267 (version "4.0.0")
2268 (source
2269 (origin
2270 (method url-fetch)
2271 (uri (pypi-uri "oauth2client" version))
2272 (sha256
2273 (base32
2274 "1irqqap2zibysf8dba8sklfqikia579srd0phm5n754ni0h59gl0"))))
2275 (build-system python-build-system)
2276 (arguments
2277 `(#:tests? #f))
2278 (propagated-inputs
2279 `(("python-httplib2" ,python-httplib2)
2280 ("python-pyasn1" ,python-pyasn1)
2281 ("python-pyasn1-modules" ,python-pyasn1-modules)
2282 ("python-rsa" ,python-rsa)
2283 ("python-six" ,python-six)))
9be5ecdf 2284 (home-page "https://github.com/google/oauth2client/")
1b2f753d
LC
2285 (synopsis "OAuth 2.0 client library")
2286 (description "@code{python-oauth2client} provides an OAuth 2.0 client
2287library for Python")
2288 (license license:asl2.0)))
2289
1ceca46b
MO
2290(define-public python2-oauth2client
2291 (package-with-python2 python-oauth2client))
2292
1b2f753d
LC
2293(define-public python-flask-oidc
2294 (package
2295 (name "python-flask-oidc")
2296 (version "1.1.1")
2297 (source
2298 (origin
2299 (method url-fetch)
2300 (uri (pypi-uri "flask-oidc" version))
2301 (sha256
2302 (base32
2303 "1ay5j0mf174bix7i67hclr95gv16z81fpx0dijvi0gydvdj3ddy2"))))
2304 (build-system python-build-system)
2305 (propagated-inputs
2306 `(("python-flask" ,python-flask)
2307 ("python-itsdangerous" ,python-itsdangerous)
2308 ("python-oauth2client" ,python-oauth2client)
2309 ("python-six" ,python-six)))
2310 (native-inputs
2311 `(("python-nose" ,python-nose)
2312 ("python-mock" ,python-mock)))
2313 (home-page "https://github.com/puiterwijk/flask-oidc")
2314 (synopsis "OpenID Connect extension for Flask")
2315 (description "@code{python-flask-oidc} provides an OpenID Connect extension
2316for Flask.")
2317 (license license:bsd-2)))
2318
2319(define-public python-webassets
2320 (package
2321 (name "python-webassets")
2322 (version "0.12.1")
2323 (source
2324 (origin
2325 (method url-fetch)
2326 (uri (pypi-uri "webassets" version))
2327 (sha256
2328 (base32
2329 "1nrqkpb7z46h2b77xafxihqv3322cwqv6293ngaky4j3ff4cing7"))))
2330 (build-system python-build-system)
2331 (native-inputs
2332 `(("python-jinja2" ,python-jinja2)
2333 ("python-mock" ,python-mock)
2334 ("python-nose" ,python-nose)
2335 ("python-pytest" ,python-pytest)))
2336 (home-page "https://github.com/miracle2k/webassets")
2337 (synopsis "Media asset management")
2338 (description "Merges, minifies and compresses Javascript and CSS files,
2339supporting a variety of different filters, including YUI, jsmin, jspacker or
2340CSS tidy. Also supports URL rewriting in CSS files.")
2341 (license license:bsd-2)))
2342
2343(define-public python-cssmin
2344 (package
2345 (name "python-cssmin")
2346 (version "0.2.0")
2347 (source
2348 (origin
2349 (method url-fetch)
2350 (uri (pypi-uri "cssmin" version))
2351 (sha256
2352 (base32
2353 "1dk723nfm2yf8cp4pj785giqlwv42l0kj8rk40kczvq1hk6g04p0"))))
2354 (build-system python-build-system)
2355 (home-page "https://github.com/zacharyvoase/cssmin")
2356 (synopsis "Python port of the YUI CSS Compressor")
2357 (description "Python port of the YUI CSS Compressor.")
2358 (license (list license:expat license:bsd-3))))
2359
2360(define-public python2-cssmin
2361 (package-with-python2 python-cssmin))
2362
2363(define-public python-elasticsearch
2364 (package
2365 (name "python-elasticsearch")
aabcb6e5 2366 (version "6.1.1")
1b2f753d
LC
2367 (source
2368 (origin
2369 (method url-fetch)
2370 (uri (pypi-uri "elasticsearch" version))
2371 (sha256
2372 (base32
aabcb6e5 2373 "1kjxl45yvvgfb5fmamx0kfsfg9pzphiqrwbkns3s28r1w7ya74cd"))))
1b2f753d
LC
2374 (build-system python-build-system)
2375 (native-inputs
2376 `(("python-mock" ,python-mock)
2377 ("python-nosexcover" ,python-nosexcover)
2378 ("python-pyaml" ,python-pyaml)
2379 ("python-requests" ,python-requests)))
2380 (propagated-inputs
2381 `(("urllib3" ,python-urllib3)))
2382 (arguments
2383 ;; tests require the test_elasticsearch module but it is not distributed.
2384 `(#:tests? #f))
2385 (home-page "https://github.com/elastic/elasticsearch-py")
2386 (synopsis "Low-level client for Elasticsearch")
2387 (description "Official low-level client for Elasticsearch. Its goal is to
2388provide common ground for all Elasticsearch-related code in Python; because of
2389this it tries to be opinion-free and very extendable.")
2390 (license license:expat)))
2391
2392(define-public python2-elasticsearch
2393 (package-with-python2 python-elasticsearch))
2394
2395(define-public python-flask-script
2396 (package
2397 (name "python-flask-script")
6a192184 2398 (version "2.0.6")
1b2f753d
LC
2399 (source
2400 (origin
2401 (method url-fetch)
2402 (uri (pypi-uri "Flask-Script" version))
2403 (sha256
2404 (base32
6a192184 2405 "0r8w2v89nj6b9p91p495cga5m72a673l2wc0hp0zqk05j4yrc9b4"))))
1b2f753d
LC
2406 (build-system python-build-system)
2407 (propagated-inputs
2408 `(("python-flask" ,python-flask)
2409 ("python-argcomplete" ,python-argcomplete)
2410 ("python-werkzeug" ,python-werkzeug)))
2411 (native-inputs
2412 `(("python-pytest" ,python-pytest)))
2413 (home-page
9be5ecdf 2414 "https://github.com/smurfix/flask-script")
1b2f753d
LC
2415 (synopsis "Scripting support for Flask")
2416 (description "The Flask-Script extension provides support for writing
2417external scripts in Flask. This includes running a development server,
2418a customised Python shell, scripts to set up your database, cronjobs,
2419and other command-line tasks that belong outside the web application
2420itself.")
2421 (license license:bsd-3)))
2422
2423(define-public python2-flask-script
2424 (package-with-python2 python-flask-script))
2425
2426(define-public python-flask-migrate
2427 (package
2428 (name "python-flask-migrate")
2429 (version "2.0.3")
2430 (source
2431 (origin
2432 (method url-fetch)
2433 (uri (pypi-uri "Flask-Migrate" version))
2434 (sha256
2435 (base32
2436 "107x78lkqsnbg92dld3dkagg07jvchp3ib3y0sivc4ipz6n1y7rk"))))
2437 (build-system python-build-system)
2438 (propagated-inputs
2439 `(("python-flask" ,python-flask)
2440 ("python-alembic" ,python-alembic)
2441 ("python-sqlalchemy" ,python-sqlalchemy)
2442 ("python-flask-script" ,python-flask-script)
2443 ("python-flask-sqlalchemy" ,python-flask-sqlalchemy)))
9be5ecdf 2444 (home-page "https://github.com/miguelgrinberg/flask-migrate/")
1b2f753d
LC
2445 (synopsis "SQLAlchemy database migrations for Flask programs using
2446Alembic")
2447 (description "This package contains SQLAlchemy database migration tools
2448for Flask programs that are using @code{python-alembic}.")
2449 (license license:expat)))
2450
2451(define-public python2-flask-migrate
2452 (package-with-python2 python-flask-migrate))
2453
2454(define-public python-genshi
2455 (package
2456 (name "python-genshi")
7c8b1bf6 2457 (version "0.7.1")
1b2f753d
LC
2458 (source
2459 (origin
7c8b1bf6
TGR
2460 (method git-fetch)
2461 (uri (git-reference
2462 (url "https://github.com/edgewall/genshi.git")
2463 (commit version)))
2464 (file-name (git-file-name name version))
1b2f753d 2465 (sha256
7c8b1bf6 2466 (base32 "01fx8fnpay5w048ppyjivg2dgfpp5rybn07y3pfsgj2knram3nhl"))))
1b2f753d
LC
2467 (build-system python-build-system)
2468 (home-page "https://genshi.edgewall.org/")
2469 (synopsis "Toolkit for generation of output for the web")
2470 (description "Genshi is a Python library that provides an integrated set
2471of components for parsing, generating, and processing HTML, XML or other
2472textual content for output generation on the web.")
2473 (license license:bsd-3)))
2474
1b2f753d
LC
2475(define-public python2-genshi
2476 (package-with-python2 python-genshi))
2477
2478(define-public python-flask-principal
2479 (package
2480 (name "python-flask-principal")
2481 (version "0.4.0")
2482 (source
2483 (origin
2484 (method url-fetch)
2485 (uri (pypi-uri "Flask-Principal" version))
2486 (sha256
2487 (base32
2488 "0lwlr5smz8vfm5h9a9i7da3q1c24xqc6vm9jdywdpgxfbi5i7mpm"))))
2489 (build-system python-build-system)
2490 (propagated-inputs
2491 `(("python-blinker" ,python-blinker)))
2492 (native-inputs
2493 `(("python-flask" ,python-flask)
2494 ("python-nose" ,python-nose)))
2495 (home-page "http://packages.python.org/Flask-Principal/")
2496 (synopsis "Identity management for Flask")
2497 (description "@code{flask_principal} is a identity management library for
2498Flask. It supports managing both authentication and authorization data in a
2499thread-local variable.")
2500 (license license:expat)))
2501
2502(define-public python2-flask-principal
2503 (package-with-python2 python-flask-principal))
2504
2505(define-public python-flask-httpauth
2506 (package
2507 (name "python-flask-httpauth")
2508 (version "3.2.3")
2509 (source
2510 (origin
2511 (method url-fetch)
2512 (uri (pypi-uri "Flask-HTTPAuth" version))
2513 (sha256
2514 (base32
2515 "13gff5w1mqpzm5nccyg02v3ifb9ifqh5k866cssjhghhg6msfjsz"))))
2516 (build-system python-build-system)
2517 (native-inputs
2518 `(("python-flask" ,python-flask)))
9be5ecdf 2519 (home-page "https://github.com/miguelgrinberg/flask-httpauth/")
1b2f753d
LC
2520 (synopsis "Basic and Digest HTTP authentication for Flask routes")
2521 (description "@code{flask_httpauth} provides Basic and Digest HTTP
2522authentication for Flask routes.")
2523 (license license:expat)))
2524
2525(define-public python2-flask-httpauth
2526 (package-with-python2 python-flask-httpauth))
2527
2528(define-public python-uritemplate
2529 (package
2530 (name "python-uritemplate")
2531 (version "3.0.0")
2532 (source
2533 (origin
2534 (method url-fetch)
2535 (uri (pypi-uri "uritemplate" version))
2536 (sha256
2537 (base32
2538 "0781gm9g34wa0asc19dx81ng0nqq07igzv3bbvdqmz13pv7469n0"))))
2539 (build-system python-build-system)
2540 (home-page "https://uritemplate.readthedocs.org")
2541 (synopsis "Library to deal with URI Templates")
2542 (description "@code{uritemplate} provides Python library to deal with URI
2543Templates.")
2544 (license license:bsd-2)))
2545
2546(define-public python2-uritemplate
2547 (package-with-python2 python-uritemplate))
2548
589e3f4e
LC
2549(define-public python-publicsuffix
2550 (package
2551 (name "python-publicsuffix")
2552 (version "1.1.0")
2553 (source (origin
2554 (method url-fetch)
2555 (uri (pypi-uri "publicsuffix" version))
2556 (sha256
2557 (base32
2558 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
2559 (build-system python-build-system)
2560 (arguments
2561 `(#:tests? #f)) ; tests use the internet
2562 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
2563 (synopsis "Get suffix for a domain name")
2564 (description "Get a public suffix for a domain name using the Public Suffix
2565List.")
2566 (license license:expat)))
2567
2568(define-public python2-publicsuffix
2569 (package-with-python2 python-publicsuffix))
2570
2571(define-public python-publicsuffix2
2572 (package
2573 (name "python-publicsuffix2")
2574 (version "2.20160818")
2575 (source
2576 (origin
2577 (method url-fetch)
2578 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
2579 (sha256
2580 (base32
2581 "1bb55yka9vkn7i6y1kjzxa516kh6v4gsrxa90w5wdz5p5n968r68"))))
2582 (build-system python-build-system)
2583 (arguments
2584 '(#:tests? #f)) ; The test suite requires network access.
2585 (home-page "https://github.com/pombredanne/python-publicsuffix2")
2586 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
2587 (description "Get a public suffix for a domain name using the Public Suffix
2588List. Forked from and using the same API as the publicsuffix package.")
2589 (license (list license:expat license:mpl2.0))))
2590
2591(define-public python2-publicsuffix2
2592 (package-with-python2 python-publicsuffix2))
98c6a025
RW
2593
2594(define-public python-werkzeug
2595 (package
2596 (name "python-werkzeug")
c5e110ce 2597 (version "0.14.1")
98c6a025
RW
2598 (source
2599 (origin
2600 (method url-fetch)
c5e110ce 2601 (uri (pypi-uri "werkzeug" version))
98c6a025
RW
2602 (sha256
2603 (base32
c5e110ce 2604 "0z2m4snn1vc9518r2vzgdj1nc90kcgi60wijvd29yvcp85ypmzf3"))))
98c6a025 2605 (build-system python-build-system)
c5e110ce
EF
2606 (arguments
2607 '(#:phases
2608 (modify-phases %standard-phases
2609 (delete 'check)
2610 (add-after 'install 'check
2611 (lambda* (#:key inputs outputs #:allow-other-keys)
2612 (add-installed-pythonpath inputs outputs)
2613 (invoke "python" "-m" "pytest"))))))
2614 (propagated-inputs
2615 `(("python-requests" ,python-requests)))
98c6a025
RW
2616 (native-inputs
2617 `(("python-pytest" ,python-pytest)))
c5e110ce 2618 (home-page "https://www.palletsprojects.org/p/werkzeug/")
98c6a025
RW
2619 (synopsis "Utilities for WSGI applications")
2620 (description "One of the most advanced WSGI utility modules. It includes a
2621powerful debugger, full-featured request and response objects, HTTP utilities to
2622handle entity tags, cache control headers, HTTP dates, cookie handling, file
2623uploads, a powerful URL routing system and a bunch of community-contributed
2624addon modules.")
2625 (license license:x11)))
2626
2627(define-public python2-werkzeug
2628 (package-with-python2 python-werkzeug))
2629
2630(define-public python-bottle
2631 (package
2632 (name "python-bottle")
2633 (version "0.12.13")
2634 (source
2635 (origin
2636 (method url-fetch)
2637 (uri (pypi-uri "bottle" version))
2638 (sha256
2639 (base32
2640 "0m9k2a7yxvggc4kw8fsvj381vgsvfcdshg5nzy6vwrxiw2p53drr"))))
2641 (build-system python-build-system)
2642 (home-page "http://bottlepy.org/")
2643 (synopsis "WSGI framework for small web-applications.")
2644 (description "@code{python-bottle} is a WSGI framework for small web-applications.")
2645 (license license:expat)))
2646
2647(define-public python2-bottle
2648 (package-with-python2 python-bottle))
2649
2650(define-public python-wtforms
2651 (package
2652 (name "python-wtforms")
2653 (version "2.1")
2654 (source
2655 (origin
2656 (method url-fetch)
2657 (uri (pypi-uri "WTForms" version ".zip"))
2658 (sha256
2659 (base32
2660 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
2661 (build-system python-build-system)
2662 (arguments
2663 '(#:phases
2664 (modify-phases %standard-phases
2665 (add-after 'unpack 'remove-django-test
2666 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
2667 (lambda _
2668 (substitute*
2669 "tests/runtests.py"
2670 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
2671 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
2672 #t)))))
2673 (native-inputs
2674 `(("unzip" ,unzip)))
2675 (home-page "http://wtforms.simplecodes.com/")
2676 (synopsis
2677 "Form validation and rendering library for Python web development")
2678 (description
2679 "WTForms is a flexible forms validation and rendering library
2680for Python web development. It is very similar to the web form API
2681available in Django, but is a standalone package.")
2682 (license license:bsd-3)))
2683
2684(define-public python2-wtforms
2685 (package-with-python2 python-wtforms))
2686
2687(define-public python-paste
2688 (package
2689 (name "python-paste")
95176544 2690 (version "3.0.4")
98c6a025
RW
2691 (source
2692 (origin
2693 (method url-fetch)
2694 (uri (pypi-uri "Paste" version))
2695 (sha256
2696 (base32
95176544
EF
2697 "01w26w9jyfkh0mfydhfz3dwy3pj3fw7mzvj0lna3vs8hyx1hwl0n"))
2698 (patches (search-patches "python-paste-remove-timing-test.patch"))
2699 (modules '((guix build utils)))
2700 (snippet
2701 '(begin
2702 ;; This test calls out to the internet.
2703 (delete-file "tests/test_proxy.py") #t))))
98c6a025
RW
2704 (build-system python-build-system)
2705 (native-inputs
95176544
EF
2706 `(("python-pytest" ,python-pytest)
2707 ("python-pytest-runner" ,python-pytest-runner)
2708 ("python-nose" ,python-nose)))
98c6a025
RW
2709 (propagated-inputs
2710 `(("python-six" ,python-six)))
2711 (home-page "http://pythonpaste.org")
2712 (synopsis
2713 "Python web development tools, focusing on WSGI")
2714 (description
2715 "Paste provides a variety of web development tools and middleware which
2716can be nested together to build web applications. Paste's design closely
2717follows ideas flowing from WSGI (Web Standard Gateway Interface).")
2718 (license license:expat)))
2719
2720(define-public python2-paste
2721 (package-with-python2 python-paste))
2722
2723(define-public python-pastescript
2724 (package
2725 (name "python-pastescript")
2726 (version "2.0.2")
2727 (source
2728 (origin
2729 (method url-fetch)
2730 (uri (pypi-uri "PasteScript" version))
2731 (sha256
2732 (base32
2733 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
2734 (build-system python-build-system)
2735 (native-inputs
2736 `(("python-nose" ,python-nose)))
2737 (propagated-inputs
2738 `(("python-paste" ,python-paste)
2739 ("python-pastedeploy" ,python-pastedeploy)))
2740 (home-page "http://pythonpaste.org/script/")
2741 (arguments
2742 '(;; Unfortunately, this requires the latest unittest2,
2743 ;; but that requires traceback2 which requires linecache2 which requires
2744 ;; unittest2. So we're skipping tests for now.
2745 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
2746 ;; so in theory we could get around this situation somehow.)
2747 #:tests? #f))
2748 (synopsis
2749 "Pluggable command line tool for serving web applications and more")
2750 (description
2751 "PasteScript is a plugin-friendly command line tool which provides a
2752variety of features, from launching web applications to bootstrapping project
2753layouts.")
2754 (license license:expat)))
2755
2756(define-public python2-pastescript
2757 (package-with-python2 python-pastescript))
c5964611
2758
2759(define-public python2-urlgrabber
2760 (package
2761 (name "python2-urlgrabber")
2762 (version "3.10.2")
2763 (source
2764 (origin
2765 (method url-fetch)
2766 (uri (pypi-uri "urlgrabber" version))
2767 (sha256
2768 (base32 "0w1h7hlsq406bxfy2pn4i9bd003bwl0q9b7p03z3g6yl0d21ddq5"))))
2769 (build-system python-build-system)
2770 (arguments `(#:python ,python-2)) ; urlgrabber supports python2 only
2771 (home-page "http://urlgrabber.baseurl.org")
2772 (synopsis "High-level cross protocol url-grabber")
2773 (description "@code{urlgrabber} is Python2 library that unifies access to
2774files available on web, FTP or locally. It supports HTTP, FTP and file://
2775protocols, it supports features like HTTP keep-alive, reget, throttling and
2776more.")
2777 (license license:lgpl2.1+)))
2778
85ccc0c2
NG
2779(define-public python-pycares
2780 (package
2781 (name "python-pycares")
2782 (version "2.3.0")
2783 (source
2784 (origin
2785 (method url-fetch)
2786 (uri (pypi-uri "pycares" version))
2787 (sha256
2788 (base32
2789 "0h4fxw5drrhfyslzmfpljk0qnnpbhhb20hnnndzahhbwylyw1x1n"))))
2790 (build-system python-build-system)
2791 (arguments
2792 `(#:tests? #f)) ;tests require internet access
2793 (home-page "http://github.com/saghul/pycares")
2794 (synopsis "Python interface for @code{c-ares}")
2795 (description "@code{pycares} is a Python module which provides an
2796interface to @code{c-ares}, a C library that performs DNS requests and
2797name resolutions asynchronously.")
2798 (license license:expat)))
2eccb414
NG
2799
2800(define-public python-yarl
2801 (package
2802 (name "python-yarl")
2803 (version "1.1.1")
2804 (source
2805 (origin
2806 (method url-fetch)
2807 (uri (pypi-uri "yarl" version))
2808 (sha256
2809 (base32
2810 "1s6z13g8vgxfkkqwhn6imnm7pl7ky9arv4jygnn6bcndcbidg7d6"))))
2811 (build-system python-build-system)
2812 (native-inputs
2813 `(("python-pytest" ,python-pytest)
2814 ("python-pytest-runner" ,python-pytest-runner)))
2815 (propagated-inputs
2816 `(("python-idna" ,python-idna)
2817 ("python-multidict" ,python-multidict)))
2818 (home-page "https://github.com/aio-libs/yarl/")
2819 (synopsis "Yet another URL library")
2820 (description "@code{yarl} module provides handy @code{URL} class
2821for URL parsing and changing.")
2822 (license license:asl2.0)))
961bcdf5
MO
2823
2824(define-public python-google-api-client
2825 (package
2826 (name "python-google-api-client")
2827 (version "1.6.7")
2828 (source
2829 (origin
2830 (method url-fetch)
2831 (uri (pypi-uri "google-api-python-client" version))
2832 (sha256
2833 (base32
2834 "1wpbbbxfpy9mwxdy3kn352cb590ladv574j1aa2l4grjdqw3ln05"))))
2835 (build-system python-build-system)
2836 (arguments
2837 '(#:tests? #f)) ; tests require internet access
2838 (native-inputs
2839 `(("python-httplib2" ,python-httplib2)
2840 ("python-six" ,python-six)
2841 ("python-oauth2client" ,python-oauth2client)
2842 ("python-uritemplate" ,python-uritemplate)))
2843 (home-page "https://github.com/google/google-api-python-client")
2844 (synopsis "Core Python library for accessing Google APIs")
2845 (description "Python client library for Google's discovery based APIs")
2846 (license license:asl2.0)))
2847
2848(define-public python2-google-api-client
2849 (package-with-python2 python-google-api-client))
0750f344
RW
2850
2851(define-public python-hawkauthlib
2852 (package
2853 (name "python-hawkauthlib")
2854 (version "2.0.0")
2855 (source
2856 (origin
2857 (method url-fetch)
2858 (uri (pypi-uri "hawkauthlib" version))
2859 (sha256
2860 (base32
2861 "03ai47s4h8nfnrf25shbfvkm1b9n1ccd4nmmj280sg1fayi69zgg"))))
2862 (build-system python-build-system)
2863 (propagated-inputs
2864 `(("python-requests" ,python-requests)
2865 ("python-webob" ,python-webob)))
2866 (home-page "https://github.com/mozilla-services/hawkauthlib")
2867 (synopsis "Hawk Access Authentication protocol")
2868 (description
2869 "This is a low-level Python library for implementing Hawk Access Authentication,
2870a simple HTTP request-signing scheme.")
2871 (license license:mpl2.0)))
084e14cc
RW
2872
2873(define-public python-pybrowserid
2874 (package
2875 (name "python-pybrowserid")
2876 (version "0.14.0")
2877 (source
2878 (origin
2879 (method url-fetch)
2880 (uri (pypi-uri "PyBrowserID" version))
2881 (sha256
2882 (base32
2883 "1qvi79kfb8x9kxkm5lw2mp42hm82cpps1xknmsb5ghkwx1lpc8kc"))))
2884 (build-system python-build-system)
2885 (propagated-inputs
2886 `(("python-requests" ,python-requests)))
2887 (native-inputs
2888 `(("python-mock" ,python-mock)))
2889 (home-page "https://github.com/mozilla/PyBrowserID")
2890 (synopsis "Python library for the BrowserID protocol")
2891 (description
2892 "This is a Python client library for the BrowserID protocol that
2893underlies Mozilla Persona.")
2894 (license license:mpl2.0)))
f45bb3cc
RW
2895
2896(define-public python-pyfxa
2897 (package
2898 (name "python-pyfxa")
2899 (version "0.6.0")
2900 (source
2901 (origin
2902 (method url-fetch)
2903 (uri (pypi-uri "PyFxA" version))
2904 (sha256
2905 (base32
2906 "0axl16fyrz2r88gnw4b12mk7dpkqscv8c4wsc1y5hicl7bsbc4fm"))))
2907 (build-system python-build-system)
2908 (arguments '(#:tests? #f)) ; 17 tests require network access
2909 (propagated-inputs
2910 `(("python-cryptography" ,python-cryptography)
2911 ("python-hawkauthlib" ,python-hawkauthlib)
2912 ("python-pybrowserid" ,python-pybrowserid)
2913 ("python-requests" ,python-requests)
2914 ("python-six" ,python-six)))
2915 (native-inputs
2916 `(("python-grequests" ,python-grequests)
2917 ("python-mock" ,python-mock)
2918 ("python-responses" ,python-responses)
2919 ("python-unittest2" ,python-unittest2)))
2920 (home-page "https://github.com/mozilla/PyFxA")
2921 (synopsis "Firefox Accounts client library for Python")
2922 (description
2923 "This is a Python library for interacting with the Firefox Accounts
2924ecosystem.")
2925 (license license:mpl2.0)))