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