9e7d4113ab2d5b419250433f1ed031dd46b2dec6
[jackhill/guix/guix.git] / gnu / packages / python-web.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
3 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
4 ;;; Copyright © 2017 Christopher Baines <mail@cbaines.net>
5 ;;; Copyright © 2016, 2017 Danny Milosavljevic <dannym+a@scratchpost.org>
6 ;;; Copyright © 2013, 2014, 2015, 2016, 2020 Andreas Enge <andreas@enge.fr>
7 ;;; Copyright © 2016, 2017, 2019, 2020, 2021 Marius Bakke <marius@gnu.org>
8 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ricardo Wurmus <rekado@elephly.net>
9 ;;; Copyright © 2017, 2021 Roel Janssen <roel@gnu.org>
10 ;;; Copyright © 2016, 2017, 2020 Julien Lepiller <julien@lepiller.eu>
11 ;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
12 ;;; Copyright © 2014, 2017, 2021 Eric Bavier <bavier@posteo.net>
13 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
14 ;;; Copyright © 2015 Cyril Roelandt <tipecaml@gmail.com>
15 ;;; Copyright © 2015, 2016, 2017, 2019 Leo Famulari <leo@famulari.name>
16 ;;; Copyright © 2016, 2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
17 ;;; Copyright © 2016–2021 Tobias Geerinckx-Rice <me@tobias.gr>
18 ;;; Copyright © 2015, 2017 Ben Woodcroft <donttrustben@gmail.com>
19 ;;; Copyright © 2015, 2016 Christine Lemmer-Webber <cwebber@dustycloud.org>
20 ;;; Copyright © 2017 Adriano Peluso <catonano@gmail.com>
21 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
22 ;;; Copyright © 2016 David Craven <david@craven.ch>
23 ;;; Copyright © 2017 Oleg Pykhalov <go.wigust@gmail.com>
24 ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
25 ;;; Copyright © 2017 Mark Meyer <mark@ofosos.org>
26 ;;; Copyright © 2018 Tomáš Čech <sleep_walker@gnu.org>
27 ;;; Copyright © 2018, 2019, 2021 Nicolas Goaziou <mail@nicolasgoaziou.fr>
28 ;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com>
29 ;;; Copyright © 2018, 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
30 ;;; Copyright © 2019 Vagrant Cascadian <vagrant@debian.org>
31 ;;; Copyright © 2019 Brendan Tildesley <mail@brendan.scot>
32 ;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
33 ;;; Copyright © 2019, 2020 Tanguy Le Carrour <tanguy@bioneland.org>
34 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
35 ;;; Copyright © 2020 Evan Straw <evan.straw99@gmail.com>
36 ;;; Copyright © 2020 Alexandros Theodotou <alex@zrythm.org>
37 ;;; Copyright © 2020 Holger Peters <holger.peters@posteo.de>
38 ;;; Copyright © 2020 Noisytoot <noisytoot@gmail.com>
39 ;;; Copyright © 2020 Edouard Klein <edk@beaver-labs.com>
40 ;;; Copyright © 2020, 2021 Vinicius Monego <monego@posteo.net>
41 ;;; Copyright © 2020 Konrad Hinsen <konrad.hinsen@fastmail.net>
42 ;;; Copyright © 2020 Giacomo Leidi <goodoldpaul@autistici.org>
43 ;;; Copyright © 2021 Ekaitz Zarraga <ekaitz@elenq.tech>
44 ;;; Copyright © 2021 Greg Hogan <code@greghogan.com>
45 ;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
46 ;;; Copyright © 2021 Pradana Aumars <paumars@courrier.dev>
47 ;;; Copyright © 2021 Arun Isaac <arunisaac@systemreboot.net>
48 ;;; Copyright © 2021 jgart <jgart@dismail.de>
49 ;;; Copyright © 2021 Alice Brenon <alice.brenon@ens-lyon.fr>
50 ;;;
51 ;;; This file is part of GNU Guix.
52 ;;;
53 ;;; GNU Guix is free software; you can redistribute it and/or modify it
54 ;;; under the terms of the GNU General Public License as published by
55 ;;; the Free Software Foundation; either version 3 of the License, or (at
56 ;;; your option) any later version.
57 ;;;
58 ;;; GNU Guix is distributed in the hope that it will be useful, but
59 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
60 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
61 ;;; GNU General Public License for more details.
62 ;;;
63 ;;; You should have received a copy of the GNU General Public License
64 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
65
66 (define-module (gnu packages python-web)
67 #:use-module (guix packages)
68 #:use-module (guix download)
69 #:use-module (guix git-download)
70 #:use-module (guix build-system python)
71 #:use-module (guix utils)
72 #:use-module (gnu packages)
73 #:use-module (gnu packages base)
74 #:use-module (gnu packages check)
75 #:use-module (gnu packages compression)
76 #:use-module (gnu packages curl)
77 #:use-module (gnu packages databases)
78 #:use-module (gnu packages django)
79 #:use-module (gnu packages graphviz)
80 #:use-module (gnu packages groff)
81 #:use-module (gnu packages libevent)
82 #:use-module (gnu packages libffi)
83 #:use-module (gnu packages node)
84 #:use-module (gnu packages pkg-config)
85 #:use-module (gnu packages python)
86 #:use-module (gnu packages python-build)
87 #:use-module (gnu packages python-check)
88 #:use-module (gnu packages python-crypto)
89 #:use-module (gnu packages python-science)
90 #:use-module (gnu packages python-xyz)
91 #:use-module (gnu packages qt)
92 #:use-module (gnu packages serialization)
93 #:use-module (gnu packages sphinx)
94 #:use-module (gnu packages texinfo)
95 #:use-module (gnu packages tls)
96 #:use-module (gnu packages time)
97 #:use-module (gnu packages web)
98 #:use-module (gnu packages xml)
99 #:use-module ((guix licenses) #:prefix license:)
100 #:use-module (srfi srfi-1))
101
102 (define-public python-prawcore
103 (package
104 (name "python-prawcore")
105 (version "2.0.0")
106 (source
107 (origin
108 (method url-fetch)
109 (uri (pypi-uri "prawcore" version))
110 (sha256
111 (base32 "1l9nrn4s03xl8fvkyybdk86bm9cyyk43alkxf9g014a9ynvdk65l"))))
112 (build-system python-build-system)
113 (native-inputs
114 `(("python-betamax" ,python-betamax)
115 ("python-betamax-matchers" ,python-betamax-matchers)
116 ("python-betamax-serializers" ,python-betamax-serializers)
117 ("python-mock" ,python-mock)
118 ("python-pytest" ,python-pytest)
119 ("python-testfixtures" ,python-testfixtures)))
120 (propagated-inputs
121 `(("python-requests" ,python-requests)))
122 (synopsis "Core component of PRAW")
123 (description "PRAWcore is a low-level communication layer used by PRAW.")
124 (home-page "https://praw.readthedocs.io/en/latest/")
125 (license license:bsd-2)))
126
127 (define-public python-praw
128 (package
129 (name "python-praw")
130 (version "7.2.0")
131 (source
132 (origin
133 (method url-fetch)
134 (uri (pypi-uri "praw" version))
135 (sha256
136 (base32 "0ll1a0n8xs8gykizdsfrw63jp6bc39ab0pk3yzwcak96fyxh0ij3"))))
137 (build-system python-build-system)
138 (arguments
139 `(#:phases
140 (modify-phases %standard-phases
141 (add-after 'unpack 'disable-failing-tests
142 (lambda _
143 (with-directory-excursion "tests"
144 ;; Require networking.
145 (for-each delete-file-recursively
146 '("integration/models" "unit/models"))
147 ;; https://github.com/praw-dev/praw/issues/1699
148 ;; #issuecomment-795336704
149 (delete-file "unit/test_config.py"))
150 #t))
151 (replace 'check
152 (lambda* (#:key tests? #:allow-other-keys)
153 (when tests?
154 (invoke "pytest"))
155 #t)))))
156 (native-inputs
157 `(("python-betamax" ,python-betamax)
158 ("python-betamax-matchers" ,python-betamax-matchers)
159 ("python-pytest" ,python-pytest)))
160 (propagated-inputs
161 `(("python-prawcore" ,python-prawcore)
162 ("python-websocket-client" ,python-websocket-client)))
163 (synopsis "Python Reddit API Wrapper")
164 (description "PRAW is a Python package that allows for simple access to
165 Reddit’s API. It aims to be easy to use and internally follows all of Reddit’s
166 API rules.")
167 (home-page "https://praw.readthedocs.io/en/latest/")
168 (license license:bsd-2)))
169
170 (define-public python-aiohttp
171 (package
172 (name "python-aiohttp")
173 (version "3.7.4")
174 (source
175 (origin
176 (method url-fetch)
177 (uri (pypi-uri "aiohttp" version))
178 (sha256
179 (base32 "1pn79h8fng4xi5gl1f6saw31nxgmgyxl41yf3vba1l21673yr12x"))
180 (modules '((guix build utils)))
181 (snippet
182 '(begin
183 (for-each delete-file
184 '("aiohttp/_frozenlist.c"
185 "aiohttp/_helpers.c"
186 "aiohttp/_http_parser.c"
187 "aiohttp/_http_writer.c"
188 "aiohttp/_websocket.c"))))))
189 (build-system python-build-system)
190 (arguments
191 '(#:phases
192 (modify-phases %standard-phases
193 (add-after 'unpack 'fix-tests
194 (lambda _
195 ;; disable brotli tests, because we’re not providing that optional library
196 (substitute* "tests/test_http_parser.py"
197 ((" async def test_feed_eof_no_err_brotli")
198 " @pytest.mark.xfail\n async def test_feed_eof_no_err_brotli"))
199 ;; make sure the timestamp of this file is > 1990, because a few
200 ;; tests like test_static_file_if_modified_since_past_date depend on it
201 (let ((late-90s (* 60 60 24 365 30)))
202 (utime "tests/data.unknown_mime_type" late-90s late-90s))
203
204 ;; Disable test that attempts to access httpbin.org.
205 (substitute* "tests/test_formdata.py"
206 (("async def test_mark_formdata_as_processed.*" all)
207 (string-append "@pytest.mark.xfail\n" all)))
208
209 ;; Don't test the aiohttp pytest plugin to avoid a dependency loop.
210 (delete-file "tests/test_pytest_plugin.py")
211 #t))
212 (add-before 'build 'cythonize
213 (lambda _
214 ;; Adapted from the Makefile.
215 (with-directory-excursion "aiohttp"
216 (for-each
217 (lambda (file)
218 (invoke "cython" "-3"
219 file "-I" "aiohttp"))
220 (find-files "." "_.*\\.pyx$")))))
221 (replace 'check
222 (lambda* (#:key tests? #:allow-other-keys)
223 (setenv "PYTHONPATH"
224 (string-append ".:" (getenv "PYTHONPATH")))
225 (if tests?
226 (invoke "pytest" "-vv"
227 ;; Disable loading the aiohttp coverage plugin
228 ;; to avoid a circular dependency (code coverage
229 ;; is not very interesting to us anyway).
230 "-o" "addopts=''")
231 (format #t "test suite not run~%")))))))
232 (propagated-inputs
233 `(("python-aiodns" ,python-aiodns)
234 ("python-async-timeout" ,python-async-timeout)
235 ("python-attrs" ,python-attrs) ;note: remove for > 3.7
236 ("python-chardet" ,python-chardet)
237 ("python-idna-ssl" ,python-idna-ssl)
238 ("python-multidict" ,python-multidict)
239 ("python-typing-extensions" ,python-typing-extensions)
240 ("python-yarl" ,python-yarl)))
241 (native-inputs
242 `(("python-cython" ,python-cython)
243 ("python-pytest" ,python-pytest)
244 ("python-pytest-mock" ,python-pytest-mock)
245 ("python-re-assert" ,python-re-assert)
246 ("gunicorn" ,gunicorn-bootstrap)
247 ("python-freezegun" ,python-freezegun)
248 ("python-async-generator" ,python-async-generator)))
249 (home-page "https://github.com/aio-libs/aiohttp/")
250 (synopsis "Async HTTP client/server framework (asyncio)")
251 (description "@code{aiohttp} is an asynchronous HTTP client/server
252 framework.
253
254 Its main features are:
255 @itemize
256 @item Supports both client and server side of HTTP protocol.
257 @item Supports both client and server Web-Sockets out-of-the-box without the
258 Callback Hell.
259 @item Web-server has middlewares and pluggable routing.
260 @end itemize")
261 (license license:asl2.0)))
262
263 (define-public python-aiohttp-socks
264 (package
265 (name "python-aiohttp-socks")
266 (version "0.6.0")
267 (source
268 (origin
269 (method url-fetch)
270 (uri (pypi-uri "aiohttp_socks" version))
271 (sha256
272 (base32
273 "04w010bvi719ifpc3sshav95k10hf9nq8czn9yglkj206yxcypdr"))))
274 (build-system python-build-system)
275 (propagated-inputs
276 `(("python-aiohttp" ,python-aiohttp)
277 ("python-attrs" ,python-attrs)
278 ("python-socks" ,python-socks)))
279 (home-page "https://github.com/romis2012/aiohttp-socks")
280 (synopsis "SOCKS proxy connector for aiohttp")
281 (description "This package provides a SOCKS proxy connector for
282 aiohttp. It supports SOCKS4(a) and SOCKS5.")
283 (license license:asl2.0)))
284
285 (define-public python-aiodns
286 (package
287 (name "python-aiodns")
288 (version "1.1.1")
289 (source
290 (origin
291 (method url-fetch)
292 (uri (pypi-uri "aiodns" version))
293 (sha256
294 (base32
295 "1snr5paql8dgvc676n8xq460wypjsb1xj53cf3px1s4wczf7lryq"))))
296 (build-system python-build-system)
297 (propagated-inputs
298 `(("python-pycares" ,python-pycares)))
299 (arguments
300 `(#:tests? #f)) ;tests require internet access
301 (home-page "https://github.com/saghul/aiodns")
302 (synopsis "Simple DNS resolver for asyncio")
303 (description "@code{aiodns} provides a simple way for doing
304 asynchronous DNS resolutions with a synchronous looking interface by
305 using @url{https://github.com/saghul/pycares,pycares}.")
306 (license license:expat)))
307
308 (define-public python-aiorpcx
309 (package
310 (name "python-aiorpcx")
311 (version "0.22.1")
312 (source
313 (origin
314 (method url-fetch)
315 (uri (pypi-uri "aiorpcX" version))
316 (sha256
317 (base32
318 "0lx54bcinp44fmr8q4bbffsqbkg8kdcwykf9i5jj0bj3sfzgf9k0"))))
319 (build-system python-build-system)
320 (propagated-inputs
321 `(("python-attrs" ,python-attrs)))
322 (home-page "https://github.com/kyuupichan/aiorpcX")
323 (synopsis "Generic asyncio RPC implementation")
324 (description
325 "The aiorpcX library is a generic asyncio implementation of RPC suitable
326 for an application that is a client, server or both.
327
328 The package includes a module with full coverage of JSON RPC versions 1.0 and
329 2.0, JSON RPC protocol auto-detection, and arbitrary message framing. It also
330 comes with a SOCKS proxy client.")
331 (license (list license:expat license:bsd-2))))
332
333 (define-public python-aiorpcx-0.18
334 (package
335 (inherit python-aiorpcx)
336 (version "0.18.7")
337 (source
338 (origin
339 (method url-fetch)
340 (uri (pypi-uri "aiorpcX" version))
341 (sha256
342 (base32
343 "1rswrspv27x33xa5bnhrkjqzhv0sknv5kd7pl1vidw9d2z4rx2l0"))))))
344
345 (define-public python-asgiref
346 (package
347 (name "python-asgiref")
348 (version "3.3.4")
349 (source (origin
350 (method url-fetch)
351 (uri (pypi-uri "asgiref" version))
352 (sha256
353 (base32
354 "0y0vdzldjkbs4pxf10pi6jpxq9b2sfp1rlwm153jcf5nvzxns8fi"))))
355 (build-system python-build-system)
356 (arguments
357 '(#:phases (modify-phases %standard-phases
358 (replace 'check
359 (lambda _
360 (setenv "PYTHONPATH"
361 (string-append "./build/lib:"
362 (getenv "PYTHONPATH")))
363 (invoke "pytest" "-vv"))))))
364 (native-inputs
365 `(("python-pytest" ,python-pytest)
366 ("python-pytest-asyncio" ,python-pytest-asyncio)))
367 (home-page "https://github.com/django/asgiref/")
368 (synopsis "ASGI specs, helper code, and adapters")
369 (description
370 "ASGI is a standard for Python asynchronous web apps and servers to
371 communicate with each other, and positioned as an asynchronous successor to
372 WSGI. This package includes libraries for implementing ASGI servers.")
373 (license license:bsd-3)))
374
375 (define-public python-css-html-js-minify
376 (package
377 (name "python-css-html-js-minify")
378 (version "2.5.5")
379 (source (origin
380 (method url-fetch)
381 (uri (pypi-uri "css-html-js-minify" version ".zip"))
382 (sha256
383 (base32
384 "0v3l2dqdk2y4r6ax259gs4ij1zzm9yxg6491s6254vs9w3vi37sa"))))
385 (build-system python-build-system)
386 ;; XXX: The git repository has no tags, and the PyPI releases do not
387 ;; contain tests.
388 (arguments '(#:tests? #f))
389 (native-inputs `(("unzip" ,unzip)))
390 (home-page "https://github.com/juancarlospaco/css-html-js-minify")
391 (synopsis "CSS/HTML/JS minifier")
392 (description
393 "This package provides a single-file minifier for CSS, HTML, and JavaScript.")
394 ;; XXX: The README just says "GNU GPL and GNU LGPL and MIT". From
395 ;; <https://github.com/juancarlospaco/css-html-js-minify/issues/9> it
396 ;; looks like the user can choose a license.
397 (license (list license:gpl3+ license:lgpl3+ license:expat))))
398
399 (define-public python-aws-sam-translator
400 (package
401 (name "python-aws-sam-translator")
402 (version "1.40.0")
403 (source (origin
404 (method url-fetch)
405 (uri (pypi-uri "aws-sam-translator" version))
406 (sha256
407 (base32
408 "1hq5ggbzcq4k3ks439hki493w4sasgaxns6j5x57xsj822acalmf"))))
409 (build-system python-build-system)
410 (arguments
411 `(;; XXX: Tests are not distributed with the PyPI archive, and would
412 ;; introduce a circular dependency on python-cfn-lint.
413 #:tests? #f
414 #:phases (modify-phases %standard-phases
415 (add-after 'unpack 'loosen-requirements
416 (lambda _
417 ;; The package needlessly specifies exact versions
418 ;; of dependencies, when it works fine with others.
419 (substitute* "requirements/base.txt"
420 (("(.*)(~=[0-9\\.]+)" all package version)
421 package)))))))
422 (propagated-inputs
423 `(("python-boto3" ,python-boto3)
424 ("python-jsonschema" ,python-jsonschema)
425 ("python-six" ,python-six)))
426 (home-page "https://github.com/aws/serverless-application-model")
427 (synopsis "Transform AWS SAM templates into AWS CloudFormation templates")
428 (description
429 "AWS SAM Translator is a library that transform @dfn{Serverless Application
430 Model} (SAM) templates into AWS CloudFormation templates.")
431 (license license:asl2.0)))
432
433 (define-public python-aws-xray-sdk
434 (package
435 (name "python-aws-xray-sdk")
436 (version "2.6.0")
437 (home-page "https://github.com/aws/aws-xray-sdk-python")
438 (source (origin
439 (method git-fetch)
440 (uri (git-reference (url home-page) (commit version)))
441 (file-name (git-file-name name version))
442 (sha256
443 (base32
444 "12fzr0ylpa1lx3xr1x2f1jx8iiyzcr6g57fb9jign0j0lxdlbzpv"))))
445 (build-system python-build-system)
446 (arguments
447 `(#:phases (modify-phases %standard-phases
448 (add-after 'unpack 'disable-tests
449 (lambda _
450 (for-each delete-file
451 '(;; These tests require packages not yet in Guix.
452 "tests/ext/aiobotocore/test_aiobotocore.py"
453 "tests/ext/aiohttp/test_middleware.py"
454 "tests/ext/pg8000/test_pg8000.py"
455 "tests/ext/psycopg2/test_psycopg2.py"
456 "tests/ext/pymysql/test_pymysql.py"
457 "tests/ext/pynamodb/test_pynamodb.py"
458 "tests/test_async_recorder.py"
459
460 ;; FIXME: Why is this failing?
461 "tests/test_patcher.py"
462
463 ;; TODO: How to configure Django for these tests.
464 "tests/ext/django/test_db.py"
465 "tests/ext/django/test_middleware.py"
466
467 ;; These tests want to access httpbin.org.
468 "tests/ext/requests/test_requests.py"
469 "tests/ext/httplib/test_httplib.py"
470 "tests/ext/aiohttp/test_client.py"))))
471 (replace 'check
472 (lambda _
473 (setenv "PYTHONPATH"
474 (string-append "./build/lib:.:"
475 (getenv "PYTHONPATH")))
476 (invoke "pytest" "-vv" "tests"))))))
477 (native-inputs
478 `(;; These are required for the test suite.
479 ("python-bottle" ,python-bottle)
480 ("python-flask" ,python-flask)
481 ("python-flask-sqlalchemy" ,python-flask-sqlalchemy)
482 ("python-pymysql" ,python-pymysql)
483 ("python-pytest" ,python-pytest)
484 ("python-pytest-aiohttp" ,python-pytest-aiohttp)
485 ("python-requests" ,python-requests)
486 ("python-sqlalchemy" ,python-sqlalchemy)
487 ("python-webtest" ,python-webtest)))
488 (propagated-inputs
489 `(("python-aiohttp" ,python-aiohttp)
490 ("python-botocore" ,python-botocore)
491 ("python-future" ,python-future)
492 ("python-jsonpickle" ,python-jsonpickle)
493 ("python-urllib3" ,python-urllib3)
494 ("python-wrapt" ,python-wrapt)))
495 (synopsis "Profile applications on AWS X-Ray")
496 (description
497 "The AWS X-Ray SDK for Python enables Python developers to record and
498 emit information from within their applications to the AWS X-Ray service.")
499 (license license:asl2.0)))
500
501 (define-public python-cfn-lint
502 (package
503 (name "python-cfn-lint")
504 (version "0.54.3")
505 (home-page "https://github.com/aws-cloudformation/cfn-lint")
506 (source (origin
507 (method git-fetch)
508 (uri (git-reference
509 (url home-page)
510 (commit (string-append "v" version))))
511 (file-name (git-file-name name version))
512 (sha256
513 (base32
514 "106qf19n2k6sdjkb4006aidibd24qqiw901c1613xgjpnyw4dyl6"))))
515 (build-system python-build-system)
516 (arguments
517 `(#:phases
518 (modify-phases %standard-phases
519 (replace 'check
520 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
521 (when tests?
522 (let ((out (assoc-ref outputs "out")))
523 ;; Remove test for the documentation update scripts
524 ;; to avoid a dependency on 'git'.
525 (delete-file
526 "test/unit/module/maintenance/test_update_documentation.py")
527 (delete-file
528 "test/unit/module/maintenance/test_update_resource_specs.py")
529 (add-installed-pythonpath inputs outputs)
530 (setenv "PATH" (string-append out "/bin:"
531 (getenv "PATH")))
532 (invoke "python" "-m" "unittest" "discover"
533 "-s" "test"))))))))
534 (native-inputs
535 `(("python-pydot" ,python-pydot)
536 ("python-mock" ,python-mock)))
537 (propagated-inputs
538 `(("python-aws-sam-translator" ,python-aws-sam-translator)
539 ("python-jsonpatch" ,python-jsonpatch)
540 ("python-jsonschema" ,python-jsonschema)
541 ("python-junit-xml" ,python-junit-xml)
542 ("python-networkx" ,python-networkx)
543 ("python-pyyaml" ,python-pyyaml)
544 ("python-six" ,python-six)))
545 (synopsis "Validate CloudFormation templates")
546 (description
547 "This package lets you validate CloudFormation YAML/JSON templates against
548 the CloudFormation spec and additional checks. Includes checking valid values
549 for resource properties and best practices.")
550 (license license:expat)))
551
552 (define-public python-falcon
553 (package
554 (name "python-falcon")
555 (version "2.0.0")
556 (source
557 (origin
558 (method url-fetch)
559 (uri (pypi-uri "falcon" version))
560 (sha256
561 (base32
562 "1z6mqfv574x6jiawf67ib52g4kk20c2x7xk7wrn1573b8v7r79gf"))
563 (modules '((guix build utils)))
564 (snippet
565 '(begin
566 (delete-file-recursively "falcon/vendor")
567 (substitute* "setup.py"
568 ((".*falcon\\.vendor\\.mimeparse.*") ""))
569 (substitute* '("falcon/media/handlers.py"
570 "falcon/request.py")
571 (("from falcon\\.vendor ") ""))
572 (substitute* "falcon.egg-info/SOURCES.txt"
573 (("falcon/vendor.*") ""))
574 #t))))
575 (build-system python-build-system)
576 (arguments
577 `(#:phases
578 (modify-phases %standard-phases
579 (replace 'check
580 (lambda* (#:key inputs outputs #:allow-other-keys)
581 ;; Skip orjson, which requires rust to build.
582 (substitute* "tests/test_media_handlers.py"
583 (("== 'CPython") "!= 'CPython"))
584 (add-installed-pythonpath inputs outputs)
585 (invoke "pytest" "--ignore" "falcon"))))))
586 (propagated-inputs
587 `(("python-mimeparse" ,python-mimeparse)))
588 (native-inputs
589 `(("python-cython" ,python-cython) ;for faster binaries
590 ("python-mujson" ,python-mujson)
591 ("python-msgpack" ,python-msgpack)
592 ("python-pytest" ,python-pytest)
593 ("python-pytest-runner" ,python-pytest-runner)
594 ("python-pyyaml" ,python-pyyaml)
595 ("python-rapidjson" ,python-rapidjson)
596 ("python-requests" ,python-requests)
597 ("python-testtools" ,python-testtools)
598 ("python-ujson" ,python-ujson)))
599 (home-page "https://falconframework.org")
600 (synopsis
601 "Web framework for building APIs and application backends")
602 (description
603 "Falcon is a web API framework for building microservices, application
604 backends and higher-level frameworks. Among its features are:
605 @itemize
606 @item Optimized and extensible code base
607 @item Routing via URI templates and REST-inspired resource
608 classes
609 @item Access to headers and bodies through request and response
610 classes
611 @item Request processing via middleware components and hooks
612 @item Idiomatic HTTP error responses
613 @item Straightforward exception handling
614 @item Unit testing support through WSGI helpers and mocks
615 @item Compatible with both CPython and PyPy
616 @item Cython support for better performance when used with CPython
617 @end itemize")
618 (license license:asl2.0)))
619
620 (define-public python-falcon-cors
621 (package
622 (name "python-falcon-cors")
623 (version "1.1.7")
624 (source
625 (origin
626 (method url-fetch)
627 (uri (pypi-uri "falcon-cors" version))
628 (sha256
629 (base32
630 "12pym7hwsbd8b0c1azn95nas8gm3f1qpr6lpyx0958xm65ffr20p"))))
631 (build-system python-build-system)
632 (native-inputs
633 `(("python-falcon" ,python-falcon)))
634 (home-page
635 "https://github.com/lwcolton/falcon-cors")
636 (synopsis "Falcon @dfn{cross-origin resource sharing} (CORS) library")
637 (description "This middleware provides @dfn{cross-origin resource
638 sharing} (CORS) support for Falcon. It allows applying a specially crafted
639 CORS object to the incoming requests, enabling the ability to serve resources
640 over a different origin than that of the web application.")
641 (license license:asl2.0)))
642
643 (define-public python-furl
644 (package
645 (name "python-furl")
646 (version "2.1.3")
647 (source
648 (origin
649 (method url-fetch)
650 (uri (pypi-uri "furl" version))
651 (sha256
652 (base32
653 "0knc76pm8pzigs3bpx9fccfsfxqrgblqphar46hq9i364vz8hqas"))))
654 (build-system python-build-system)
655 (propagated-inputs
656 `(("python-six" ,python-six)
657 ("python-orderedmultidict" ,python-orderedmultidict)))
658 (native-inputs
659 `(("python-flake8" ,python-flake8)))
660 (home-page "https://github.com/gruns/furl")
661 (synopsis "URL manipulation in Python")
662 (description "Furl provides an easy-to-use alternative to the
663 @code{urllib} and @code{urlparse} modules for manipulating URLs.")
664 (license license:unlicense)))
665
666 (define-public python-httplib2
667 (package
668 (name "python-httplib2")
669 (version "0.9.2")
670 (source
671 (origin
672 (method url-fetch)
673 (uri (pypi-uri "httplib2" version))
674 (sha256
675 (base32
676 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
677 (build-system python-build-system)
678 (home-page "https://github.com/jcgregorio/httplib2")
679 (synopsis "Comprehensive HTTP client library")
680 (description
681 "A comprehensive HTTP client library supporting many features left out of
682 other HTTP libraries.")
683 (license license:expat)))
684
685 (define-public python2-httplib2
686 (package-with-python2 python-httplib2))
687
688 (define-public httpie
689 (package
690 (name "httpie")
691 (version "2.3.0")
692 (source
693 (origin
694 (method url-fetch)
695 (uri (pypi-uri "httpie" version))
696 (sha256
697 (base32
698 "15ngl3yc186gkgqdx8iav9bpj8gxjpzz26y32z92jwyhj4cmfh6m"))))
699 (build-system python-build-system)
700 (arguments
701 ;; The tests attempt to access external web servers, so we cannot run them.
702 '(#:tests? #f))
703 (propagated-inputs
704 `(("python-colorama" ,python-colorama)
705 ("python-pygments" ,python-pygments)
706 ("python-requests" ,python-requests)
707 ("python-requests-toolbelt" ,python-requests-toolbelt-0.9.1)))
708 (home-page "https://httpie.io")
709 (synopsis "cURL-like tool for humans")
710 (description
711 "A command line HTTP client with an intuitive UI, JSON support,
712 syntax highlighting, wget-like downloads, plugins, and more. It consists of
713 a single http command designed for painless debugging and interaction with
714 HTTP servers, RESTful APIs, and web services.")
715 ;; This was fixed in 1.0.3.
716 (properties `((lint-hidden-cve . ("CVE-2019-10751"))))
717 (license license:bsd-3)))
718
719 (define-public python-html2text
720 (package
721 (name "python-html2text")
722 (version "2020.1.16")
723 (source
724 (origin
725 (method url-fetch)
726 (uri (pypi-uri "html2text" version))
727 (sha256
728 (base32
729 "1fvv4z6dblii2wk1x82981ag8yhxbim1v2ksgywxsndh2s7335p2"))))
730 (build-system python-build-system)
731 (arguments
732 '(#:phases
733 (modify-phases %standard-phases
734 (replace 'check
735 (lambda _
736 (invoke "pytest" "test/"))))))
737 (native-inputs
738 `(("python-pytest" ,python-pytest)))
739 (home-page "https://github.com/Alir3z4/html2text")
740 (synopsis "Convert HTML into plain text")
741 (description "html2text takes HTML and converts it into plain ASCII text
742 which is also valid markdown. html2text was originally written by Aaron
743 Swartz.")
744 (license license:gpl3+)))
745
746 (define-public python2-html2text
747 (let ((base (package-with-python2 python-html2text)))
748 (package
749 (inherit base)
750 ;; This is the last version with support for Python 2.
751 (version "2019.8.11")
752 (source (origin
753 (method url-fetch)
754 (uri (pypi-uri "html2text" version))
755 (sha256
756 (base32
757 "0ppgjplg06kmv9sj0x8p7acczcq2mcfgk1jdjwm4w5w40b0vj5pm")))))))
758
759 (define-public python-jose
760 (package
761 (name "python-jose")
762 (version "3.2.0")
763 (home-page "https://github.com/mpdavis/python-jose")
764 (source (origin
765 (method git-fetch)
766 (uri (git-reference (url home-page) (commit version)))
767 (file-name (git-file-name name version))
768 (sha256
769 (base32
770 "1xmnf8whzv2gnkkdv0fqcn9qwmcc7y647p4kw9fi3lvcp9kch8vi"))))
771 (build-system python-build-system)
772 (arguments
773 `(#:phases
774 (modify-phases %standard-phases
775 (replace 'check
776 (lambda* (#:key tests? #:allow-other-keys)
777 (if tests?
778 (invoke "pytest" "-vv")
779 (format #t "test suite not run~%"))
780 #t)))))
781 (native-inputs
782 `(;; All native inputs are for tests.
783 ("python-pyasn1" ,python-pyasn1)
784 ("python-pytest" ,python-pytest)
785 ("python-pytest-cov" ,python-pytest-cov)
786 ("python-pytest-runner" ,python-pytest-runner)))
787 (propagated-inputs
788 `(("python-cryptography" ,python-cryptography)
789 ("python-rsa" ,python-rsa)
790 ("python-six" ,python-six)))
791 (synopsis "JOSE implementation in Python")
792 (description
793 "The @dfn{JavaScript Object Signing and Encryption} (JOSE) technologies
794 - JSON Web Signature (JWS), JSON Web Encryption (JWE), JSON Web Key (JWK), and
795 JSON Web Algorithms (JWA) - collectively can be used to encrypt and/or sign
796 content using a variety of algorithms.")
797 (license license:expat)))
798
799 (define-public python-jsonpickle
800 (package
801 (name "python-jsonpickle")
802 (version "1.4.1")
803 (source (origin
804 (method url-fetch)
805 (uri (pypi-uri "jsonpickle" version))
806 (sha256
807 (base32
808 "1fn86z468hamw8njh2grw2xdhsm7g48dyxs3lw0n10nn1g6vgm78"))))
809 (build-system python-build-system)
810 (arguments
811 `(#:phases (modify-phases %standard-phases
812 (replace 'check
813 (lambda _
814 (setenv "PYTHONPATH"
815 (string-append "./build/lib:"
816 (getenv "PYTHONPATH")))
817 (invoke "pytest" "-vv"
818 ;; Prevent running the flake8 and black
819 ;; pytest plugins, which only tests style
820 ;; and frequently causes harmless failures.
821 "-o" "addopts=''"))))))
822 (native-inputs
823 `(("python-setuptools-scm" ,python-setuptools-scm)
824 ("python-toml" ,python-toml) ;XXX: for setuptools_scm[toml]
825 ;; For tests.
826 ("python-numpy" ,python-numpy)
827 ("python-pandas" ,python-pandas)
828 ("python-pytest" ,python-pytest)))
829 (home-page "https://jsonpickle.github.io/")
830 (synopsis "Serialize object graphs into JSON")
831 (description
832 "This package provides a Python library for serializing any arbitrary
833 object graph to and from JSON.")
834 (license license:bsd-3)))
835
836 (define-public python-mechanicalsoup
837 (package
838 (name "python-mechanicalsoup")
839 (version "1.0.0")
840 (source
841 (origin
842 (method url-fetch)
843 (uri (pypi-uri "MechanicalSoup" version))
844 (sha256
845 (base32 "01sddjxy3rznh63hnl5lbv1hhk6xyiviwmkiw4x7v4ap35fb3lrp"))))
846 (build-system python-build-system)
847 (propagated-inputs
848 `(("python-beautifulsoup4" ,python-beautifulsoup4)
849 ("python-lxml" ,python-lxml)
850 ("python-requests" ,python-requests)
851 ("python-six" ,python-six)))
852 (native-inputs
853 `(("python-pytest-cov" ,python-pytest-cov)
854 ("python-pytest-flake8" ,python-pytest-flake8)
855 ("python-pytest-httpbin" ,python-pytest-httpbin)
856 ("python-pytest-mock" ,python-pytest-mock)
857 ("python-pytest-runner" ,python-pytest-runner)
858 ("python-requests-mock" ,python-requests-mock)))
859 (home-page "https://mechanicalsoup.readthedocs.io/")
860 (synopsis "Python library for automating website interaction")
861 (description
862 "MechanicalSoup is a Python library for automating interaction with
863 websites. It automatically stores and sends cookies, follows redirects, and can
864 follow links and submit forms. It doesn’t do JavaScript.")
865 (license license:expat)))
866
867 (define-public python-hyperframe
868 (package
869 (name "python-hyperframe")
870 (version "6.0.1")
871 (source
872 (origin
873 (method url-fetch)
874 (uri (pypi-uri "hyperframe" version))
875 (sha256
876 (base32 "055951gyhnjqpa2al52rj34g8yrls9inyn56n7nfkj0x4d300ldf"))))
877 (build-system python-build-system)
878 (arguments
879 `(#:phases
880 (modify-phases %standard-phases
881 (replace 'check
882 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
883 (when tests?
884 (add-installed-pythonpath inputs outputs)
885 (invoke "pytest" "-vv" "test")))))))
886 (native-inputs
887 `(("python-pytest" ,python-pytest)))
888 (home-page "https://github.com/python-hyper/hyperframe")
889 (synopsis "HTTP/2 framing layer for Python")
890 (description
891 "This library contains the HTTP/2 framing code used in the hyper project.
892 It provides a pure-Python codebase that is capable of decoding a binary stream
893 into HTTP/2 frames.")
894 (license license:expat)))
895
896 (define-public python-hpack
897 (package
898 (name "python-hpack")
899 (version "4.0.0")
900 (source
901 (origin
902 ;; PyPI tarball is missing some files necessary for the tests.
903 (method git-fetch)
904 (uri (git-reference
905 (url "https://github.com/python-hyper/hpack")
906 (commit (string-append "v" version))))
907 (file-name (git-file-name name version))
908 (sha256
909 (base32 "11qdayvz5a8zlzdcdm37f2z1fgnl67pz6j8xj2dz5rfa5lds29yq"))))
910 (build-system python-build-system)
911 (arguments
912 `(#:phases
913 (modify-phases %standard-phases
914 (replace 'check
915 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
916 (when tests?
917 (add-installed-pythonpath inputs outputs)
918 (invoke "pytest" "-vv" "test")))))))
919 (native-inputs
920 `(("python-pytest" ,python-pytest)))
921 (home-page "https://hyper.rtfd.org")
922 (synopsis "Pure-Python HPACK header compression")
923 (description
924 "This module contains a pure-Python HTTP/2 header encoding (HPACK) logic
925 for use in Python programs that implement HTTP/2.")
926 (license license:expat)))
927
928 (define-public python-h11
929 (package
930 (name "python-h11")
931 (version "0.12.0")
932 (source
933 (origin
934 (method url-fetch)
935 (uri (pypi-uri "h11" version))
936 (sha256
937 (base32 "0hk0nll6qazsambp3kl8cxxsbl4gv5y9252qadyk0jky0sv2q8j7"))))
938 (build-system python-build-system)
939 (arguments
940 `(#:phases
941 (modify-phases %standard-phases
942 (replace 'check
943 (lambda* (#:key tests? #:allow-other-keys)
944 (when tests?
945 (invoke "pytest" "-vv")))))))
946 (native-inputs
947 `(("python-pytest" ,python-pytest)))
948 (home-page "https://github.com/python-hyper/h11")
949 (synopsis "Pure-Python, bring-your-own-I/O implementation of HTTP/1.1")
950 (description
951 "This is a little HTTP/1.1 library written from scratch in Python, heavily
952 inspired by hyper-h2. It's a bring-your-own-I/O library; h11 contains no IO
953 code whatsoever. This means you can hook h11 up to your favorite network API,
954 and that could be anything you want.")
955 (license license:expat)))
956
957 (define-public python-h2
958 (package
959 (name "python-h2")
960 (version "4.1.0")
961 (source
962 (origin
963 (method url-fetch)
964 (uri (pypi-uri "h2" version))
965 (sha256
966 (base32 "1fraip114fm1ha5w37pdc0sk8dn9pb0ck267zrwwpap7zc4clfm8"))))
967 (build-system python-build-system)
968 (arguments
969 `(#:phases
970 (modify-phases %standard-phases
971 (replace 'check
972 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
973 (when tests?
974 (add-installed-pythonpath inputs outputs)
975 (invoke "python" "-m" "pytest" "-vv" "test")))))))
976 (native-inputs
977 `(("python-hypothesis" ,python-hypothesis-6.23)
978 ("python-pytest" ,python-pytest)))
979 (propagated-inputs
980 `(("python-hpack" ,python-hpack)
981 ("python-hyperframe" ,python-hyperframe)))
982 (home-page "https://github.com/python-hyper/h2")
983 (synopsis "HTTP/2 State-Machine based protocol implementation")
984 (description
985 "This module contains a pure-Python implementation of a HTTP/2 protocol
986 stack. It does not provide a parsing layer, a network layer, or any rules
987 about concurrency. Instead, it's a purely in-memory solution, defined in
988 terms of data actions and HTTP/2 frames. This is one building block of a full
989 Python HTTP implementation.")
990 (license license:expat)))
991
992 (define-public python-sockjs-tornado
993 (package
994 (name "python-sockjs-tornado")
995 (version "1.0.6")
996 (source
997 (origin
998 (method url-fetch)
999 (uri (pypi-uri "sockjs-tornado" version))
1000 (sha256
1001 (base32
1002 "15dgv6hw6c7h3m310alw1h6p5443lrm9pyqhcv2smc13fz1v04pc"))))
1003 (build-system python-build-system)
1004 (arguments
1005 `(;; There are no tests, and running the test phase requires missing
1006 ;; dependencies
1007 #:tests? #f))
1008 (propagated-inputs
1009 `(("python-tornado" ,python-tornado)))
1010 (home-page "https://github.com/mrjoes/sockjs-tornado/")
1011 (synopsis
1012 "SockJS Python server implementation on top of the Tornado framework")
1013 (description
1014 "SockJS-tornado provides the server-side counterpart to a SockJS client
1015 library, through the Tornado framework.
1016
1017 SockJS provides a low-latency, full-duplex, cross-domain communication channel
1018 between a web browser and web server.")
1019 (license license:expat)))
1020
1021 (define-public python2-sockjs-tornado
1022 (package-with-python2 python-sockjs-tornado))
1023
1024 (define-public python-flask-babel
1025 (package
1026 (name "python-flask-babel")
1027 (version "1.0.0")
1028 (source
1029 (origin
1030 (method url-fetch)
1031 (uri (pypi-uri "Flask-Babel" version))
1032 (sha256
1033 (base32
1034 "0gmb165vkwv5v7dxsxa2i3zhafns0fh938m2zdcrv4d8z5l099yn"))))
1035 (build-system python-build-system)
1036 (arguments
1037 '(#:phases (modify-phases %standard-phases
1038 (replace 'check
1039 (lambda _
1040 (with-directory-excursion "tests"
1041 (invoke "python" "tests.py")))))))
1042 (propagated-inputs
1043 `(("python-flask" ,python-flask)
1044 ("python-babel" ,python-babel)
1045 ("python-jinja2" ,python-jinja2)
1046 ("python-pytz" ,python-pytz)))
1047 (home-page "https://github.com/python-babel/flask-babel")
1048 (synopsis "Add i18n/l10n support to Flask applications")
1049 (description "This package implements internationalization and localization
1050 support for Flask. This is based on the Python babel module as well as pytz -
1051 both of which are installed automatically if you install this library.")
1052 (license license:bsd-3)))
1053
1054 (define-public python-flask-cors
1055 (package
1056 (name "python-flask-cors")
1057 (version "3.0.9")
1058 (source (origin
1059 (method url-fetch)
1060 (uri (pypi-uri "Flask-Cors" version))
1061 (sha256
1062 (base32
1063 "1f36hkaxc92zn12f88fkzwifdvlvsnmlp1dv3p5inpcc500c3kvb"))))
1064 (build-system python-build-system)
1065 (native-inputs
1066 `(("python-flask" ,python-flask)
1067 ("python-nose" ,python-nose)
1068 ("python-packaging" ,python-packaging)))
1069 (propagated-inputs
1070 `(("python-six" ,python-six)))
1071 (home-page "https://flask-cors.readthedocs.io/en/latest/")
1072 (synopsis "Handle Cross-Origin Resource Sharing with Flask")
1073 (description
1074 "This package provides a Flask extension for handling @acronym{CORS,Cross
1075 Origin Resource Sharing}, making cross-origin AJAX possible.")
1076 (license license:expat)))
1077
1078 (define-public python-flask-markdown
1079 (package
1080 (name "python-flask-markdown")
1081 (version "0.3")
1082 (source
1083 (origin
1084 (method url-fetch)
1085 (uri (pypi-uri "Flask-Markdown" version))
1086 (sha256
1087 (base32
1088 "0l32ikv4f7va926jlq4f7gx0xid247bhlxl6bd9av5dk8ljz1hyq"))))
1089 (build-system python-build-system)
1090 (arguments
1091 '(#:tests? #f)) ; Tests seem to be incompatible with latest python
1092 (propagated-inputs
1093 `(("python-markdown" ,python-markdown)
1094 ("python-flask" ,python-flask)))
1095 (native-inputs
1096 `(("python-nose" ,python-nose)))
1097 (home-page "https://github.com/dcolish/flask-markdown")
1098 (synopsis "Small extension to help with using Markdown in Flask")
1099 (description
1100 "Flask-Markdown supports several extensions for Markdown and integrates
1101 into Jinja2 by default.")
1102 (license license:bsd-3)))
1103
1104 (define-public python-flask-misaka
1105 (package
1106 (name "python-flask-misaka")
1107 (version "1.0.0")
1108 (source
1109 (origin
1110 (method url-fetch)
1111 (uri (pypi-uri "Flask-Misaka" version))
1112 (sha256
1113 (base32
1114 "12gm6hq3lvlj0ddw8p6lk5pky8jk3pw758ihffjl49shnnzc68zl"))))
1115 (build-system python-build-system)
1116 (native-inputs
1117 `(("python-coverage" ,python-coverage)
1118 ("python-mock" ,python-mock)))
1119 (propagated-inputs
1120 `(("python-flask" ,python-flask)
1121 ("python-misaka" ,python-misaka)))
1122 (home-page "https://github.com/singingwolfboy/flask-misaka/")
1123 (synopsis "Flask interface to Misaka, a Markdown parsing library")
1124 (description
1125 "This package provides an interface between the Flask web framework and
1126 the Misaka Markdown parser.")
1127 (license license:expat)))
1128
1129 (define-public python-flask-session
1130 (package
1131 (name "python-flask-session")
1132 (version "0.3.2")
1133 (source
1134 (origin
1135 (method url-fetch)
1136 (uri (pypi-uri "Flask-Session" version))
1137 (sha256
1138 (base32
1139 "08s4msg8jzb8vgb9bd491zvrzhrdldxdw6vimb0kx5kgy2xy4s07"))))
1140 (build-system python-build-system)
1141 (arguments
1142 '(#:tests? #f)) ; Tests require the various storage backends to be present
1143 (propagated-inputs
1144 `(("python-flask" ,python-flask)))
1145 (home-page "https://github.com/fengsp/flask-session")
1146 (synopsis "Adds server-side session support to your Flask application")
1147 (description
1148 "Flask-Session is an extension for Flask that adds support for
1149 Server-side sessions, with a variety of different backends for session
1150 storage.")
1151 (license license:bsd-3)))
1152
1153 (define-public python-html5lib
1154 (package
1155 (name "python-html5lib")
1156 (version "1.1")
1157 (source
1158 (origin
1159 (method url-fetch)
1160 (uri (pypi-uri "html5lib" version))
1161 (sha256
1162 (base32
1163 "0vqlhk0hgbsfkh7ybmby93xhlx8dq6pr5blf356ka3z2c41b9rdj"))))
1164 (build-system python-build-system)
1165 (propagated-inputs
1166 `(("python-six" ,python-six)
1167 ("python-webencodings" ,python-webencodings)
1168 ;; Required by Calibre 5.
1169 ("python-chardet" ,python-chardet)))
1170 (arguments
1171 `(#:test-target "check"))
1172 (home-page
1173 "https://github.com/html5lib/html5lib-python")
1174 (synopsis
1175 "Python HTML parser based on the WHATWG HTML specification")
1176 (description
1177 "Html5lib is an HTML parser based on the WHATWG HTML specification
1178 and written in Python.")
1179 (license license:expat)))
1180
1181 (define-public python2-html5lib
1182 (package-with-python2 python-html5lib))
1183
1184 ;; Needed for python-bleach, a dependency of python-notebook
1185 (define-public python-html5lib-0.9
1186 (package
1187 (inherit python-html5lib)
1188 (version "0.999")
1189 (source
1190 (origin
1191 (method url-fetch)
1192 (uri (pypi-uri "html5lib" version))
1193 (sha256
1194 (base32
1195 "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
1196
1197 (define-public python2-html5lib-0.9
1198 (package-with-python2 python-html5lib-0.9))
1199
1200 (define-public python-html5-parser
1201 (package
1202 (name "python-html5-parser")
1203 (version "0.4.9")
1204 (source (origin
1205 (method url-fetch)
1206 (uri (pypi-uri "html5-parser" version))
1207 (sha256
1208 (base32
1209 "13yl3vnf3sxl05m0nhpngnrz3g1jvyahd33lys3m3hfb91l8zzi5"))))
1210 (build-system python-build-system)
1211 (native-inputs
1212 `(("pkg-config" ,pkg-config)))
1213 (inputs
1214 `(("libxml2" ,libxml2)))
1215 (propagated-inputs
1216 `(("python-lxml" ,python-lxml)
1217 ("python-beautifulsoup4" ,python-beautifulsoup4)))
1218 (home-page "https://html5-parser.readthedocs.io")
1219 (synopsis "Fast C-based HTML5 parsing for Python")
1220 (description "This package provides a fast implementation of the HTML5
1221 parsing spec for Python. Parsing is done in C using a variant of the gumbo
1222 parser. The gumbo parse tree is then transformed into an lxml tree, also in
1223 C, yielding parse times that can be a thirtieth of the html5lib parse times.")
1224 ;; src/as-python-tree.[c|h] are licensed GPL3. The other files
1225 ;; indicate ASL2.0, including the LICENSE file for the whole project.
1226 (license (list license:asl2.0 license:gpl3))))
1227
1228 (define-public python2-html5-parser
1229 (package-with-python2 python-html5-parser))
1230
1231 (define-public python-minio
1232 (package
1233 (name "python-minio")
1234 (version "6.0.0")
1235 (source (origin
1236 (method url-fetch)
1237 (uri (pypi-uri "minio" version))
1238 (sha256
1239 (base32
1240 "1cxpa0m7mdvpdbc1g6wlihq6ja4g4paxkl6f3q84bbnx07zpbllp"))))
1241 (build-system python-build-system)
1242 (arguments
1243 '(#:phases (modify-phases %standard-phases
1244 (add-before 'check 'disable-failing-tests
1245 (lambda _
1246 ;; This test requires network access.
1247 (delete-file "tests/unit/credentials_test.py")
1248 #t)))))
1249 (native-inputs
1250 `(("python-faker" ,python-faker)
1251 ("python-mock" ,python-mock)
1252 ("python-nose" ,python-nose)))
1253 (propagated-inputs
1254 `(("python-certifi" ,python-certifi)
1255 ("python-configparser" ,python-configparser)
1256 ("python-dateutil" ,python-dateutil)
1257 ("python-pytz" ,python-pytz)
1258 ("python-urllib3" ,python-urllib3)))
1259 (home-page "https://github.com/minio/minio-py")
1260 (synopsis "Programmatically access Amazon S3 from Python")
1261 (description
1262 "This package provides a Python library for interacting with any
1263 Amazon S3 compatible object storage server.")
1264 (license license:asl2.0)))
1265
1266 (define-public python-pycurl
1267 (package
1268 (name "python-pycurl")
1269 (version "7.43.0.5")
1270 (source
1271 (origin
1272 (method url-fetch)
1273 (uri (pypi-uri "pycurl" version))
1274 (sha256
1275 (base32 "1cwlb76vddqp2mxqvjbhf367caddzy82rhangddjjhjqaj8x4zgc"))))
1276 (build-system python-build-system)
1277 (arguments
1278 ;; The tests attempt to access external web servers, so we cannot run
1279 ;; them. Furthermore, they are skipped altogether when using Python 2.
1280 '(#:tests? #f
1281 #:phases (modify-phases %standard-phases
1282 (add-before 'build 'configure-tls-backend
1283 (lambda _
1284 ;; XXX: PycURL fails to automatically determine which TLS
1285 ;; backend to use when cURL is built with --disable-static.
1286 ;; See setup.py and <https://github.com/pycurl/pycurl/pull/147>.
1287 (setenv "PYCURL_SSL_LIBRARY" "gnutls")
1288 #t)))))
1289 (native-inputs
1290 `(("python-nose" ,python-nose)
1291 ("python-bottle" ,python-bottle)))
1292 (inputs
1293 `(("curl" ,curl)
1294 ("gnutls" ,gnutls)))
1295 (home-page "http://pycurl.io/")
1296 (synopsis "Lightweight Python wrapper around libcurl")
1297 (description "Pycurl is a lightweight wrapper around libcurl. It provides
1298 high-speed transfers via libcurl and frequently outperforms alternatives.")
1299
1300 ;; Per 'README.rst', this is dual-licensed: users can redistribute pycurl
1301 ;; under the terms of LGPLv2.1+ or Expat.
1302 (license (list license:lgpl2.1+ license:expat))))
1303
1304 (define-public python2-pycurl
1305 (package-with-python2 python-pycurl))
1306
1307 (define-public python-webencodings
1308 (package
1309 (name "python-webencodings")
1310 (version "0.5.1")
1311 (source (origin
1312 (method url-fetch)
1313 (uri (pypi-uri "webencodings" version))
1314 (sha256
1315 (base32
1316 "08qrgrc4hrximb2gqnl69g01s93rhf2842jfxdjljc1dbwj1qsmk"))))
1317 (build-system python-build-system)
1318 (arguments
1319 '(#:phases
1320 (modify-phases %standard-phases
1321 (replace 'check
1322 (lambda _
1323 (invoke "py.test" "-v" "webencodings/tests.py")
1324 #t)))))
1325 (native-inputs
1326 `(("python-pytest" ,python-pytest)))
1327 (home-page "https://github.com/SimonSapin/python-webencodings")
1328 (synopsis "Character encoding aliases for legacy web content")
1329 (description
1330 "In order to be compatible with legacy web content when interpreting
1331 something like @code{Content-Type: text/html; charset=latin1}, tools need
1332 to use a particular set of aliases for encoding labels as well as some
1333 overriding rules. For example, @code{US-ASCII} and @code{iso-8859-1} on
1334 the web are actually aliases for @code{windows-1252}, and a @code{UTF-8}
1335 or @code{UTF-16} BOM takes precedence over any other encoding declaration.
1336 The WHATWG @url{https://encoding.spec.whatwg.org/,Encoding} standard
1337 defines all such details so that implementations do not have to
1338 reverse-engineer each other.
1339
1340 This module implements the Encoding standard and has encoding labels and
1341 BOM detection, but the actual implementation for encoders and decoders
1342 is Python’s.")
1343 (license license:bsd-3)))
1344
1345 (define-public python2-webencodings
1346 (package-with-python2 python-webencodings))
1347
1348 (define-public python-openid
1349 (package
1350 (name "python-openid")
1351 (version "3.2.0")
1352 (source
1353 (origin
1354 (method url-fetch)
1355 (uri (pypi-uri "python3-openid" version))
1356 (sha256
1357 (base32
1358 "1bxf9a3ny1js422j962zfzl4a9dhj192pvai05whn7j0iy9gdyrk"))))
1359 (build-system python-build-system)
1360 (arguments
1361 `(#:phases
1362 (modify-phases %standard-phases
1363 (replace 'check
1364 (lambda _
1365 (invoke "coverage" "run" "-m"
1366 "unittest" "openid.test.test_suite"))))))
1367 (properties `((python2-variant . ,(delay python2-openid))))
1368 (propagated-inputs
1369 `(("python-defusedxml" ,python-defusedxml)))
1370 (native-inputs
1371 `(("python-coverage" ,python-coverage)
1372 ("python-psycopg2" ,python-psycopg2)
1373 ("python-django" ,python-django)))
1374 (home-page "https://github.com/necaris/python3-openid")
1375 (synopsis "OpenID support for servers and consumers")
1376 (description "This library provides OpenID authentication for Python, both
1377 for clients and servers.")
1378 (license license:asl2.0)))
1379
1380 (define-public python2-openid
1381 (package
1382 (name "python2-openid")
1383 (version "2.2.5")
1384 (source
1385 (origin
1386 (method url-fetch)
1387 (uri (pypi-uri "python-openid" version))
1388 (sha256
1389 (base32
1390 "1vvhxlghjan01snfdc4k7ykd80vkyjgizwgg9bncnin8rqz1ricj"))))
1391 (build-system python-build-system)
1392 (arguments
1393 ;; Python 3 support is in `python3-openid`, a separate package.
1394 `(#:python ,python-2
1395 ;; Tests aren't initialized correctly.
1396 #:tests? #f))
1397 (home-page "https://github.com/openid/python-openid")
1398 (synopsis "OpenID support for servers and consumers")
1399 (description "This library provides OpenID authentication for Python, both
1400 for clients and servers.")
1401 (license license:asl2.0)))
1402
1403 (define-public python-cssutils
1404 (package
1405 (name "python-cssutils")
1406 (version "1.0.2")
1407 (source
1408 (origin
1409 (method url-fetch)
1410 (uri (pypi-uri "cssutils" version))
1411 (sha256
1412 (base32
1413 "1bxchrbqzapwijap0yhlxdil1w9bmwvgx77aizlkhc2mcxjg1z52"))))
1414 (build-system python-build-system)
1415 (native-inputs
1416 `(("unzip" ,unzip))) ; for unpacking the source
1417 (arguments
1418 `(#:tests? #f)) ; tests require python-pbr < 1.7.0
1419 (home-page "http://cthedot.de/cssutils/")
1420 (synopsis
1421 "CSS Cascading Style Sheets library for Python")
1422 (description
1423 "Cssutils is a Python package for parsing and building CSS
1424 Cascading Style Sheets. Currently it provides a DOM only and no rendering
1425 options.")
1426 (license license:lgpl3+)))
1427
1428 (define-public python2-cssutils
1429 (package-with-python2 python-cssutils))
1430
1431 (define-public python-css-parser
1432 (package
1433 (inherit python-cssutils)
1434 (name "python-css-parser")
1435 (version "1.0.6")
1436 (source
1437 (origin
1438 (method url-fetch)
1439 (uri (pypi-uri "css-parser" version ".tar.gz"))
1440 (sha256
1441 (base32 "0bmg4kiiir6pj9x3sd12x4dz2c1xpp2bn5nn60fxnbk2lnl4im2f"))))
1442 (home-page "https://github.com/ebook-utils/css-parser")
1443 (synopsis "Fork of cssutils modified for parsing ebooks")
1444 (description
1445 "Css-parser is a Python package for parsing and building CSS
1446 Cascading Style Sheets. Currently it provides a DOM only and no rendering
1447 options.
1448
1449 It's a fork of cssutils 1.0.2, updated and modified for parsing ebooks, due to
1450 cssutils not receiving updates as of 1.0.2.")
1451 (license license:lgpl3+)))
1452
1453 (define-public python2-css-parser
1454 (package-with-python2 python-css-parser))
1455
1456 (define-public python-cssselect
1457 (package
1458 (name "python-cssselect")
1459 (version "1.1.0")
1460 (source (origin
1461 ;; The PyPI release does not contain tests.
1462 (method git-fetch)
1463 (uri (git-reference
1464 (url "https://github.com/scrapy/cssselect")
1465 (commit (string-append "v" version))))
1466 (file-name (git-file-name name version))
1467 (sha256
1468 (base32
1469 "0xslrnhbrmgakp4xg6k26qffay3kqffp3a2z2sk27c65rwxa79kc"))))
1470 (build-system python-build-system)
1471 (arguments
1472 `(#:phases (modify-phases %standard-phases
1473 (replace 'check
1474 (lambda _
1475 (invoke "pytest" "-vv"))))))
1476 (native-inputs
1477 `(("python-lxml" ,python-lxml)
1478 ("python-pytest" ,python-pytest)))
1479 (home-page "https://github.com/scrapy/cssselect")
1480 (synopsis "CSS3 selector parser and translator to XPath 1.0")
1481 (description
1482 "Cssselect ia a Python module that parses CSS3 Selectors and translates
1483 them to XPath 1.0 expressions. Such expressions can be used in lxml or
1484 another XPath engine to find the matching elements in an XML or HTML document.")
1485 (license license:bsd-3)))
1486
1487 (define-public python2-cssselect
1488 (package-with-python2 python-cssselect))
1489
1490 (define-public python-databricks-cli
1491 (package
1492 (name "python-databricks-cli")
1493 (version "0.14.1")
1494 (home-page "https://github.com/databricks/databricks-cli")
1495 (source (origin
1496 (method git-fetch)
1497 (uri (git-reference (url home-page) (commit version)))
1498 (file-name (git-file-name name version))
1499 (sha256
1500 (base32
1501 "03w19rzh72jll9phai23wp0c2mlv39qsrv50mhckziy39z60yxh8"))))
1502 (build-system python-build-system)
1503 (arguments
1504 `(#:phases (modify-phases %standard-phases
1505 (replace 'check
1506 (lambda _
1507 (setenv "PYTHONPATH"
1508 (string-append "./build/lib:"
1509 (getenv "PYTHONPATH")))
1510 (invoke "pytest" "tests" "-vv"
1511 ;; XXX: This fails with newer Pytest
1512 ;; (upstream uses Pytest 3..).
1513 "-k" "not test_get_request_with_list"))))))
1514 (native-inputs
1515 `(;; For tests.
1516 ("python-decorator" ,python-decorator)
1517 ("python-mock" ,python-mock)
1518 ("python-pytest" ,python-pytest)
1519 ("python-requests-mock" ,python-requests-mock)))
1520 (propagated-inputs
1521 `(("python-click" ,python-click)
1522 ("python-configparser" ,python-configparser)
1523 ("python-requests" ,python-requests)
1524 ("python-six" ,python-six)
1525 ("python-tabulate" ,python-tabulate)))
1526 (synopsis "Command line interface for Databricks")
1527 (description
1528 "The Databricks Command Line Interface is a tool which provides an easy
1529 to use interface to the Databricks platform. The CLI is built on top of the
1530 Databricks REST APIs.")
1531 (license license:asl2.0)))
1532
1533 (define-public python-openid-cla
1534 (package
1535 (name "python-openid-cla")
1536 (version "1.2")
1537 (source
1538 (origin
1539 (method url-fetch)
1540 (uri (pypi-uri "python-openid-cla" version))
1541 (sha256
1542 (base32
1543 "102hy2qisvjxp5s0v9lvwqi4f2dk0dhns40vjgn008yxc7k0h3cr"))))
1544 (build-system python-build-system)
1545 (arguments '(#:tests? #f)) ; No tests.
1546 (home-page "https://github.com/puiterwijk/python-openid-cla/")
1547 (synopsis "Implementation of the OpenID CLA extension for python-openid")
1548 (description "@code{openid-cla} is an implementation of the OpenID
1549 contributor license agreement extension for python-openid.")
1550 (license license:bsd-3)))
1551
1552 (define-public python2-openid-cla
1553 (package-with-python2 python-openid-cla))
1554
1555 (define-public python-openid-teams
1556 (package
1557 (name "python-openid-teams")
1558 (version "1.1")
1559 (source
1560 (origin
1561 (method url-fetch)
1562 (uri (pypi-uri "python-openid-teams" version))
1563 (sha256
1564 (base32
1565 "05zrh78alav24rxkbqlpbad6d3x2nljk6z6j7kflxf3vdqa7w969"))))
1566 (build-system python-build-system)
1567 (arguments '(#:tests? #f)) ; No tests.
1568 (home-page "https://github.com/puiterwijk/python-openid-teams/")
1569 (synopsis "Implementation of the OpenID teams extension for python-openid")
1570 (description
1571 "@code{openid-teams} is an implementation of the OpenID
1572 teams extension for python-openid.")
1573 (license license:bsd-3)))
1574
1575 (define-public python2-openid-teams
1576 (package-with-python2 python-openid-teams))
1577
1578 (define-public python-priority
1579 (package
1580 (name "python-priority")
1581 (version "1.3.0")
1582 (source
1583 (origin
1584 (method url-fetch)
1585 (uri (pypi-uri "priority" version))
1586 (sha256
1587 (base32 "1gpzn9k9zgks0iw5wdmad9b4dry8haiz2sbp6gycpjkzdld9dhbb"))))
1588 (build-system python-build-system)
1589 (arguments
1590 `(#:phases
1591 (modify-phases %standard-phases
1592 (replace 'check
1593 (lambda* (#:key inputs outputs #:allow-other-keys)
1594 (add-installed-pythonpath inputs outputs)
1595 (invoke "pytest" "-vv" "test" "-k"
1596 ;; This test exceeded the Hypothesis deadline.
1597 "not test_period_of_repetition"))))))
1598 (native-inputs
1599 `(("python-hypothesis" ,python-hypothesis)
1600 ("python-pytest" ,python-pytest)
1601 ("python-pytest-cov" ,python-pytest-cov)
1602 ("python-pytest-xdist" ,python-pytest-xdist)))
1603 (home-page "https://python-hyper.org/projects/priority/en/latest/")
1604 (synopsis "Pure-Python implementation of the HTTP/2 priority tree")
1605 (description
1606 "Priority is a pure-Python implementation of the priority logic for HTTP/2,
1607 set out in RFC 7540 Section 5.3 (Stream Priority).")
1608 (license license:expat)))
1609
1610 (define-public python-wsproto
1611 (package
1612 (name "python-wsproto")
1613 (version "0.15.0")
1614 (source
1615 (origin
1616 (method url-fetch)
1617 (uri (pypi-uri "wsproto" version))
1618 (sha256
1619 (base32 "17gsxlli4w8am1wwwl3k90hpdfa213ax40ycbbvb7hjx1v1rhiv1"))))
1620 (build-system python-build-system)
1621 (arguments
1622 `(#:phases
1623 (modify-phases %standard-phases
1624 (replace 'check
1625 (lambda* (#:key inputs outputs #:allow-other-keys)
1626 (add-installed-pythonpath inputs outputs)
1627 (invoke "pytest" "-vv" "test"))))))
1628 (native-inputs
1629 `(("python-pytest" ,python-pytest)))
1630 (propagated-inputs
1631 `(("python-h11" ,python-h11)))
1632 (home-page "https://github.com/python-hyper/wsproto/")
1633 (synopsis "WebSockets state-machine based protocol implementation")
1634 (description
1635 "@code{wsproto} is a pure-Python implementation of a WebSocket protocol
1636 stack. It's written from the ground up to be embeddable in whatever program you
1637 choose to use, ensuring that you can communicate via WebSockets, as defined in
1638 RFC6455, regardless of your programming paradigm.")
1639 (license license:expat)))
1640
1641 (define-public hypercorn
1642 (package
1643 (name "hypercorn")
1644 (version "0.11.2")
1645 (source
1646 (origin
1647 (method url-fetch)
1648 (uri (pypi-uri "Hypercorn" version))
1649 (sha256
1650 (base32 "16kai5d12f05jr89mj611zslxqri4cd7ixcgd6yhl211qlcyg8av"))))
1651 (build-system python-build-system)
1652 (arguments
1653 `(#:phases
1654 (modify-phases %standard-phases
1655 (replace 'check
1656 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
1657 (when tests?
1658 (add-installed-pythonpath inputs outputs)
1659 (invoke "python" "-m" "pytest")))))))
1660 ;; Propagate because Hypercorn also exposes functionality over a module.
1661 (propagated-inputs
1662 `(("python-h11" ,python-h11)
1663 ("python-h2" ,python-h2)
1664 ("python-priority" ,python-priority)
1665 ("python-toml" ,python-toml)
1666 ("python-typing-extensions" ,python-typing-extensions)
1667 ("python-wsproto" ,python-wsproto)))
1668 (native-inputs
1669 `(("python-hypothesis" ,python-hypothesis)
1670 ("python-mock" ,python-mock)
1671 ("python-pytest" ,python-pytest)
1672 ("python-pytest-asyncio" ,python-pytest-asyncio)
1673 ("python-pytest-cov" ,python-pytest-cov)
1674 ("python-pytest-trio" ,python-pytest-trio)
1675 ("python-trio" ,python-trio)))
1676 (home-page "https://gitlab.com/pgjones/hypercorn/")
1677 (synopsis "ASGI Server based on Hyper libraries")
1678 (description
1679 "Hypercorn is an ASGI web server based on the sans-io hyper, h11, h2, and
1680 wsproto libraries and inspired by Gunicorn. It supports HTTP/1, HTTP/2,
1681 WebSockets (over HTTP/1 and HTTP/2), ASGI/2, and ASGI/3 specifications. It can
1682 utilise asyncio, uvloop, or trio worker types.")
1683 (license license:expat)))
1684
1685 (define-public python-hypercorn
1686 (deprecated-package "python-hypercorn" hypercorn))
1687
1688 (define-public python-querystring-parser
1689 (package
1690 (name "python-querystring-parser")
1691 (version "1.2.4")
1692 (source (origin
1693 (method url-fetch)
1694 (uri (pypi-uri "querystring_parser" version))
1695 (sha256
1696 (base32
1697 "0qlar8a0wa003hm2z6wcpb625r6vjj0a70rsni9h8lz0zwfcwkv4"))))
1698 (build-system python-build-system)
1699 (arguments
1700 `(#:phases (modify-phases %standard-phases
1701 (replace 'check
1702 (lambda _
1703 ;; XXX FIXME: This test is broken with Python 3.7:
1704 ;; https://github.com/bernii/querystring-parser/issues/35
1705 (substitute* "querystring_parser/tests.py"
1706 (("self\\.assertEqual\\(self\\.knownValuesNormalized, result\\)")
1707 "True"))
1708 (invoke "python" "querystring_parser/tests.py"))))))
1709 (propagated-inputs
1710 `(("python-six" ,python-six)))
1711 (home-page "https://github.com/bernii/querystring-parser")
1712 (synopsis "QueryString parser that correctly handles nested dictionaries")
1713 (description
1714 "This package provides a query string parser for Python and Django
1715 projects that correctly creates nested dictionaries from sent form/querystring
1716 data.")
1717 (license license:expat)))
1718
1719 (define-public python-tornado
1720 (package
1721 (name "python-tornado")
1722 (version "5.1.1")
1723 (source
1724 (origin
1725 (method url-fetch)
1726 (uri (pypi-uri "tornado" version))
1727 (sha256
1728 (base32
1729 "02clqk2116jbnq8lnaqmdw3p52nqrd9ib59r4xz2ll43fpcmhlaf"))))
1730 (build-system python-build-system)
1731 (arguments
1732 '(;; FIXME: Two tests error out with:
1733 ;; AssertionError: b'Error in atexit._run_exitfuncs:\nFileNotF[44 chars]ry\n' != b''
1734 ;; #:phases
1735 ;; (modify-phases %standard-phases
1736 ;; (replace 'check
1737 ;; (lambda _
1738 ;; ;; 'setup.py test' hits an AssertionError on BSD-specific
1739 ;; ;; "tornado/platform/kqueue.py". This is the supported method:
1740 ;; (invoke "python" "-m" "tornado.test.runtests")
1741 ;; #t)))
1742 #:tests? #f))
1743 (native-inputs
1744 `(("python-certifi" ,python-certifi)))
1745 (home-page "https://www.tornadoweb.org/")
1746 (synopsis "Python web framework and asynchronous networking library")
1747 (description
1748 "Tornado is a Python web framework and asynchronous networking library,
1749 originally developed at FriendFeed. By using non-blocking network I/O,
1750 Tornado can scale to tens of thousands of open connections, making it ideal
1751 for long polling, WebSockets, and other applications that require a long-lived
1752 connection to each user.")
1753 (license license:asl2.0)
1754 (properties `((python2-variant . ,(delay python2-tornado))))))
1755
1756 (define-public python-tornado-6
1757 (package
1758 (name "python-tornado")
1759 (version "6.1")
1760 (source
1761 (origin
1762 (method url-fetch)
1763 (uri (pypi-uri "tornado" version))
1764 (sha256
1765 (base32
1766 "14cpzdv6p6qvk6vn02krdh5rcfdi174ifdbr5s6lcnymgcfyiiik"))))
1767 (build-system python-build-system)
1768 (arguments
1769 '(#:phases
1770 (modify-phases %standard-phases
1771 (replace 'check
1772 (lambda _
1773 (invoke "python" "-m" "tornado.test.runtests")
1774 #t)))))
1775 (native-inputs
1776 `(("python-certifi" ,python-certifi)))
1777 (home-page "https://www.tornadoweb.org/")
1778 (synopsis "Python web framework and asynchronous networking library")
1779 (description
1780 "Tornado is a Python web framework and asynchronous networking library,
1781 originally developed at FriendFeed. By using non-blocking network I/O,
1782 Tornado can scale to tens of thousands of open connections, making it ideal
1783 for long polling, WebSockets, and other applications that require a long-lived
1784 connection to each user.")
1785 (license license:asl2.0)))
1786
1787 (define-public python2-tornado
1788 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
1789 (package/inherit tornado
1790 (propagated-inputs
1791 `(("python2-backport-ssl-match-hostname"
1792 ,python2-backport-ssl-match-hostname)
1793 ("python2-backports-abc" ,python2-backports-abc)
1794 ("python2-singledispatch" ,python2-singledispatch)
1795 ,@(package-propagated-inputs tornado))))))
1796
1797 (define-public python-tornado-http-auth
1798 (package
1799 (name "python-tornado-http-auth")
1800 (version "1.1.1")
1801 (source
1802 (origin
1803 (method url-fetch)
1804 (uri (pypi-uri "tornado-http-auth" version))
1805 (sha256
1806 (base32 "0hyc5f0a09i5yb99pk4bxpg6w9ichbrb5cv7hc9hff7rxd8w0v0x"))))
1807 (build-system python-build-system)
1808 (propagated-inputs
1809 `(("python-tornado" ,python-tornado)))
1810 (home-page "https://github.com/gvalkov/tornado-http-auth")
1811 (synopsis "Digest and basic authentication module for Tornado")
1812 (description
1813 "Provides support for adding authentication to services using the Tornado
1814 web framework, either via the basic or digest authentication schemes.")
1815 (license license:asl2.0)))
1816
1817 (define-public python-terminado
1818 (package
1819 (name "python-terminado")
1820 (version "0.10.0")
1821 (source
1822 (origin
1823 (method url-fetch)
1824 (uri (pypi-uri "terminado" version))
1825 (sha256
1826 (base32
1827 "1smvra3sc9sg64w49kfn5yhagshq3x55839748ck5dvxvk4hgza6"))))
1828 (build-system python-build-system)
1829 (propagated-inputs
1830 `(("python-tornado" ,python-tornado-6)
1831 ("python-ptyprocess" ,python-ptyprocess)))
1832 (native-inputs
1833 `(("python-pytest" ,python-pytest)))
1834 (arguments
1835 `(#:phases
1836 (modify-phases %standard-phases
1837 (replace 'check
1838 (lambda _ (invoke "pytest" "-vv"))))))
1839 (home-page "https://github.com/jupyter/terminado")
1840 (synopsis "Terminals served to term.js using Tornado websockets")
1841 (description "This package provides a Tornado websocket backend for the
1842 term.js Javascript terminal emulator library.")
1843 (license license:bsd-2)))
1844
1845 (define-public python-wsgi-intercept
1846 (package
1847 (name "python-wsgi-intercept")
1848 (version "1.2.2")
1849 (source (origin
1850 (method url-fetch)
1851 (uri (pypi-uri "wsgi_intercept" version))
1852 (sha256
1853 (base32
1854 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
1855 (build-system python-build-system)
1856 (propagated-inputs
1857 `(("python-six" ,python-six)))
1858 (native-inputs
1859 `(("python-pytest" ,python-pytest)
1860 ("python-httplib2" ,python-httplib2)
1861 ("python-requests" ,python-requests)
1862 ("python-urllib3" ,python-urllib3)))
1863 (synopsis "Puts a WSGI application in place of a real URI for testing")
1864 (description "Wsgi_intercept installs a WSGI application in place of a real
1865 URI for testing. Testing a WSGI application normally involves starting a
1866 server at a local host and port, then pointing your test code to that address.
1867 Instead, this library lets you intercept calls to any specific host/port
1868 combination and redirect them into a WSGI application importable by your test
1869 program. Thus, you can avoid spawning multiple processes or threads to test
1870 your Web app.")
1871 (home-page "https://github.com/cdent/wsgi-intercept")
1872 (license license:expat)))
1873
1874 (define-public python-webob
1875 (package
1876 (name "python-webob")
1877 (version "1.8.6")
1878 (source
1879 (origin
1880 (method url-fetch)
1881 (uri (pypi-uri "WebOb" version))
1882 (sha256
1883 (base32
1884 "026i3z99nr3px75isa9mbnky5i7rffiv4d124h5kxfjjsxz92fma"))))
1885 (build-system python-build-system)
1886 (native-inputs
1887 `(("python-nose" ,python-nose)))
1888 (home-page "https://webob.org/")
1889 (synopsis "WSGI request and response object")
1890 (description
1891 "WebOb provides wrappers around the WSGI request environment, and an
1892 object to help create WSGI responses.")
1893 (license license:expat)))
1894
1895 (define-public python2-webob
1896 (package-with-python2 python-webob))
1897
1898 (define-public python-zope-event
1899 (package
1900 (name "python-zope-event")
1901 (version "4.4")
1902 (source
1903 (origin
1904 (method url-fetch)
1905 (uri (pypi-uri "zope.event" version))
1906 (sha256
1907 (base32
1908 "1ksbc726av9xacml6jhcfyn828hlhb9xlddpx6fcvnlvmpmpvhk9"))))
1909 (build-system python-build-system)
1910 (home-page "https://pypi.org/project/zope.event/")
1911 (synopsis "Event publishing system for Python")
1912 (description "Zope.event provides an event publishing API, intended for
1913 use by applications which are unaware of any subscribers to their events. It
1914 is a simple event-dispatching system on which more sophisticated event
1915 dispatching systems can be built.")
1916 (license license:zpl2.1)))
1917
1918 (define-public python2-zope-event
1919 (package-with-python2 python-zope-event))
1920
1921 (define-public python-zope-interface
1922 (package
1923 (name "python-zope-interface")
1924 (version "5.1.0")
1925 (source
1926 (origin
1927 (method url-fetch)
1928 (uri (pypi-uri "zope.interface" version))
1929 (sha256
1930 (base32
1931 "03nrl6b8cb600dnnh46y149awvrm0gxyqgwq5hdw3lvys8mw9r20"))))
1932 (build-system python-build-system)
1933 (arguments '(#:tests? #f)) ; test suite can't find python-zope-testing
1934 (native-inputs
1935 `(("python-coverage" ,python-coverage)
1936 ("python-nose" ,python-nose)
1937 ("python-zope-event" ,python-zope-event)
1938 ("python-zope-testing" ,python-zope-testing)))
1939 (home-page "https://github.com/zopefoundation/zope.interface")
1940 (synopsis "Python implementation of the \"design by contract\"
1941 methodology")
1942 (description "Zope.interface provides an implementation of \"object
1943 interfaces\" for Python. Interfaces are a mechanism for labeling objects as
1944 conforming to a given API or contract.")
1945 (license license:zpl2.1)))
1946
1947 (define-public python2-zope-interface
1948 (package-with-python2 python-zope-interface))
1949
1950 (define-public python-zope-exceptions
1951 (package
1952 (name "python-zope-exceptions")
1953 (version "4.4")
1954 (source
1955 (origin
1956 (method url-fetch)
1957 (uri (pypi-uri "zope.exceptions" version))
1958 (sha256
1959 (base32
1960 "1nkgfwawswmyc6i0b8g3ymvja4mb507m8yhid8s4rbxq3dmqhwhd"))))
1961 (build-system python-build-system)
1962 (arguments
1963 '(#:phases
1964 (modify-phases %standard-phases
1965 (replace 'check
1966 (lambda _
1967 (invoke "zope-testrunner" "--test-path=src"))))))
1968 (native-inputs
1969 `(("python-zope-testrunner" ,python-zope-testrunner-bootstrap)))
1970 (propagated-inputs
1971 `(("python-zope-interface" ,python-zope-interface)))
1972 (home-page "https://pypi.org/project/zope.exceptions/")
1973 (synopsis "Zope exceptions")
1974 (description "Zope.exceptions provides general-purpose exception types
1975 that have uses outside of the Zope framework.")
1976 (license license:zpl2.1)))
1977
1978 (define-public python-zope-exceptions-bootstrap
1979 (package
1980 (inherit python-zope-exceptions)
1981 (arguments `(#:tests? #f))
1982 (propagated-inputs `())
1983 (native-inputs `())
1984 (properties `((hidden? . #t)))))
1985
1986 (define-public python2-zope-exceptions
1987 (package-with-python2 python-zope-exceptions))
1988
1989 (define-public python-zope-testing
1990 (package
1991 (name "python-zope-testing")
1992 (version "4.7")
1993 (source
1994 (origin
1995 (method url-fetch)
1996 (uri (pypi-uri "zope.testing" version))
1997 (sha256
1998 (base32
1999 "1sh3c3i0m8n8fnhqiry0bk3rr356i56ry7calmn57s1pvv8yhsyn"))))
2000 (build-system python-build-system)
2001 (home-page "https://pypi.org/project/zope.testing/")
2002 (synopsis "Zope testing helpers")
2003 (description "Zope.testing provides a number of testing utilities for HTML
2004 forms, HTTP servers, regular expressions, and more.")
2005 (license license:zpl2.1)))
2006
2007 (define-public python2-zope-testing
2008 (package-with-python2 python-zope-testing))
2009
2010 (define-public python-zope-testrunner
2011 (package
2012 (name "python-zope-testrunner")
2013 (version "5.2")
2014 (source
2015 (origin
2016 (method url-fetch)
2017 (uri (pypi-uri "zope.testrunner" version))
2018 (sha256
2019 (base32
2020 "0jyyf1dcz156q95x2y7yw2v420q2xn3cff0c5aci7hmdmcbn0gc7"))))
2021 (build-system python-build-system)
2022 (arguments
2023 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
2024 (native-inputs
2025 `(("python-zope-testing" ,python-zope-testing)))
2026 (propagated-inputs
2027 `(("python-six" ,python-six)
2028 ("python-zope-exceptions" ,python-zope-exceptions)
2029 ("python-zope-interface" ,python-zope-interface)))
2030 (home-page "https://pypi.org/project/zope.testrunner/")
2031 (synopsis "Zope testrunner script")
2032 (description "Zope.testrunner provides a script for running Python
2033 tests.")
2034 (license license:zpl2.1)))
2035
2036 (define-public python-zope-testrunner-bootstrap
2037 (package
2038 (inherit python-zope-testrunner)
2039 (arguments `(#:tests? #f))
2040 (propagated-inputs
2041 `(("python-six" ,python-six)
2042 ("python-zope-exceptions" ,python-zope-exceptions-bootstrap)))
2043 (properties `((hidden? . #t)))))
2044
2045 (define-public python2-zope-testrunner
2046 (package-with-python2 python-zope-testrunner))
2047
2048 (define-public python-zope-i18nmessageid
2049 (package
2050 (name "python-zope-i18nmessageid")
2051 (version "5.0.1")
2052 (source
2053 (origin
2054 (method url-fetch)
2055 (uri (pypi-uri "zope.i18nmessageid" version))
2056 (sha256
2057 (base32
2058 "0ndhn4w1qgwkfbwf9vm2bgq418z5g0wmfsgl0d9nz62cd0mi8d4m"))))
2059 (build-system python-build-system)
2060 (native-inputs
2061 `(("python-coverage" ,python-coverage)
2062 ("python-zope-testrunner" ,python-zope-testrunner)))
2063 (propagated-inputs
2064 `(("python-six" ,python-six)))
2065 (home-page "https://pypi.org/project/zope.i18nmessageid/")
2066 (synopsis "Message identifiers for internationalization")
2067 (description "Zope.i18nmessageid provides facilities for declaring
2068 internationalized messages within program source text.")
2069 (license license:zpl2.1)))
2070
2071 (define-public python2-zope-i18nmessageid
2072 (package-with-python2 python-zope-i18nmessageid))
2073
2074 (define-public python-zope-schema
2075 (package
2076 (name "python-zope-schema")
2077 (version "6.0.0")
2078 (source
2079 (origin
2080 (method url-fetch)
2081 (uri (pypi-uri "zope.schema" version))
2082 (sha256
2083 (base32
2084 "09jg47bxhfg1ahr1jxb5y0cbiszyk1j6fn1r1r7s6svjl3lbryr0"))))
2085 (build-system python-build-system)
2086 (arguments
2087 `(#:phases
2088 (modify-phases %standard-phases
2089 (replace 'check
2090 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
2091 (add-installed-pythonpath inputs outputs)
2092 (if tests?
2093 (invoke "zope-testrunner" "--test-path=src")
2094 #t))))))
2095 (propagated-inputs
2096 `(("python-zope-event" ,python-zope-event)
2097 ("python-zope-interface" ,python-zope-interface)))
2098 (native-inputs
2099 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
2100 ("python-zope-testing" ,python-zope-testing)
2101 ("python-zope-testrunner" ,python-zope-testrunner)))
2102 (home-page "https://pypi.org/project/zope.schema/")
2103 (synopsis "Zope data schemas")
2104 (description "Zope.scheme provides extensions to zope.interface for
2105 defining data schemas.")
2106 (license license:zpl2.1)))
2107
2108 (define-public python2-zope-schema
2109 (package-with-python2 python-zope-schema))
2110
2111 (define-public python-zope-configuration
2112 (package
2113 (name "python-zope-configuration")
2114 (version "4.4.0")
2115 (source (origin
2116 (method url-fetch)
2117 (uri (pypi-uri "zope.configuration" version))
2118 (sha256
2119 (base32
2120 "0g6vrl7y27z9cj5xyrww9xlzk4npj55mgmlrcd9d2nj08jn2pw79"))))
2121 (build-system python-build-system)
2122 (native-inputs
2123 `(("python-manuel" ,python-manuel)
2124 ("python-zope-testing" ,python-zope-testing)
2125 ("python-zope-testrunner" ,python-zope-testrunner)))
2126 (propagated-inputs
2127 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
2128 ("python-zope-interface" ,python-zope-interface)
2129 ("python-zope-schema" ,python-zope-schema)))
2130 (home-page "https://pypi.org/project/zope.configuration/")
2131 (synopsis "Zope Configuration Markup Language")
2132 (description "Zope.configuration implements ZCML, the Zope Configuration
2133 Markup Language.")
2134 (license license:zpl2.1)))
2135
2136 (define-public python-zope-configuration-bootstrap
2137 (package
2138 (inherit python-zope-configuration)
2139 (arguments `(#:tests? #f))
2140 (native-inputs `())
2141 (properties `((hidden? . #t)))))
2142
2143 (define-public python2-zope-configuration
2144 (package-with-python2 python-zope-configuration))
2145
2146 (define-public python-zope-copy
2147 (package
2148 (name "python-zope-copy")
2149 (version "4.2")
2150 (source
2151 (origin
2152 (method url-fetch)
2153 (uri (pypi-uri "zope.copy" version))
2154 (sha256
2155 (base32
2156 "06m75434krl57n6p73c2qj55k5i3fixg887j8ss01ih6zw4rvfs7"))))
2157 (build-system python-build-system)
2158 (arguments
2159 '(#:phases
2160 (modify-phases %standard-phases
2161 (replace 'check
2162 (lambda _
2163 (invoke "zope-testrunner" "--test-path=src" "\\[]"))))))
2164 (propagated-inputs
2165 `(("python-zope-interface" ,python-zope-interface)))
2166 (native-inputs
2167 `(("python-zope-component" ,python-zope-component-bootstrap)
2168 ("python-zope-location" ,python-zope-location-bootstrap)
2169 ("python-zope-testing" ,python-zope-testing)
2170 ("python-zope-testrunner" ,python-zope-testrunner)))
2171 (home-page "https://github.com/zopefoundation/zope.copy")
2172 (synopsis "Pluggable object copying mechanism")
2173 (description
2174 "This package provides a pluggable mechanism for copying persistent objects.")
2175 (license license:zpl2.1)))
2176
2177 (define-public python-zope-proxy
2178 (package
2179 (name "python-zope-proxy")
2180 (version "4.3.5")
2181 (source
2182 (origin
2183 (method url-fetch)
2184 (uri (pypi-uri "zope.proxy" version))
2185 (sha256
2186 (base32
2187 "14h7nyfbl5vpfk0rbviy4ygdfx0yx5kncvg6jpbdb0dhwna0ssm6"))))
2188 (build-system python-build-system)
2189 (native-inputs
2190 `(("python-zope-security" ,python-zope-security-bootstrap)
2191 ("python-zope-testrunner" ,python-zope-testrunner)))
2192 (propagated-inputs
2193 `(("python-zope-interface" ,python-zope-interface)))
2194 (home-page "https://pypi.org/project/zope.proxy/")
2195 (synopsis "Generic, transparent proxies")
2196 (description "Zope.proxy provides generic, transparent proxies for Python.
2197 Proxies are special objects which serve as mostly-transparent wrappers around
2198 another object, intervening in the apparent behavior of the wrapped object
2199 only when necessary to apply the policy (e.g., access checking, location
2200 brokering, etc.) for which the proxy is responsible.")
2201 (license license:zpl2.1)))
2202
2203 (define-public python-zope-proxy-bootstrap
2204 (package
2205 (inherit python-zope-proxy)
2206 (arguments `(#:tests? #f))
2207 (native-inputs `())
2208 (properties `((hidden? . #t)))))
2209
2210 (define-public python2-zope-proxy
2211 (package-with-python2 python-zope-proxy))
2212
2213 (define-public python-zope-hookable
2214 (package
2215 (name "python-zope-hookable")
2216 (version "5.0.1")
2217 (source
2218 (origin
2219 (method url-fetch)
2220 (uri (pypi-uri "zope.hookable" version))
2221 (sha256
2222 (base32
2223 "0hc82lfr7bk53nvbxvjkibkarngyrzgfk2i6bg8wshl0ly0pdl19"))))
2224 (build-system python-build-system)
2225 (native-inputs
2226 `(("python-coverage" ,python-coverage)
2227 ("python-zope-testing" ,python-zope-testing)))
2228 (home-page "https://github.com/zopefoundation/zope.hookable")
2229 (synopsis "Zope hookable")
2230 (description "This package supports the efficient creation of hookable
2231 objects, which are callable objects that are meant to be optionally replaced.
2232 The idea is that you create a function that does some default thing and make i
2233 hookable. Later, someone can modify what it does by calling its sethook method
2234 and changing its implementation. All users of the function, including those
2235 that imported it, will see the change.")
2236 (license license:zpl2.1)))
2237
2238 (define-public python-zope-location
2239 (package
2240 (name "python-zope-location")
2241 (version "4.2")
2242 (source
2243 (origin
2244 (method url-fetch)
2245 (uri (pypi-uri "zope.location" version))
2246 (sha256
2247 (base32
2248 "1b40pzl8v00d583d3gsxv1qjdw2dhghlgkbgxl3m07d5r3izj857"))))
2249 (build-system python-build-system)
2250 (arguments
2251 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
2252 (native-inputs
2253 `(("python-zope-testrunner" ,python-zope-testrunner)))
2254 (propagated-inputs
2255 `(("python-zope-interface" ,python-zope-interface)
2256 ("python-zope-proxy" ,python-zope-proxy)
2257 ("python-zope-schema" ,python-zope-schema)))
2258 (home-page "https://pypi.org/project/zope.location/")
2259 (synopsis "Zope location library")
2260 (description "Zope.location implements the concept of \"locations\" in
2261 Zope3, which are are special objects that have a structural location.")
2262 (license license:zpl2.1)))
2263
2264 (define-public python-zope-location-bootstrap
2265 (package
2266 (inherit python-zope-location)
2267 (arguments `(#:tests? #f))
2268 (native-inputs `())
2269 (properties `((hidden? . #t)))))
2270
2271 (define-public python2-zope-location
2272 (package-with-python2 python-zope-location))
2273
2274 (define-public python-zope-security
2275 (package
2276 (name "python-zope-security")
2277 (version "5.1.1")
2278 (source
2279 (origin
2280 (method url-fetch)
2281 (uri (pypi-uri "zope.security" version))
2282 (sha256
2283 (base32
2284 "11lfw67cigscfax9c5j63xcvz2qcj724zx5fcdqyc94am2glim0h"))))
2285 (build-system python-build-system)
2286 (propagated-inputs
2287 `(("python-zope-component" ,python-zope-component)
2288 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
2289 ("python-zope-interface" ,python-zope-interface)
2290 ("python-zope-location" ,python-zope-location)
2291 ("python-zope-proxy" ,python-zope-proxy)
2292 ("python-zope-schema" ,python-zope-schema)))
2293 (native-inputs
2294 `(("python-btrees" ,python-btrees)
2295 ("python-zope-component" ,python-zope-component-bootstrap)
2296 ("python-zope-configuration" ,python-zope-configuration-bootstrap)
2297 ("python-zope-location" ,python-zope-location-bootstrap)
2298 ("python-zope-testing" ,python-zope-testing)
2299 ("python-zope-testrunner" ,python-zope-testrunner)))
2300 (home-page "https://pypi.org/project/zope.security/")
2301 (synopsis "Zope security framework")
2302 (description "Zope.security provides a generic mechanism to implement
2303 security policies on Python objects.")
2304 (license license:zpl2.1)))
2305
2306 (define-public python-zope-security-bootstrap
2307 (package
2308 (inherit python-zope-security)
2309 (arguments `(#:tests? #f))
2310 (propagated-inputs
2311 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
2312 ("python-zope-interface" ,python-zope-interface)
2313 ("python-zope-proxy" ,python-zope-proxy-bootstrap)
2314 ("python-zope-schema" ,python-zope-schema)))
2315 (native-inputs `())
2316 (properties `((hidden? . #t)))))
2317
2318 (define-public python2-zope-security
2319 (package-with-python2 python-zope-security))
2320
2321 (define-public python-zope-component
2322 (package
2323 (name "python-zope-component")
2324 (version "4.6.2")
2325 (source
2326 (origin
2327 (method url-fetch)
2328 (uri (pypi-uri "zope.component" version))
2329 (sha256
2330 (base32
2331 "14iwp95hh6q5dj4k9h1iw75cbp89bs27nany4dinyglb44c8jqli"))))
2332 (build-system python-build-system)
2333 (arguments
2334 '(#:phases
2335 (modify-phases %standard-phases
2336 (replace 'check
2337 (lambda* (#:key inputs outputs #:allow-other-keys)
2338 (add-installed-pythonpath inputs outputs)
2339 (invoke "python" "setup.py" "test"))))))
2340 (native-inputs
2341 `(("python-persistent" ,python-persistent)
2342 ("python-zope-configuration" ,python-zope-configuration-bootstrap)
2343 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
2344 ("python-zope-location" ,python-zope-location-bootstrap)
2345 ("python-zope-proxy" ,python-zope-proxy-bootstrap)
2346 ("python-zope-security" ,python-zope-security-bootstrap)
2347 ("python-zope-testing" ,python-zope-testing)
2348 ("python-zope-testrunner" ,python-zope-testrunner)))
2349 (propagated-inputs
2350 `(("python-zope-deferredimport" ,python-zope-deferredimport)
2351 ("python-zope-deprecation" ,python-zope-deprecation)
2352 ("python-zope-event" ,python-zope-event)
2353 ("python-zope-hookable" ,python-zope-hookable)
2354 ("python-zope-interface" ,python-zope-interface)))
2355 (home-page "https://github.com/zopefoundation/zope.component")
2356 (synopsis "Zope Component Architecture")
2357 (description "Zope.component represents the core of the Zope Component
2358 Architecture. Together with the zope.interface package, it provides
2359 facilities for defining, registering and looking up components.")
2360 (license license:zpl2.1)))
2361
2362 (define-public python-zope-component-bootstrap
2363 (package
2364 (inherit python-zope-component)
2365 (arguments `(#:tests? #f))
2366 (native-inputs `())
2367 (properties `((hidden? . #t)))))
2368
2369 (define-public python2-zope-component
2370 (package-with-python2 python-zope-component))
2371
2372 (define-public python-zope-deferredimport
2373 (package
2374 (name "python-zope-deferredimport")
2375 (version "4.3.1")
2376 (source
2377 (origin
2378 (method url-fetch)
2379 (uri (pypi-uri "zope.deferredimport" version))
2380 (sha256
2381 (base32
2382 "1q89v54dwniiqypjbwywwdfjdr4kdkqlyqsgrpplgvsygdg39cjp"))))
2383 (build-system python-build-system)
2384 (propagated-inputs
2385 `(("python-zope-proxy" ,python-zope-proxy)))
2386 (native-inputs
2387 `(("python-zope-testrunner" ,python-zope-testrunner)))
2388 (home-page "https://github.com/zopefoundation/zope.deferredimport")
2389 (synopsis "Defer imports until used by code")
2390 (description
2391 "Often, especially for package modules, you want to import names for
2392 convenience, but not actually perform the imports until necessary. The
2393 @code{zope.deferredimport} package provided facilities for defining names in
2394 modules that will be imported from somewhere else when used. You can also cause
2395 deprecation warnings to be issued when a variable is used.")
2396 (license license:zpl2.1)))
2397
2398 (define-public python-ndg-httpsclient
2399 (package
2400 (name "python-ndg-httpsclient")
2401 (version "0.5.1")
2402 (source (origin
2403 (method url-fetch)
2404 (uri (pypi-uri "ndg_httpsclient" version))
2405 (sha256
2406 (base32
2407 "0412b7i1s4vj7lz9r72nmb28h9syd4q2x89bdirkkc3a6z8awbyp"))))
2408 (build-system python-build-system)
2409 (arguments
2410 '(;; The tests appear to require networking.
2411 #:tests? #f))
2412 (propagated-inputs
2413 `(("python-pyopenssl" ,python-pyopenssl)))
2414 (synopsis "HTTPS support for Python's httplib and urllib2")
2415 (description "This is a HTTPS client implementation for httplib and urllib2
2416 based on PyOpenSSL. PyOpenSSL provides a more fully-featured SSL implementation
2417 over the default provided with Python and, importantly, enables full
2418 verification of the SSL peer.")
2419 (home-page "https://github.com/cedadev/ndg_httpsclient/")
2420 (license license:bsd-3)))
2421
2422 ;; python2-openssl requires special care, so package-with-python2 is
2423 ;; insufficient.
2424 (define-public python2-ndg-httpsclient
2425 (package/inherit python-ndg-httpsclient
2426 (name "python2-ndg-httpsclient")
2427 (arguments
2428 (substitute-keyword-arguments (package-arguments python-ndg-httpsclient)
2429 ((#:python _) python-2)))
2430 (propagated-inputs
2431 `(("python2-pyopenssl" ,python2-pyopenssl)))))
2432
2433 (define-public python-websocket-client
2434 (package
2435 (name "python-websocket-client")
2436 (version "0.54.0")
2437 (source
2438 (origin
2439 (method url-fetch)
2440 (uri (pypi-uri "websocket_client" version))
2441 (sha256
2442 (base32
2443 "0j88zmikaypf38lvpkf4aaxrjp9j07dmy5ghj7kli0fv3p4n45g5"))))
2444 (build-system python-build-system)
2445 (propagated-inputs
2446 `(("python-six" ,python-six)))
2447 (home-page "https://github.com/liris/websocket-client")
2448 (synopsis "WebSocket client for Python")
2449 (description "The Websocket-client module provides the low level APIs for
2450 WebSocket usage in Python programs.")
2451 (properties `((python2-variant . ,(delay python2-websocket-client))))
2452 (license license:lgpl2.1+)))
2453
2454 (define-public python2-websocket-client
2455 (let ((base (package-with-python2
2456 (strip-python2-variant python-websocket-client))))
2457 (package/inherit base
2458 (native-inputs
2459 `(("python2-backport-ssl-match-hostname"
2460 ,python2-backport-ssl-match-hostname)
2461 ,@(package-native-inputs base))))))
2462
2463 (define-public python-purl
2464 (package
2465 (name "python-purl")
2466 (version "1.5")
2467 (source
2468 (origin
2469 (method url-fetch)
2470 (uri (pypi-uri "purl" version))
2471 (sha256
2472 (base32
2473 "15ibnz1xrh5msmn04j0nr00sz4n7jwx6cwd6zlx99kkz3vpin53m"))))
2474 (build-system python-build-system)
2475 (propagated-inputs `(("python-six" ,python-six)))
2476 (home-page
2477 "https://github.com/codeinthehole/purl")
2478 (synopsis
2479 "Python package for URL manipulation")
2480 (description
2481 "Purl is a Python package for handling URLs.")
2482 (license license:expat)))
2483
2484 (define-public python-apiron
2485 (package
2486 (name "python-apiron")
2487 (version "5.1.0")
2488 (source
2489 (origin
2490 (method url-fetch)
2491 (uri (pypi-uri "apiron" version))
2492 (sha256
2493 (base32 "1qwbqn47sf0aqznj1snbv37v8ijx476qqkjf5l9pac7xjkxsr8qk"))))
2494 (build-system python-build-system)
2495 (arguments
2496 `(#:phases
2497 (modify-phases %standard-phases
2498 (replace 'check
2499 (lambda* (#:key inputs outputs #:allow-other-keys)
2500 (add-installed-pythonpath inputs outputs)
2501 (invoke "pytest" "-vv" "--cov" "-k"
2502 ;; This test tries to connect to the internet.
2503 "not test_call"))))))
2504 (propagated-inputs
2505 `(("python-requests" ,python-requests)))
2506 (native-inputs
2507 `(("python-pytest" ,python-pytest)
2508 ("python-pytest-cov" ,python-pytest-cov)))
2509 (home-page "https://github.com/ithaka/apiron")
2510 (synopsis "Python wrapper for interacting with RESTful APIs")
2511 (description
2512 "@code{apiron} provides a declarative, structured configuration of
2513 services and endpoints with a unified interface for interacting with RESTful
2514 APIs.")
2515 (license license:expat)))
2516
2517 (define-public python-beren
2518 (package
2519 (name "python-beren")
2520 (version "0.7.0")
2521 (source
2522 (origin
2523 (method url-fetch)
2524 (uri (pypi-uri "beren" version))
2525 (sha256
2526 (base32 "1v3mdwfqsyza892zvs124ym9w1bkng1j56b7l4dwfjir3723xcgf"))))
2527 (build-system python-build-system)
2528 (arguments
2529 ;; The test tries to open a connection to a remote server.
2530 `(#:tests? #f))
2531 (propagated-inputs
2532 `(("python-apiron" ,python-apiron)))
2533 (home-page "https://github.com/teffalump/beren")
2534 (synopsis "REST client for Orthanc DICOM servers")
2535 (description
2536 "@code{beren} provides a REST client for Orthanc, a DICOM server.")
2537 (license license:gpl3+)))
2538
2539 (define-public python-requests
2540 (package
2541 (name "python-requests")
2542 (version "2.25.0")
2543 (source (origin
2544 (method url-fetch)
2545 (uri (pypi-uri "requests" version))
2546 (sha256
2547 (base32
2548 "1y6mb8c0ipd64d5axq2p368yxndp3f966hmabjka2q2a5y9hn6kz"))))
2549 (build-system python-build-system)
2550 (propagated-inputs
2551 `(("python-certifi" ,python-certifi)
2552 ("python-chardet" ,python-chardet)
2553 ("python-idna" ,python-idna)
2554 ("python-urllib3" ,python-urllib3)))
2555 (arguments
2556 ;; FIXME: Some tests require network access.
2557 '(#:tests? #f))
2558 (home-page "http://python-requests.org/")
2559 (synopsis "Python HTTP library")
2560 (description
2561 "Requests is a Python HTTP client library. It aims to be easier to use
2562 than Python’s urllib2 library.")
2563 (license license:asl2.0)))
2564
2565 ;; Some software requires an older version of Requests, notably Docker/Docker
2566 ;; Compose.
2567 (define-public python-requests-2.20
2568 (package (inherit python-requests)
2569 (version "2.20.1")
2570 (source (origin
2571 (method url-fetch)
2572 (uri (pypi-uri "requests" version))
2573 (sha256
2574 (base32
2575 "0qzj6cgv3k9wyj7wlxgz7xq0cfg4jbbkfm24pp8dnhczwl31527a"))))
2576 (propagated-inputs
2577 `(("python-urllib3" ,python-urllib3-1.24)
2578 ("python-idna" ,python-idna-2.7)
2579 ,@(package-propagated-inputs python-requests)))))
2580
2581 (define-public python2-requests
2582 (package-with-python2 python-requests))
2583
2584 (define-public python-requests-unixsocket
2585 (package
2586 (name "python-requests-unixsocket")
2587 (version "0.2.0")
2588 (source
2589 (origin
2590 (method url-fetch)
2591 (uri (pypi-uri "requests-unixsocket" version))
2592 (sha256
2593 (base32
2594 "1sn12y4fw1qki5gxy9wg45gmdrxhrndwfndfjxhpiky3mwh1lp4y"))))
2595 (build-system python-build-system)
2596 (arguments
2597 '(#:phases
2598 (modify-phases %standard-phases
2599 (add-after 'unpack 'relax-requirements
2600 (lambda _
2601 (substitute* "test-requirements.txt"
2602 (("(.*)==(.*)" _ name) (string-append name "\n")))))
2603 (replace 'check
2604 (lambda* (#:key inputs outputs #:allow-other-keys)
2605 (add-installed-pythonpath inputs outputs)
2606 (invoke "pytest" "-vv"))))))
2607 (propagated-inputs
2608 `(("python-pbr" ,python-pbr)
2609 ("python-requests" ,python-requests)
2610 ("python-urllib3" ,python-urllib3)))
2611 (native-inputs
2612 `(("python-apipkg" ,python-apipkg)
2613 ("python-appdirs" ,python-appdirs)
2614 ("python-execnet" ,python-execnet)
2615 ("python-packaging" ,python-packaging)
2616 ("python-pep8" ,python-pep8)
2617 ("python-py" ,python-py)
2618 ("python-pyparsing" ,python-pyparsing)
2619 ("python-pytest" ,python-pytest)
2620 ("python-pytest-cache" ,python-pytest-cache)
2621 ("python-pytest-pep8" ,python-pytest-pep8)
2622 ("python-six" ,python-six)
2623 ("python-waitress" ,python-waitress)))
2624 (home-page "https://github.com/msabramo/requests-unixsocket")
2625 (synopsis "Talk HTTP via a UNIX domain socket")
2626 (description
2627 "This Python package lets you use the @code{requests} library to talk
2628 HTTP via a UNIX domain socket.")
2629 (license license:asl2.0)))
2630
2631 (define-public python-requests_ntlm
2632 (package
2633 (name "python-requests_ntlm")
2634 (version "1.1.0")
2635 (source
2636 (origin
2637 (method url-fetch)
2638 (uri (pypi-uri "requests_ntlm" version))
2639 (sha256
2640 (base32
2641 "0wgbqzaq9w7bas16b7brdb75f91bh3275fb459093bk1ihpck2ci"))))
2642 (build-system python-build-system)
2643 (propagated-inputs
2644 `(("python-cryptography" ,python-cryptography)
2645 ("python-ntlm-auth" ,python-ntlm-auth)
2646 ("python-requests" ,python-requests)))
2647 (home-page "https://github.com/requests/requests-ntlm")
2648 (synopsis
2649 "NTLM authentication support for Requests")
2650 (description
2651 "This package allows for HTTP NTLM authentication using the requests
2652 library.")
2653 (license license:isc)))
2654
2655 (define-public python-requests-mock
2656 (package
2657 (name "python-requests-mock")
2658 (version "1.8.0")
2659 (source
2660 (origin
2661 (method url-fetch)
2662 (uri (pypi-uri "requests-mock" version))
2663 (sha256
2664 (base32
2665 "09nj8fmyj7xz2mgwyvbw0fl9zybmx2d3qd2hf529vvjc9s24d3z6"))))
2666 (build-system python-build-system)
2667 (propagated-inputs
2668 `(("python-requests" ,python-requests)
2669 ("python-six" ,python-six)))
2670 (native-inputs
2671 `(("python-pbr" ,python-pbr)
2672 ("python-discover" ,python-discover)
2673 ("python-docutils" ,python-docutils)
2674 ("python-fixtures" ,python-fixtures)
2675 ("python-mock" ,python-mock)
2676 ("python-purl" ,python-purl)
2677 ("python-pytest" ,python-pytest)
2678 ("python-sphinx" ,python-sphinx)
2679 ("python-testrepository" ,python-testrepository)))
2680 (home-page "https://requests-mock.readthedocs.org/")
2681 (synopsis "Mock out responses from the requests package")
2682 (description
2683 "This module provides a building block to stub out the HTTP requests
2684 portions of your testing code.")
2685 (license license:asl2.0)))
2686
2687 (define-public python-requests-toolbelt
2688 (package
2689 (name "python-requests-toolbelt")
2690 (version "0.8.0")
2691 (source (origin
2692 (method url-fetch)
2693 (uri (pypi-uri "requests-toolbelt" version))
2694 (sha256
2695 (base32
2696 "1dc7l42i4080r8i4m9fj51jx367lqkai170vrv7wd93gdj9k39gn"))))
2697 (build-system python-build-system)
2698 (native-inputs
2699 `(("python-betamax" ,python-betamax)
2700 ("python-mock" ,python-mock)
2701 ("python-pytest" ,python-pytest)))
2702 (propagated-inputs
2703 `(("python-requests" ,python-requests)))
2704 (synopsis "Extensions to python-requests")
2705 (description "This is a toolbelt of useful classes and functions to be used
2706 with python-requests.")
2707 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
2708 (license license:asl2.0)))
2709
2710 (define-public python2-requests-toolbelt
2711 (package-with-python2 python-requests-toolbelt))
2712
2713 (define-public python-requests-toolbelt-0.9.1
2714 (package
2715 (inherit python-requests-toolbelt)
2716 (version "0.9.1")
2717 (source (origin
2718 (method url-fetch)
2719 (uri (pypi-uri "requests-toolbelt" version))
2720 (sha256
2721 (base32
2722 "1h3gm88dcjbd7gm229a7x5qkkhnsqsjz0m0l2xyavm2ab3a8k04n"))))
2723 (arguments
2724 `(;; FIXME: Some tests require network access.
2725 #:tests? #f))))
2726
2727 (define-public python-requests-ftp
2728 (package
2729 (name "python-requests-ftp")
2730 (version "0.3.1")
2731 (source
2732 (origin
2733 (method url-fetch)
2734 (uri (pypi-uri "requests-ftp" version))
2735 (sha256
2736 (base32
2737 "0yh5v21v36dsjsgv4y9dx4mmz35741l5jf6pbq9w19d8rfsww13m"))))
2738 (build-system python-build-system)
2739 (propagated-inputs
2740 `(("python-requests" ,python-requests)))
2741 (home-page
2742 "https://github.com/Lukasa/requests-ftp")
2743 (synopsis "FTP Transport Adapter for Requests")
2744 (description
2745 "Requests-FTP is an implementation of a simple FTP transport
2746 adapter for use with the Requests library.")
2747 (license license:asl2.0)))
2748
2749 (define-public python-oauthlib
2750 (package
2751 (name "python-oauthlib")
2752 (version "3.1.0")
2753 (source (origin
2754 (method url-fetch)
2755 (uri (pypi-uri "oauthlib" version))
2756 (sha256
2757 (base32
2758 "12gqnabwck30gdlpwm6af3s28qm9p2yc7b1w8s4fk9ncbz1irr5y"))))
2759 (build-system python-build-system)
2760 (arguments
2761 `(#:phases (modify-phases %standard-phases
2762 (replace 'check
2763 (lambda _
2764 (invoke "pytest" "-vv"))))))
2765 (native-inputs
2766 `(("python-pytest" ,python-pytest)
2767 ("python-pytest-cov" ,python-pytest-cov)
2768 ("python-mock" ,python-mock)))
2769 (propagated-inputs
2770 `(("python-cryptography" ,python-cryptography)
2771 ("python-pyjwt" ,python-pyjwt)
2772 ("python-blinker" ,python-blinker)))
2773 (home-page "https://github.com/oauthlib/oauthlib")
2774 (synopsis "OAuth implementation for Python")
2775 (description
2776 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2777 OAuth request-signing logic.")
2778 (license license:bsd-3)))
2779
2780 (define-public python2-oauthlib
2781 (package-with-python2 python-oauthlib))
2782
2783 (define-public python-rauth
2784 (package
2785 (name "python-rauth")
2786 (version "0.7.3")
2787 (source
2788 (origin
2789 (method url-fetch)
2790 (uri (pypi-uri "rauth" version))
2791 (sha256
2792 (base32
2793 "02kv8w8l98ky223avyq7vw7x1f2ya9chrm59r77ylq45qb0xnk2j"))))
2794 (build-system python-build-system)
2795 (arguments
2796 `(#:test-target "check"))
2797 (propagated-inputs
2798 `(("python-requests" ,python-requests)))
2799 (home-page "https://github.com/litl/rauth")
2800 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
2801 (description
2802 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
2803 provides service wrappers for convenient connection initialization and
2804 authenticated session objects providing things like keep-alive.")
2805 (license license:expat)
2806 (properties `((python2-variant . ,(delay python2-rauth))))))
2807
2808 (define-public python2-rauth
2809 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
2810 (package/inherit base
2811 (native-inputs `(("python2-unittest2" ,python2-unittest2)
2812 ,@(package-native-inputs base))))))
2813
2814 (define-public python-urllib3
2815 (package
2816 (name "python-urllib3")
2817 (version "1.26.2")
2818 (source
2819 (origin
2820 (method url-fetch)
2821 (uri (pypi-uri "urllib3" version))
2822 (sha256
2823 (base32
2824 "024yldjwjavps39yb77sc422z8fa9bn20wcqrcncjwrqjab8y60r"))))
2825 (replacement python-urllib3/fixed)
2826 (build-system python-build-system)
2827 (arguments `(#:tests? #f))
2828 (propagated-inputs
2829 `(;; These 5 inputs are used to build urrlib3[secure]
2830 ("python-certifi" ,python-certifi)
2831 ("python-cryptography" ,python-cryptography)
2832 ("python-idna" ,python-idna)
2833 ("python-pyopenssl" ,python-pyopenssl)
2834 ("python-pysocks" ,python-pysocks)))
2835 (home-page "https://urllib3.readthedocs.io/")
2836 (synopsis "HTTP library with thread-safe connection pooling")
2837 (description
2838 "Urllib3 supports features left out of urllib and urllib2 libraries. It
2839 can reuse the same socket connection for multiple requests, it can POST files,
2840 supports url redirection and retries, and also gzip and deflate decoding.")
2841 (properties `((python2-variant . ,(delay python2-urllib3))))
2842 (license license:expat)))
2843
2844 (define python-urllib3/fixed
2845 (package
2846 (inherit python-urllib3)
2847 (version "1.26.7")
2848 (source
2849 (origin
2850 (method url-fetch)
2851 (uri (pypi-uri "urllib3" version))
2852 (sha256
2853 (base32
2854 "1kkf6gi8a1fs0dqkf6kpmdpsy97iirvliz8q1krxp8ppaiawd1s9"))))))
2855
2856 ;; Some software requires an older version of urllib3, notably Docker.
2857 (define-public python-urllib3-1.24
2858 (package (inherit python-urllib3)
2859 (version "1.24.3")
2860 (source (origin
2861 (method url-fetch)
2862 (uri (pypi-uri "urllib3" version))
2863 (sha256
2864 (base32
2865 "1x0slqrv6kixkbcdnxbglvjliwhc1payavxjvk8fvbqjrnasd4r3"))))))
2866
2867 (define-public python2-urllib3
2868 (let ((base (package-with-python2 (strip-python2-variant python-urllib3))))
2869 (package/inherit
2870 base
2871 (propagated-inputs
2872 `(("python-ipaddress" ,python2-ipaddress)
2873 ,@(package-propagated-inputs base))))))
2874
2875 (define-public awscli
2876 (package
2877 ;; Note: updating awscli typically requires updating botocore as well.
2878 (name "awscli")
2879 (version "1.18.203")
2880 (source
2881 (origin
2882 (method url-fetch)
2883 (uri (pypi-uri name version))
2884 (sha256
2885 (base32
2886 "128zg24961j8nmnq2dxqg6a7zwh3qgv87cmvclsdqwwih9nigxv9"))))
2887 (build-system python-build-system)
2888 (arguments
2889 ;; FIXME: The 'pypi' release does not contain tests.
2890 '(#:tests? #f
2891 #:phases
2892 (modify-phases %standard-phases
2893 (add-after 'unpack 'fix-reference-to-groff
2894 (lambda _
2895 (substitute* "awscli/help.py"
2896 (("if not self._exists_on_path\\('groff'\\):") "")
2897 (("raise ExecutableNotFoundError\\('groff'\\)") "")
2898 (("cmdline = \\['groff'")
2899 (string-append "cmdline = ['" (which "groff") "'")))
2900 #t)))))
2901 (propagated-inputs
2902 `(("python-colorama" ,python-colorama)
2903 ("python-botocore" ,python-botocore)
2904 ("python-s3transfer" ,python-s3transfer)
2905 ("python-docutils" ,python-docutils)
2906 ("python-pyyaml" ,python-pyyaml)
2907 ("python-rsa" ,python-rsa)))
2908 (native-inputs
2909 `(("groff" ,groff)))
2910 (home-page "https://aws.amazon.com/cli/")
2911 (synopsis "Command line client for AWS")
2912 (description "AWS CLI provides a unified command line interface to the
2913 Amazon Web Services (AWS) API.")
2914 (license license:asl2.0)))
2915
2916 (define-public python-wsgiproxy2
2917 (package
2918 (name "python-wsgiproxy2")
2919 (version "0.4.6")
2920 (source
2921 (origin
2922 (method url-fetch)
2923 (uri (pypi-uri "WSGIProxy2" version ".tar.gz"))
2924 (sha256
2925 (base32 "16jch5nic0hia28lps3c678s9s9mjdq8n87igxncjg0rpi5adqnf"))))
2926 (build-system python-build-system)
2927 (native-inputs
2928 `(("python-webtest" ,python-webtest)))
2929 (propagated-inputs
2930 `(("python-requests" ,python-requests)
2931 ("python-six" ,python-six)
2932 ("python-urllib3" ,python-urllib3)
2933 ("python-webob" ,python-webob)))
2934 (home-page "https://github.com/gawel/WSGIProxy2/")
2935 (synopsis "WSGI Proxy with various http client backends")
2936 (description "WSGI turns HTTP requests into WSGI function calls.
2937 WSGIProxy turns WSGI function calls into HTTP requests.
2938 It also includes code to sign requests and pass private data,
2939 and to spawn subprocesses to handle requests.")
2940 (license license:expat)))
2941
2942 (define-public python-pastedeploy
2943 (package
2944 (name "python-pastedeploy")
2945 (version "2.1.1")
2946 (source
2947 (origin
2948 (method url-fetch)
2949 (uri (pypi-uri "PasteDeploy" version))
2950 (sha256
2951 (base32 "05s88qdjdwd9d9qs13fap7nqgxs7qs5qfzzjbrc5va13k2mxdskd"))))
2952 (build-system python-build-system)
2953 (arguments
2954 '(#:test-target "pytest"))
2955 (native-inputs
2956 `(("python-pytest" ,python-pytest)
2957 ("python-pytest-runner" ,python-pytest-runner)))
2958 (home-page "https://pylonsproject.org/")
2959 (synopsis
2960 "Load, configure, and compose WSGI applications and servers")
2961 (description
2962 "This tool provides code to load WSGI applications and servers from URIs;
2963 these URIs can refer to Python Eggs for INI-style configuration files. Paste
2964 Script provides commands to serve applications based on this configuration
2965 file.")
2966 (license license:expat)))
2967
2968 (define-public python2-pastedeploy
2969 (package-with-python2 python-pastedeploy))
2970
2971 (define-public python-webtest
2972 (package
2973 (name "python-webtest")
2974 (version "2.0.35")
2975 (source
2976 (origin
2977 (method url-fetch)
2978 (uri (pypi-uri "WebTest" version))
2979 (sha256
2980 (base32 "11xhgdj251zkvz5w30fvspii08ki2vrpr1im9sph1wmlnasnihda"))))
2981 (build-system python-build-system)
2982 (arguments
2983 ;; Tests require python-pyquery, which creates a circular dependency.
2984 `(#:tests? #f))
2985 (propagated-inputs
2986 `(("python-waitress" ,python-waitress)
2987 ("python-webob" ,python-webob)
2988 ("python-six" ,python-six)
2989 ("python-beautifulsoup4" ,python-beautifulsoup4)))
2990 (home-page "https://docs.pylonsproject.org/projects/webtest/")
2991 (synopsis "Helper to test WSGI applications")
2992 (description "Webtest allows you to test your Python web applications
2993 without starting an HTTP server. It supports anything that supports the
2994 minimum of WSGI.")
2995 (license license:expat)))
2996
2997 (define-public python2-webtest
2998 (package-with-python2 python-webtest))
2999
3000 (define-public python-flask
3001 (package
3002 (name "python-flask")
3003 (version "1.1.2")
3004 (source (origin
3005 (method url-fetch)
3006 (uri (pypi-uri "Flask" version))
3007 (sha256
3008 (base32
3009 "0q3h295izcil7lswkzfnyg3k5gq4hpmqmpl6i7s5m1n9szi1myjf"))))
3010 (build-system python-build-system)
3011 (arguments
3012 '(#:phases
3013 (modify-phases %standard-phases
3014 (replace 'check
3015 (lambda _
3016 (setenv "PYTHONPATH" (string-append "./build/lib:"
3017 (getenv "PYTHONPATH")))
3018 (invoke "pytest" "-vv" "tests"))))))
3019 (native-inputs
3020 `(("python-pytest" ,python-pytest)))
3021 (propagated-inputs
3022 `(("python-itsdangerous" ,python-itsdangerous)
3023 ("python-jinja2" ,python-jinja2)
3024 ("python-click" ,python-click)
3025 ("python-werkzeug" ,python-werkzeug)))
3026 (home-page "https://www.palletsprojects.com/p/flask/")
3027 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
3028 (description "Flask is a micro web framework based on the Werkzeug toolkit
3029 and Jinja2 template engine. It is called a micro framework because it does not
3030 presume or force a developer to use a particular tool or library.")
3031 (license license:bsd-3)))
3032
3033 (define-public python-flask-wtf
3034 (package
3035 (name "python-flask-wtf")
3036 (version "0.14.3")
3037 (source
3038 (origin
3039 (method url-fetch)
3040 (uri (pypi-uri "Flask-WTF" version))
3041 (sha256
3042 (base32
3043 "086pvg2x69n0nczcq7frknfjd8am1zdy8qqpva1sanwb02hf65yl"))))
3044 (build-system python-build-system)
3045 (arguments
3046 '(#:phases
3047 (modify-phases %standard-phases
3048 (replace 'check
3049 (lambda _
3050 (setenv "PYTHONPATH" (string-append "./build/lib:"
3051 (getenv "PYTHONPATH")))
3052 (invoke "pytest" "-vv"))))))
3053 (propagated-inputs
3054 `(("python-flask-babel" ,python-flask-babel)
3055 ("python-babel" ,python-babel)
3056 ("python-wtforms" ,python-wtforms)))
3057 (native-inputs
3058 `(("python-pytest" ,python-pytest)))
3059 (home-page "https://github.com/lepture/flask-wtf")
3060 (synopsis "Simple integration of Flask and WTForms")
3061 (description "Flask-WTF integrates Flask and WTForms, including CSRF, file
3062 upload, and reCAPTCHA.")
3063 (license license:bsd-3)))
3064
3065 (define-public python-flask-multistatic
3066 (package
3067 (name "python-flask-multistatic")
3068 (version "1.0")
3069 (source
3070 (origin
3071 (method url-fetch)
3072 (uri (pypi-uri "flask-multistatic" version))
3073 (sha256
3074 (base32
3075 "0p4v50rwv64wcd0zlq7rzl4waprwr4hj19s3cgf1isywa7jcisgm"))))
3076 (build-system python-build-system)
3077 (propagated-inputs
3078 `(("python-flask" ,python-flask)))
3079 (home-page "https://pagure.io/flask-multistatic")
3080 (synopsis "Flask plugin to allow overriding static files")
3081 (description "@code{flask-multistatic} is a flask plugin that adds support
3082 for overriding static files.")
3083 (license license:gpl3+)))
3084
3085 (define-public python-cookies
3086 (package
3087 (name "python-cookies")
3088 (version "2.2.1")
3089 (source (origin
3090 (method url-fetch)
3091 (uri (pypi-uri "cookies" version))
3092 (sha256
3093 (base32
3094 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
3095 (build-system python-build-system)
3096 (arguments
3097 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
3098 #:tests? #f))
3099 (native-inputs
3100 `(("python-pytest" ,python-pytest)))
3101 (synopsis "HTTP cookie parser and renderer")
3102 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
3103 Python.")
3104 (home-page "https://gitlab.com/sashahart/cookies")
3105 (license license:expat)))
3106
3107 (define-public python2-cookies
3108 (package-with-python2 python-cookies))
3109
3110 (define-public python-responses
3111 (package
3112 (name "python-responses")
3113 (version "0.10.6")
3114 (source (origin
3115 (method url-fetch)
3116 (uri (pypi-uri "responses" version))
3117 (sha256
3118 (base32
3119 "147pacwkkqy3qf3hr33fnl1xbzgw0zsm3qppvvy9qhq8h069qbah"))))
3120 (build-system python-build-system)
3121 (arguments
3122 `(;; Test suite is not distributed:
3123 ;; https://github.com/getsentry/responses/issues/38
3124 #:tests? #f))
3125 (native-inputs
3126 `(("python-mock" ,python-mock)))
3127 (propagated-inputs
3128 `(("python-requests" ,python-requests)
3129 ("python-cookies" ,python-cookies)
3130 ("python-six" ,python-six)))
3131 (home-page "https://github.com/getsentry/responses")
3132 (synopsis "Utility for mocking out the `requests` Python library")
3133 (description "A utility library for mocking out the `requests` Python
3134 library.")
3135 (license license:asl2.0)))
3136
3137 (define-public python2-responses
3138 (package-with-python2 python-responses))
3139
3140 (define-public python-grequests
3141 (package
3142 (name "python-grequests")
3143 (version "0.3.0")
3144 (source
3145 (origin
3146 (method url-fetch)
3147 (uri (pypi-uri "grequests" version))
3148 (sha256
3149 (base32
3150 "1j9icncllbkv7x5719b20mx670c6q1jrdx1sakskkarvx3pc8h8g"))))
3151 (build-system python-build-system)
3152 (propagated-inputs
3153 `(("python-gevent" ,python-gevent)
3154 ("python-requests" ,python-requests)))
3155 (native-inputs
3156 `(("python-nose" ,python-nose)
3157 ("python-zope.interface" ,python-zope-interface)
3158 ("python-zope.event" ,python-zope-event)))
3159 (home-page "https://github.com/kennethreitz/grequests")
3160 (synopsis "Python library for asynchronous HTTP requests")
3161 (description "GRequests is a Python library that allows you to use
3162 @code{Requests} with @code{Gevent} to make asynchronous HTTP Requests easily")
3163 (license license:bsd-2)))
3164
3165 (define-public python-dpkt
3166 (package
3167 (name "python-dpkt")
3168 (version "1.9.4")
3169 (source
3170 (origin
3171 (method url-fetch)
3172 (uri (pypi-uri "dpkt" version))
3173 (sha256
3174 (base32
3175 "1d28r8pmhzjjd6hrn1xcddinfhwv8lcl1s59ygmqa8kfmz5pkrgl"))))
3176 (build-system python-build-system)
3177 (home-page "https://github.com/kbandla/dpkt")
3178 (synopsis "Packet generator and parser for TCP/IP protocols")
3179 (description "The dpkt module is a fast, simple packet generator and parser
3180 for the basic TCP/IP protocols.")
3181 (license license:bsd-3)))
3182
3183 (define-public python-geventhttpclient
3184 (package
3185 (name "python-geventhttpclient")
3186 (version "1.4.4")
3187 (source (origin
3188 (method url-fetch)
3189 (uri (pypi-uri "geventhttpclient" version))
3190 (sha256
3191 (base32
3192 "1hy4qm9d3r69n5199i7qjji1v7718n7cxbj8ggi0njify99m37pm"))
3193 (modules '((guix build utils)))
3194 (snippet
3195 '(begin
3196 ;; Delete pre-compiled files.
3197 (for-each delete-file (find-files "src/geventhttpclient"
3198 ".*\\.pyc"))))))
3199 (build-system python-build-system)
3200 (arguments
3201 '(#:phases
3202 (modify-phases %standard-phases
3203 (add-after 'unpack 'delete-network-tests
3204 (lambda _
3205 (delete-file "src/geventhttpclient/tests/test_client.py")))
3206 (add-after 'unpack 'fix-compatibility-issue
3207 ;; See: https://github.com/gwik/geventhttpclient/issues/137.
3208 (lambda _
3209 (substitute* "src/geventhttpclient/tests/test_ssl.py"
3210 ((".*sock.last_seen_sni = None.*")
3211 ""))))
3212 (replace 'check
3213 (lambda* (#:key inputs outputs #:allow-other-keys)
3214 (add-installed-pythonpath inputs outputs)
3215 (invoke "py.test" "src/geventhttpclient/tests" "-v"
3216 ;; Append the test modules to sys.path to avoid
3217 ;; namespace conflict which breaks SSL tests.
3218 "--import-mode=append"
3219 ;; XXX: This test fails with Python 3.8:
3220 ;; https://github.com/gwik/geventhttpclient/issues/119
3221 "-k" "not test_cookielib_compatibility"))))))
3222 (native-inputs
3223 `(("python-dpkt" ,python-dpkt)
3224 ("python-pytest" ,python-pytest)))
3225 (propagated-inputs
3226 `(("python-certifi" ,python-certifi)
3227 ("python-gevent" ,python-gevent)
3228 ("python-six" ,python-six)))
3229 (home-page "https://github.com/gwik/geventhttpclient")
3230 (synopsis "HTTP client library for gevent")
3231 (description "@code{python-geventhttpclient} is a high performance,
3232 concurrent HTTP client library for python using @code{gevent}.")
3233 (license license:expat)))
3234
3235 (define-public python-requests-oauthlib
3236 (package
3237 (name "python-requests-oauthlib")
3238 (version "1.2.0")
3239 (source
3240 (origin
3241 (method url-fetch)
3242 (uri (pypi-uri "requests-oauthlib" version))
3243 (sha256
3244 (base32
3245 "0mrglgcvq7k48pf27s4gifdk0za8xmgpf55jy15yjj471qrk6rdx"))))
3246 (build-system python-build-system)
3247 (arguments
3248 `(#:phases
3249 (modify-phases %standard-phases
3250 ;; removes tests that require network access
3251 (add-before 'check 'pre-check
3252 (lambda _
3253 (delete-file "tests/test_core.py")
3254 #t)))))
3255 (native-inputs
3256 `(("python-pyjwt" ,python-pyjwt)
3257 ("python-requests-mock" ,python-requests-mock)
3258 ("python-mock" ,python-mock)))
3259 (propagated-inputs
3260 `(("python-oauthlib" ,python-oauthlib)
3261 ("python-requests" ,python-requests)))
3262 (home-page
3263 "https://github.com/requests/requests-oauthlib")
3264 (synopsis
3265 "OAuthlib authentication support for Requests")
3266 (description
3267 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
3268 provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
3269 (license license:isc)))
3270
3271 (define-public python-url
3272 (package
3273 (name "python-url")
3274 (version "0.2.0")
3275 (source (origin
3276 (method url-fetch)
3277 (uri (pypi-uri "url" version))
3278 (sha256
3279 (base32
3280 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
3281 (build-system python-build-system)
3282 (propagated-inputs
3283 `(("python-publicsuffix" ,python-publicsuffix)))
3284 (native-inputs
3285 `(("python-coverage" ,python-coverage)
3286 ("python-nose" ,python-nose)))
3287 (arguments
3288 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
3289 (home-page "https://github.com/seomoz/url-py")
3290 (synopsis "URL Parsing")
3291 (description "Library for parsing urls.")
3292 (license license:expat)
3293 (properties `((python2-variant . ,(delay python2-url))))))
3294
3295 (define-public python2-url
3296 (let ((base (package-with-python2 (strip-python2-variant python-url))))
3297 (package/inherit base
3298 (propagated-inputs
3299 `(("python2-publicsuffix" ,python2-publicsuffix))))))
3300
3301 (define-public python-cachecontrol
3302 (package
3303 (name "python-cachecontrol")
3304 (version "0.12.5")
3305 (source
3306 (origin
3307 (method git-fetch)
3308 ;; Pypi does not have tests.
3309 (uri (git-reference
3310 (url "https://github.com/ionrock/cachecontrol")
3311 (commit (string-append "v" version))))
3312 (file-name (git-file-name name version))
3313 (sha256
3314 (base32
3315 "03lgc65sl04n0cgzmmgg99bk83f9i6k8yrmcd4hpl46q1pymn0kz"))))
3316 (build-system python-build-system)
3317 (arguments
3318 ;; Versions > 0.11.6 depend on CherryPy for testing.
3319 ;; It's too much work to package CherryPy for now.
3320 `(#:tests? #f))
3321 (propagated-inputs
3322 `(("python-requests" ,python-requests)
3323 ("python-msgpack" ,python-msgpack)
3324 ("python-lockfile" ,python-lockfile)))
3325 (home-page "https://github.com/ionrock/cachecontrol")
3326 (synopsis "The httplib2 caching algorithms for use with requests")
3327 (description "CacheControl is a port of the caching algorithms in
3328 @code{httplib2} for use with @code{requests} session objects.")
3329 (license license:asl2.0)))
3330
3331 (define-public python-cachecontrol-0.11
3332 (package
3333 (inherit python-cachecontrol)
3334 (name "python-cachecontrol")
3335 (version "0.11.7")
3336 (source
3337 (origin
3338 (method url-fetch)
3339 (uri (pypi-uri "CacheControl" version))
3340 (sha256
3341 (base32
3342 "07jsfhlbcwgqg6ayz8nznzaqg5rmxqblbzxz1qvg5wc44pcjjy4g"))))))
3343
3344 (define-public python-betamax
3345 (package
3346 (name "python-betamax")
3347 (version "0.8.1")
3348 (source
3349 (origin
3350 (method url-fetch)
3351 (uri (pypi-uri "betamax" version))
3352 (sha256
3353 (base32
3354 "1hki1c2vs7adq7zr56wi6i5bhrkia4s2ywpv2c98ibnczz709w2v"))))
3355 (build-system python-build-system)
3356 (arguments
3357 '(;; Many tests fail because they require networking.
3358 #:tests? #f))
3359 (propagated-inputs
3360 `(("python-requests" ,python-requests)))
3361 (home-page "https://github.com/sigmavirus24/betamax")
3362 (synopsis "Record HTTP interactions with python-requests")
3363 (description "Betamax will record your test suite's HTTP interactions and
3364 replay them during future tests. It is designed to work with python-requests.")
3365 (license license:expat)))
3366
3367 (define-public python2-betamax
3368 (package-with-python2 python-betamax))
3369
3370 (define-public python-betamax-matchers
3371 (package
3372 (name "python-betamax-matchers")
3373 (version "0.4.0")
3374 (source
3375 (origin
3376 (method url-fetch)
3377 (uri (pypi-uri "betamax-matchers" version))
3378 (sha256
3379 (base32
3380 "07qpwjyq2i2aqhz5iwghnj4pqr2ys5n45v1vmpcfx9r5mhwrsq43"))))
3381 (build-system python-build-system)
3382 (propagated-inputs
3383 `(("python-betamax" ,python-betamax)
3384 ("python-requests-toolbelt" ,python-requests-toolbelt)))
3385 (home-page "https://github.com/sigmavirus24/betamax_matchers")
3386 (synopsis "VCR imitation for python-requests")
3387 (description "@code{betamax-matchers} provides a set of Matchers for
3388 Betamax.")
3389 (license license:asl2.0)))
3390
3391 (define-public python2-betamax-matchers
3392 (package-with-python2 python-betamax-matchers))
3393
3394 (define-public python-betamax-serializers
3395 (package
3396 (name "python-betamax-serializers")
3397 (version "0.2.1")
3398 (source
3399 (origin
3400 (method url-fetch)
3401 (uri (pypi-uri "betamax-serializers" version))
3402 (sha256
3403 (base32 "0ja9isbjmzzhxdj69s0kdsvw8nkp073w6an6a4liy5vk3fdl2p1l"))))
3404 (build-system python-build-system)
3405 (propagated-inputs
3406 `(("python-betamax" ,python-betamax)
3407 ("python-pyyaml" ,python-pyyaml)))
3408 (synopsis "Set of third-party serializers for Betamax")
3409 (description "Betamax-Serializers are an experimental set of Serializers for
3410 Betamax that may possibly end up in the main package.")
3411 (home-page "https://gitlab.com/betamax/serializers")
3412 (license license:asl2.0)))
3413
3414 (define-public python-s3transfer
3415 (package
3416 (name "python-s3transfer")
3417 (version "0.5.0")
3418 (source (origin
3419 (method url-fetch)
3420 (uri (pypi-uri "s3transfer" version))
3421 (sha256
3422 (base32
3423 "0k6sc956yrrv9b4laa0r79jhxajpyxr21jcd1ka8m1n53lz85vah"))))
3424 (build-system python-build-system)
3425 (arguments
3426 `(#:phases
3427 (modify-phases %standard-phases
3428 (replace 'check
3429 (lambda* (#:key tests? #:allow-other-keys)
3430 (when tests?
3431 ;; Some of the 'integration' tests require network access or
3432 ;; login credentials.
3433 (invoke "nosetests" "--exclude=integration")))))))
3434 (native-inputs
3435 `(("python-docutils" ,python-docutils)
3436 ("python-mock" ,python-mock)
3437 ("python-nose" ,python-nose)))
3438 (propagated-inputs
3439 `(("python-botocore" ,python-botocore)
3440 ("python-urllib3" ,python-urllib3)))
3441 (synopsis "Amazon S3 Transfer Manager")
3442 (description "S3transfer is a Python library for managing Amazon S3
3443 transfers.")
3444 (home-page "https://github.com/boto/s3transfer")
3445 (license license:asl2.0)
3446 (properties `((python2-variant . ,(delay python2-s3transfer))))))
3447
3448 (define-public python2-s3transfer
3449 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
3450 (package/inherit base
3451 (native-inputs
3452 `(("python2-futures" ,python2-futures)
3453 ,@(package-native-inputs base))))))
3454
3455 (define-public python-slimit
3456 (package
3457 (name "python-slimit")
3458 (version "0.8.1")
3459 (source
3460 (origin
3461 (method url-fetch)
3462 (uri (pypi-uri "slimit" version ".zip"))
3463 (sha256
3464 (base32
3465 "02vj2x728rs1127q2nc27frrqra4fczivnb7gch6n5lzi7pxqczl"))))
3466 (build-system python-build-system)
3467 (native-inputs
3468 `(("unzip" ,unzip)))
3469 (propagated-inputs
3470 `(("python-ply" ,python-ply)))
3471 (home-page "https://slimit.readthedocs.io/")
3472 (synopsis "JavaScript minifier, parser and lexer written in Python")
3473 (description
3474 "SlimIt is a JavaScript minifier written in Python. It compiles
3475 JavaScript into more compact code so that it downloads and runs faster.
3476 SlimIt also provides a library that includes a JavaScript parser, lexer,
3477 pretty printer and a tree visitor.")
3478 (license license:expat)))
3479
3480 (define-public python-flask-restful
3481 (package
3482 (name "python-flask-restful")
3483 (version "0.3.8")
3484 (source
3485 (origin
3486 (method url-fetch)
3487 (uri (pypi-uri "Flask-RESTful" version))
3488 (patches (search-patches "python-flask-restful-werkzeug-compat.patch"))
3489 (sha256
3490 (base32
3491 "05b9lzx5yc3wgml2bcq50lq35h66m8zpj6dc9advcb5z3acsbaay"))))
3492 (build-system python-build-system)
3493 (propagated-inputs
3494 `(("python-aniso8601" ,python-aniso8601)
3495 ("python-flask" ,python-flask)
3496 ("python-pycrypto" ,python-pycrypto)
3497 ("python-pytz" ,python-pytz)))
3498 (native-inputs
3499 `(;; Optional dependency of Flask. Tests need it.
3500 ("python-blinker" ,python-blinker)
3501 ("python-mock" ,python-mock) ; For tests
3502 ("python-nose" ,python-nose))) ;for tests
3503 (home-page
3504 "https://www.github.com/flask-restful/flask-restful/")
3505 (synopsis
3506 "Flask module for creating REST APIs")
3507 (description
3508 "This package contains a Flask module for creating REST APIs.")
3509 (license license:bsd-3)))
3510
3511 (define-public python-flask-basicauth
3512 (package
3513 (name "python-flask-basicauth")
3514 (version "0.2.0")
3515 (source
3516 (origin
3517 (method url-fetch)
3518 (uri (pypi-uri "Flask-BasicAuth" version))
3519 (sha256
3520 (base32
3521 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
3522 (build-system python-build-system)
3523 (arguments
3524 `(#:phases (modify-phases %standard-phases
3525 (add-after 'unpack 'fix-imports
3526 (lambda _
3527 (substitute* '("docs/index.rst"
3528 "docs/conf.py"
3529 "flask_basicauth.py"
3530 "test_basicauth.py")
3531 (("flask\\.ext\\.basicauth")
3532 "flask_basicauth"))
3533 #t)))))
3534 (propagated-inputs
3535 `(("python-flask" ,python-flask)))
3536 (home-page "https://github.com/jpvanhal/flask-basicauth")
3537 (synopsis "HTTP basic access authentication for Flask")
3538 (description
3539 "This package provides HTTP basic access authentication for Flask.")
3540 (license license:bsd-3)))
3541
3542 (define-public python-flask-htpasswd
3543 (package
3544 (name "python-flask-htpasswd")
3545 (version "0.3.1")
3546 (source
3547 (origin
3548 (method url-fetch)
3549 (uri (pypi-uri "flask-htpasswd" version))
3550 (sha256
3551 (base32
3552 "14q1y1y9i9bhabdnwd25jqzc4ljli23smxfyyh8abxz1vq93pxra"))))
3553 (build-system python-build-system)
3554 (propagated-inputs
3555 `(("python-flask" ,python-flask)
3556 ("python-itsdangerous" ,python-itsdangerous)
3557 ("python-passlib" ,python-passlib)
3558 ("python-tox" ,python-tox)))
3559 (home-page "https://github.com/carsongee/flask-htpasswd")
3560 (synopsis "Basic authentication via htpasswd files in Flask applications")
3561 (description "This package provides Basic authentication via
3562 @file{htpasswd} files and access_token authentication in Flask
3563 applications.")
3564 (license license:bsd-3)))
3565
3566 (define-public python-flask-sqlalchemy
3567 (package
3568 (name "python-flask-sqlalchemy")
3569 (version "2.5.1")
3570 (source (origin
3571 (method url-fetch)
3572 (uri (pypi-uri "Flask-SQLAlchemy" version))
3573 (sha256
3574 (base32
3575 "04jrx4sjrz1b20j38qk4qin975xwz30krzq59rfv3b3w7ss49nib"))))
3576 (build-system python-build-system)
3577 (propagated-inputs
3578 `(("python-flask" ,python-flask)
3579 ("python-sqlalchemy" ,python-sqlalchemy)))
3580 (home-page "https://github.com/mitsuhiko/flask-sqlalchemy")
3581 (synopsis "Module adding SQLAlchemy support to your Flask application")
3582 (description
3583 "This package adds SQLAlchemy support to your Flask application.")
3584 (license license:bsd-3)))
3585
3586 (define-public python-flask-restplus
3587 (package
3588 (name "python-flask-restplus")
3589 (version "0.9.2")
3590 (source
3591 (origin
3592 (method url-fetch)
3593 (uri (pypi-uri "flask-restplus" version))
3594 (sha256
3595 (base32
3596 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
3597 (build-system python-build-system)
3598 (arguments
3599 '(#:tests? #f)) ; FIXME: 35/882 tests failing.
3600 ;; #:phases
3601 ;; (modify-phases %standard-phases
3602 ;; (replace 'check
3603 ;; (lambda _
3604 ;; (invoke "nosetests")
3605 ;; #t)))))
3606 (propagated-inputs
3607 `(("python-aniso8601" ,python-aniso8601)
3608 ("python-flask" ,python-flask)
3609 ("python-jsonschema" ,python-jsonschema)
3610 ("python-pytz" ,python-pytz)
3611 ("python-six" ,python-six)))
3612 (native-inputs
3613 `(("python-tzlocal" ,python-tzlocal)
3614 ("python-blinker" ,python-blinker)
3615 ("python-nose" ,python-nose)
3616 ("python-rednose" ,python-rednose)))
3617 (home-page "https://github.com/noirbizarre/flask-restplus")
3618 (synopsis "Framework for documented API development with Flask")
3619 (description "This package provides a framework for API development with
3620 the Flask web framework in Python. It is similar to package
3621 @code{python-flask-restful} but supports the @code{python-swagger}
3622 documentation builder.")
3623 (license license:expat)))
3624
3625 (define-public python-flask-restful-swagger
3626 (package
3627 (name "python-flask-restful-swagger")
3628 (version "0.20.1")
3629 (source
3630 (origin
3631 (method url-fetch)
3632 (uri (pypi-uri "flask-restful-swagger" version))
3633 (sha256
3634 (base32
3635 "1p66f98b5zpypnnz56pxpbirchqj6aniw6qyrp8h572l0dn9xlvq"))))
3636 (build-system python-build-system)
3637 (arguments '(#:tests? #f)) ;no tests
3638 (propagated-inputs
3639 `(("python-flask-restful" ,python-flask-restful)))
3640 (home-page "https://github.com/rantav/flask-restful-swagger")
3641 (synopsis "Extract Swagger specs from Flask-Restful projects")
3642 (description "This package lets you extract Swagger API documentation
3643 specs from your Flask-Restful projects.")
3644 (license license:expat)))
3645
3646 (define-public python-htmlmin
3647 (package
3648 (name "python-htmlmin")
3649 (version "0.1.12")
3650 (source
3651 (origin
3652 (method url-fetch)
3653 (uri (pypi-uri "htmlmin" version))
3654 (sha256
3655 (base32
3656 "0y51xhabw6x8jk8k93xl8vznshpz3jb6l28075r5sjip613fzhah"))))
3657 (arguments
3658 `(#:tests? #f)) ; no tests
3659 (build-system python-build-system)
3660 (home-page "https://htmlmin.readthedocs.org/en/latest/")
3661 (synopsis "HTML minifier")
3662 (description "@code{htmlmin} is an HTML minifier that just works.
3663 It comes with safe defaults and easily configurable options.")
3664 (license license:bsd-3)))
3665
3666 (define-public python2-htmlmin
3667 (package-with-python2 python-htmlmin))
3668
3669 (define-public python-flask-htmlmin
3670 (package
3671 (name "python-flask-htmlmin")
3672 (version "1.2")
3673 (source
3674 (origin
3675 (method url-fetch)
3676 (uri (pypi-uri "Flask-HTMLmin" version))
3677 (sha256
3678 (base32
3679 "1n6zlq72kakkw0z2jpq6nh74lfsmxybm4g053pwhc14fbr809348"))))
3680 (propagated-inputs
3681 `(("python-flask" ,python-flask)
3682 ("python-htmlmin" ,python-htmlmin)))
3683 (build-system python-build-system)
3684 (home-page "https://github.com/hamidfzm/Flask-HTMLmin")
3685 (synopsis "HTML response minifier for Flask")
3686 (description
3687 "Minify @code{text/html} MIME type responses when using @code{Flask}.")
3688 (license license:bsd-3)))
3689
3690 (define-public python-jsmin
3691 (package
3692 (name "python-jsmin")
3693 (version "2.2.2")
3694 (source
3695 (origin
3696 (method url-fetch)
3697 (uri (pypi-uri "jsmin" version))
3698 (sha256
3699 (base32
3700 "0fsmqbjvpxvff0984x7c0y8xmf49ax9mncz48b9xjx8wrnr9kpxn"))))
3701 (build-system python-build-system)
3702 (home-page "https://github.com/tikitu/jsmin/")
3703 (synopsis "Python JavaScript minifier")
3704 (description
3705 "@code{jsmin} is a JavaScript minifier, usable from both Python code and
3706 on the command line.")
3707 (license license:expat)))
3708
3709 (define-public python-flask-login
3710 (package
3711 (name "python-flask-login")
3712 (version "0.5.0")
3713 (source
3714 (origin
3715 (method git-fetch)
3716 (uri (git-reference
3717 (url "https://github.com/maxcountryman/flask-login")
3718 (commit version)))
3719 (file-name (git-file-name name version))
3720 (sha256
3721 (base32 "11ac924w0y4m0kf3mxnxdlidy88jfa7njw5yyrq16dvnx4iwd8gg"))))
3722 (build-system python-build-system)
3723 (propagated-inputs
3724 `(("python-flask" ,python-flask)))
3725 (native-inputs
3726 ;; For tests.
3727 `(("python-blinker" ,python-blinker)
3728 ("python-coverage" ,python-coverage)
3729 ("python-mock" ,python-mock)
3730 ("python-pycodestyle" ,python-pycodestyle)
3731 ("python-pyflakes" ,python-pyflakes)
3732 ("python-pytest" ,python-pytest)
3733 ("python-semantic-version" ,python-semantic-version)
3734 ("python-werkzeug" ,python-werkzeug)))
3735 (home-page "https://github.com/maxcountryman/flask-login")
3736 (synopsis "User session management for Flask")
3737 (description
3738 "@code{Flask-Login} provides user session management for Flask. It
3739 handles the common tasks of logging in, logging out, and remembering your
3740 users' sessions over extended periods of time.")
3741 (license license:expat)))
3742
3743 (define-public python-oauth2client
3744 (package
3745 (name "python-oauth2client")
3746 (version "4.0.0")
3747 (source
3748 (origin
3749 (method url-fetch)
3750 (uri (pypi-uri "oauth2client" version))
3751 (sha256
3752 (base32
3753 "1irqqap2zibysf8dba8sklfqikia579srd0phm5n754ni0h59gl0"))))
3754 (build-system python-build-system)
3755 (arguments
3756 `(#:tests? #f))
3757 (propagated-inputs
3758 `(("python-httplib2" ,python-httplib2)
3759 ("python-pyasn1" ,python-pyasn1)
3760 ("python-pyasn1-modules" ,python-pyasn1-modules)
3761 ("python-rsa" ,python-rsa)
3762 ("python-six" ,python-six)))
3763 (home-page "https://github.com/google/oauth2client/")
3764 (synopsis "OAuth 2.0 client library")
3765 (description "@code{python-oauth2client} provides an OAuth 2.0 client
3766 library for Python")
3767 (license license:asl2.0)))
3768
3769 (define-public python2-oauth2client
3770 (package-with-python2 python-oauth2client))
3771
3772 (define-public python-flask-oidc
3773 (package
3774 (name "python-flask-oidc")
3775 (version "1.1.1")
3776 (source
3777 (origin
3778 (method url-fetch)
3779 (uri (pypi-uri "flask-oidc" version))
3780 (sha256
3781 (base32
3782 "1ay5j0mf174bix7i67hclr95gv16z81fpx0dijvi0gydvdj3ddy2"))))
3783 (build-system python-build-system)
3784 (propagated-inputs
3785 `(("python-flask" ,python-flask)
3786 ("python-itsdangerous" ,python-itsdangerous)
3787 ("python-oauth2client" ,python-oauth2client)
3788 ("python-six" ,python-six)))
3789 (native-inputs
3790 `(("python-nose" ,python-nose)
3791 ("python-mock" ,python-mock)))
3792 (home-page "https://github.com/puiterwijk/flask-oidc")
3793 (synopsis "OpenID Connect extension for Flask")
3794 (description "@code{python-flask-oidc} provides an OpenID Connect extension
3795 for Flask.")
3796 (license license:bsd-2)))
3797
3798 (define-public python-webassets
3799 (package
3800 (name "python-webassets")
3801 (version "2.0")
3802 (source
3803 (origin
3804 (method url-fetch)
3805 (uri (pypi-uri "webassets" version))
3806 (sha256
3807 (base32
3808 "1kc1042jydgk54xpgcp0r1ib4gys91nhy285jzfcxj3pfqrk4w8n"))))
3809 (build-system python-build-system)
3810 (arguments
3811 '(#:phases (modify-phases %standard-phases
3812 (add-before 'check 'disable-some-tests
3813 (lambda _
3814 ;; This test requires 'postcss' and 'babel' which are
3815 ;; not yet available in Guix.
3816 (delete-file "tests/test_filters.py")
3817 #t))
3818 (replace 'check
3819 (lambda _
3820 (setenv "PYTHONPATH"
3821 (string-append "./build/lib:"
3822 (getenv "PYTHONPATH")))
3823 (invoke "pytest" "-vv"))))))
3824 (native-inputs
3825 `(("python-jinja2" ,python-jinja2)
3826 ("python-mock" ,python-mock)
3827 ("python-nose" ,python-nose)
3828 ("python-pytest" ,python-pytest)))
3829 (home-page "https://github.com/miracle2k/webassets")
3830 (synopsis "Media asset management")
3831 (description "Merges, minifies and compresses Javascript and CSS files,
3832 supporting a variety of different filters, including YUI, jsmin, jspacker or
3833 CSS tidy. Also supports URL rewriting in CSS files.")
3834 (license license:bsd-2)))
3835
3836 (define-public python-cssmin
3837 (package
3838 (name "python-cssmin")
3839 (version "0.2.0")
3840 (source
3841 (origin
3842 (method url-fetch)
3843 (uri (pypi-uri "cssmin" version))
3844 (sha256
3845 (base32
3846 "1dk723nfm2yf8cp4pj785giqlwv42l0kj8rk40kczvq1hk6g04p0"))))
3847 (build-system python-build-system)
3848 (home-page "https://github.com/zacharyvoase/cssmin")
3849 (synopsis "Python port of the YUI CSS Compressor")
3850 (description "Python port of the YUI CSS Compressor.")
3851 (license (list license:expat license:bsd-3))))
3852
3853 (define-public python2-cssmin
3854 (package-with-python2 python-cssmin))
3855
3856 (define-public python-elasticsearch
3857 (package
3858 (name "python-elasticsearch")
3859 (version "7.13.4")
3860 (source
3861 (origin
3862 (method url-fetch)
3863 (uri (pypi-uri "elasticsearch" version))
3864 (sha256
3865 (base32
3866 "1q38w9nh2j2yi82d8rhzb57597l4lq5zx7xzfg45xf7ffrgsipaj"))))
3867 (build-system python-build-system)
3868 (propagated-inputs
3869 `(("python-certifi" ,python-certifi)
3870 ("python-urllib3" ,python-urllib3)))
3871 (arguments
3872 ;; tests require the test_elasticsearch module but it is not distributed.
3873 `(#:tests? #f))
3874 (home-page "https://github.com/elastic/elasticsearch-py")
3875 (synopsis "Low-level client for Elasticsearch")
3876 (description "Official low-level client for Elasticsearch. Its goal is to
3877 provide common ground for all Elasticsearch-related code in Python; because of
3878 this it tries to be opinion-free and very extendable.")
3879 (license license:expat)))
3880
3881 (define-public python2-elasticsearch
3882 (package-with-python2 python-elasticsearch))
3883
3884 (define-public python-engineio
3885 (package
3886 (name "python-engineio")
3887 (version "4.0.1")
3888 (source
3889 (origin
3890 (method url-fetch)
3891 (uri (pypi-uri "python-engineio" version))
3892 (sha256
3893 (base32
3894 "0xqkjjxbxakz9fd7v94rkr2r5r9nrkap2c3gf3abbd0j6ld5qmxv"))))
3895 (build-system python-build-system)
3896 (propagated-inputs
3897 `(("python-aiohttp" ,python-aiohttp)
3898 ("python-requests" ,python-requests)
3899 ("python-websocket-client" ,python-websocket-client)))
3900 (arguments '(#:tests? #f)) ; Tests not included in release tarball.
3901 (home-page "https://github.com/miguelgrinberg/python-engineio/")
3902 (synopsis "Engine.IO server")
3903 (description "Python implementation of the Engine.IO realtime client and
3904 server.")
3905 (license license:expat)))
3906
3907 (define-public python-flask-script
3908 (package
3909 (name "python-flask-script")
3910 (version "2.0.6")
3911 (source
3912 (origin
3913 (method url-fetch)
3914 (uri (pypi-uri "Flask-Script" version))
3915 (sha256
3916 (base32
3917 "0r8w2v89nj6b9p91p495cga5m72a673l2wc0hp0zqk05j4yrc9b4"))))
3918 (build-system python-build-system)
3919 (arguments
3920 `(#:phases
3921 (modify-phases %standard-phases
3922 (add-after 'unpack 'patch-tests
3923 (lambda _
3924 (substitute* "tests.py"
3925 (("flask\\.ext\\.script") "flask_script"))
3926 #t)))))
3927 (propagated-inputs
3928 `(("python-flask" ,python-flask)
3929 ("python-argcomplete" ,python-argcomplete)
3930 ("python-werkzeug" ,python-werkzeug)))
3931 (native-inputs
3932 `(("python-pytest" ,python-pytest)))
3933 (home-page
3934 "https://github.com/smurfix/flask-script")
3935 (synopsis "Scripting support for Flask")
3936 (description "The Flask-Script extension provides support for writing
3937 external scripts in Flask. This includes running a development server,
3938 a customised Python shell, scripts to set up your database, cronjobs,
3939 and other command-line tasks that belong outside the web application
3940 itself.")
3941 (license license:bsd-3)))
3942
3943 (define-public python-flask-migrate
3944 (package
3945 (name "python-flask-migrate")
3946 (version "2.5.3")
3947 (source
3948 (origin
3949 (method url-fetch)
3950 (uri (pypi-uri "Flask-Migrate" version))
3951 (sha256
3952 (base32
3953 "1vip9ww6l18dxffjsggm83k71zkvihxpnhaswpv8klh95s6517d6"))))
3954 (build-system python-build-system)
3955 (propagated-inputs
3956 `(("python-flask" ,python-flask)
3957 ("python-alembic" ,python-alembic)
3958 ("python-sqlalchemy" ,python-sqlalchemy)
3959 ("python-flask-script" ,python-flask-script)
3960 ("python-flask-sqlalchemy" ,python-flask-sqlalchemy)))
3961 (home-page "https://github.com/miguelgrinberg/flask-migrate/")
3962 (synopsis "SQLAlchemy database migrations for Flask programs using
3963 Alembic")
3964 (description "This package contains SQLAlchemy database migration tools
3965 for Flask programs that are using @code{python-alembic}.")
3966 (license license:expat)))
3967
3968 (define-public python-genshi
3969 (package
3970 (name "python-genshi")
3971 (version "0.7.5")
3972 (source
3973 (origin
3974 (method git-fetch)
3975 (uri (git-reference
3976 (url "https://github.com/edgewall/genshi")
3977 (commit version)))
3978 (file-name (git-file-name name version))
3979 (sha256
3980 (base32 "04i0caywiwrgw09grz988n15qr9lr31d9n6a529p8v80cy1fv23c"))))
3981 (propagated-inputs
3982 `(("python-six" ,python-six)))
3983 (build-system python-build-system)
3984 (home-page "https://genshi.edgewall.org/")
3985 (synopsis "Toolkit for generation of output for the web")
3986 (description "Genshi is a Python library that provides an integrated set
3987 of components for parsing, generating, and processing HTML, XML or other
3988 textual content for output generation on the web.")
3989 (license license:bsd-3)))
3990
3991 (define-public python2-genshi
3992 (package-with-python2 python-genshi))
3993
3994 (define-public python-flask-principal
3995 (package
3996 (name "python-flask-principal")
3997 (version "0.4.0")
3998 (source
3999 (origin
4000 (method url-fetch)
4001 (uri (pypi-uri "Flask-Principal" version))
4002 (sha256
4003 (base32
4004 "0lwlr5smz8vfm5h9a9i7da3q1c24xqc6vm9jdywdpgxfbi5i7mpm"))))
4005 (build-system python-build-system)
4006 (propagated-inputs
4007 `(("python-blinker" ,python-blinker)))
4008 (native-inputs
4009 `(("python-flask" ,python-flask)
4010 ("python-nose" ,python-nose)))
4011 (home-page "https://pythonhosted.org/Flask-Principal/")
4012 (synopsis "Identity management for Flask")
4013 (description "@code{flask_principal} is a identity management library for
4014 Flask. It supports managing both authentication and authorization data in a
4015 thread-local variable.")
4016 (license license:expat)))
4017
4018 (define-public python-flask-httpauth
4019 (package
4020 (name "python-flask-httpauth")
4021 (version "3.2.3")
4022 (source
4023 (origin
4024 (method url-fetch)
4025 (uri (pypi-uri "Flask-HTTPAuth" version))
4026 (sha256
4027 (base32
4028 "13gff5w1mqpzm5nccyg02v3ifb9ifqh5k866cssjhghhg6msfjsz"))))
4029 (build-system python-build-system)
4030 (native-inputs
4031 `(("python-flask" ,python-flask)))
4032 (home-page "https://github.com/miguelgrinberg/flask-httpauth/")
4033 (synopsis "Basic and Digest HTTP authentication for Flask routes")
4034 (description "@code{flask_httpauth} provides Basic and Digest HTTP
4035 authentication for Flask routes.")
4036 (license license:expat)))
4037
4038 (define-public python-uritemplate
4039 (package
4040 (name "python-uritemplate")
4041 (version "4.1.1")
4042 (source
4043 (origin
4044 (method url-fetch)
4045 (uri (pypi-uri "uritemplate" version))
4046 (sha256
4047 (base32
4048 "1w14a775d92mx9pdhb5zimifpfr2lfcn0vfdpjagcy9vbkyfsij3"))))
4049 (build-system python-build-system)
4050 (home-page "https://uritemplate.readthedocs.org")
4051 (synopsis "Library to deal with URI Templates")
4052 (description "@code{uritemplate} provides Python library to deal with URI
4053 Templates.")
4054 ;; The software is made available under the terms of *either* of the
4055 ;; licenses found in LICENSE.APACHE or LICENSE.BSD. Contributions
4056 ;; are made under *both* licenses (excerpt from the LICENSE file).
4057 (license (list license:bsd-2 license:asl2.0))))
4058
4059 (define-public python-publicsuffix
4060 (package
4061 (name "python-publicsuffix")
4062 (version "1.1.0")
4063 (source (origin
4064 (method url-fetch)
4065 (uri (pypi-uri "publicsuffix" version))
4066 (sha256
4067 (base32
4068 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
4069 (build-system python-build-system)
4070 (arguments
4071 `(#:tests? #f)) ; tests use the internet
4072 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
4073 (synopsis "Get suffix for a domain name")
4074 (description "Get a public suffix for a domain name using the Public Suffix
4075 List.")
4076 (license license:expat)))
4077
4078 (define-public python2-publicsuffix
4079 (package-with-python2 python-publicsuffix))
4080
4081 (define-public python-publicsuffix2
4082 (package
4083 (name "python-publicsuffix2")
4084 (version "2.20191221")
4085 (source
4086 (origin
4087 (method url-fetch)
4088 (uri (pypi-uri "publicsuffix2" version))
4089 (sha256
4090 (base32 "0yzysvfj1najr1mb4pcqrbmjir3xpb69rlffln95a3cdm8qwry00"))))
4091 (build-system python-build-system)
4092 (arguments
4093 '(#:phases
4094 (modify-phases %standard-phases
4095 (add-after 'unpack 'ignore-maintainer-inputs
4096 (lambda _
4097 ;; Comment out a demand for python-requests, which is used only by
4098 ;; the unused ‘update_psl’ helper command.
4099 (substitute* "setup.py"
4100 (("'requests " match)
4101 (format #f "# ~a" match)))
4102 #t)))
4103 #:tests? #f)) ; the test suite requires network access
4104 (home-page "https://github.com/pombredanne/python-publicsuffix2")
4105 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
4106 (description "Get a public suffix for a domain name using the Public Suffix
4107 List. Forked from and using the same API as the publicsuffix package.")
4108 (license (list license:expat license:mpl2.0))))
4109
4110 (define-public python2-publicsuffix2
4111 (package-with-python2 python-publicsuffix2))
4112
4113 (define-public python-werkzeug
4114 (package
4115 (name "python-werkzeug")
4116 (version "1.0.1")
4117 (source
4118 (origin
4119 (method url-fetch)
4120 (uri (pypi-uri "Werkzeug" version))
4121 (sha256
4122 (base32
4123 "0z74sa1xw5h20yin9faj0vvdbq713cgbj84klc72jr9nmpjv303c"))))
4124 (build-system python-build-system)
4125 (arguments
4126 '(#:phases
4127 (modify-phases %standard-phases
4128 (delete 'check)
4129 (add-after 'install 'check
4130 (lambda* (#:key inputs outputs #:allow-other-keys)
4131 (add-installed-pythonpath inputs outputs)
4132 (invoke "python" "-m" "pytest"))))))
4133 (propagated-inputs
4134 `(("python-requests" ,python-requests)))
4135 (native-inputs
4136 `(("python-pytest" ,python-pytest)
4137 ("python-pytest-timeout" ,python-pytest-timeout)))
4138 (home-page "https://palletsprojects.com/p/werkzeug/")
4139 (synopsis "Utilities for WSGI applications")
4140 (description "One of the most advanced WSGI utility modules. It includes a
4141 powerful debugger, full-featured request and response objects, HTTP utilities to
4142 handle entity tags, cache control headers, HTTP dates, cookie handling, file
4143 uploads, a powerful URL routing system and a bunch of community-contributed
4144 addon modules.")
4145 (license license:x11)))
4146
4147 (define-public python-bottle
4148 (package
4149 (name "python-bottle")
4150 (version "0.12.19")
4151 (source
4152 (origin
4153 (method url-fetch)
4154 (uri (pypi-uri "bottle" version))
4155 (sha256
4156 (base32 "0b6s50vc4iad97b6bb3xnyrgajb3nj6n6jbr5p54a4vapky3zmx9"))))
4157 (build-system python-build-system)
4158 (home-page "https://bottlepy.org/")
4159 (synopsis "WSGI framework for small web-applications.")
4160 (description "@code{python-bottle} is a WSGI framework for small web-applications.")
4161 (license license:expat)))
4162
4163 (define-public python2-bottle
4164 (package-with-python2 python-bottle))
4165
4166 (define-public python-wtforms
4167 (package
4168 (name "python-wtforms")
4169 (version "2.3.3")
4170 (source
4171 (origin
4172 (method url-fetch)
4173 (uri (pypi-uri "WTForms" version))
4174 (sha256
4175 (base32
4176 "17427m7p9nn9byzva697dkykykwcp2br3bxvi8vciywlmkh5s6c1"))))
4177 (build-system python-build-system)
4178 (arguments
4179 `(#:phases
4180 (modify-phases %standard-phases
4181 (add-after 'unpack 'delete-bundled-test
4182 (lambda _
4183 ;; Delete test copied from a third party package that fails
4184 ;; with newer SQLAlchemy. This can be removed for 3.0.
4185 ;; See <https://github.com/wtforms/wtforms/issues/696>.
4186 (delete-file "tests/ext_sqlalchemy.py")))
4187 (replace 'check
4188 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4189 (when tests?
4190 (add-installed-pythonpath inputs outputs)
4191 (invoke "python" "setup.py" "compile_catalog")
4192 (invoke "python" "tests/runtests.py")))))))
4193 (native-inputs
4194 `(("python-dateutil" ,python-dateutil)
4195 ("python-sqlalchemy" ,python-sqlalchemy)))
4196 (propagated-inputs
4197 `(("python-babel" ,python-babel)
4198 ("python-email-validator" ,python-email-validator)
4199 ("python-markupsafe" ,python-markupsafe)))
4200 (home-page "http://wtforms.simplecodes.com/")
4201 (synopsis
4202 "Form validation and rendering library for Python web development")
4203 (description
4204 "WTForms is a flexible forms validation and rendering library
4205 for Python web development. It is very similar to the web form API
4206 available in Django, but is a standalone package.")
4207 (license license:bsd-3)))
4208
4209 (define-public python-paste
4210 (package
4211 (name "python-paste")
4212 (version "3.0.6")
4213 (source
4214 (origin
4215 (method url-fetch)
4216 (uri (pypi-uri "Paste" version))
4217 (sha256
4218 (base32
4219 "14lbi9asn5agsdf7r97prkjpz7amgmp529lbvfhf0nv881xczah6"))
4220 (patches (search-patches "python-paste-remove-timing-test.patch"))
4221 (modules '((guix build utils)))
4222 (snippet
4223 '(begin
4224 ;; This test calls out to the internet.
4225 (delete-file "tests/test_proxy.py") #t))))
4226 (build-system python-build-system)
4227 (native-inputs
4228 `(("python-pytest" ,python-pytest)
4229 ("python-pytest-runner" ,python-pytest-runner)
4230 ("python-nose" ,python-nose)))
4231 (propagated-inputs
4232 `(("python-six" ,python-six)))
4233 (home-page "https://pythonpaste.readthedocs.io/")
4234 (synopsis
4235 "Python web development tools, focusing on WSGI")
4236 (description
4237 "Paste provides a variety of web development tools and middleware which
4238 can be nested together to build web applications. Paste's design closely
4239 follows ideas flowing from WSGI (Web Standard Gateway Interface).")
4240 (license license:expat)))
4241
4242 (define-public python2-paste
4243 (package-with-python2 python-paste))
4244
4245 (define-public python-pastescript
4246 (package
4247 (name "python-pastescript")
4248 (version "2.0.2")
4249 (source
4250 (origin
4251 (method url-fetch)
4252 (uri (pypi-uri "PasteScript" version))
4253 (sha256
4254 (base32
4255 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
4256 (build-system python-build-system)
4257 (native-inputs
4258 `(("python-nose" ,python-nose)))
4259 (propagated-inputs
4260 `(("python-paste" ,python-paste)
4261 ("python-pastedeploy" ,python-pastedeploy)))
4262 (home-page (string-append "https://web.archive.org/web/20161025192515/"
4263 "http://pythonpaste.org/script/"))
4264 (arguments
4265 '(;; Unfortunately, this requires the latest unittest2,
4266 ;; but that requires traceback2 which requires linecache2 which requires
4267 ;; unittest2. So we're skipping tests for now.
4268 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
4269 ;; so in theory we could get around this situation somehow.)
4270 #:tests? #f))
4271 (synopsis
4272 "Pluggable command line tool for serving web applications and more")
4273 (description
4274 "PasteScript is a plugin-friendly command line tool which provides a
4275 variety of features, from launching web applications to bootstrapping project
4276 layouts.")
4277 (license license:expat)))
4278
4279 (define-public python2-pastescript
4280 (package-with-python2 python-pastescript))
4281
4282 (define-public python2-urlgrabber
4283 (package
4284 (name "python2-urlgrabber")
4285 (version "3.10.2")
4286 (source
4287 (origin
4288 (method url-fetch)
4289 (uri (pypi-uri "urlgrabber" version))
4290 (sha256
4291 (base32 "0w1h7hlsq406bxfy2pn4i9bd003bwl0q9b7p03z3g6yl0d21ddq5"))))
4292 (build-system python-build-system)
4293 (arguments `(#:python ,python-2)) ; urlgrabber supports python2 only
4294 (home-page "http://urlgrabber.baseurl.org")
4295 (synopsis "High-level cross protocol url-grabber")
4296 (description "@code{urlgrabber} is Python2 library that unifies access to
4297 files available on web, FTP or locally. It supports HTTP, FTP and file://
4298 protocols, it supports features like HTTP keep-alive, reget, throttling and
4299 more.")
4300 (license license:lgpl2.1+)))
4301
4302 (define-public python-pycares
4303 (package
4304 (name "python-pycares")
4305 (version "2.3.0")
4306 (source
4307 (origin
4308 (method url-fetch)
4309 (uri (pypi-uri "pycares" version))
4310 (sha256
4311 (base32
4312 "0h4fxw5drrhfyslzmfpljk0qnnpbhhb20hnnndzahhbwylyw1x1n"))))
4313 (build-system python-build-system)
4314 (arguments
4315 `(#:tests? #f)) ;tests require internet access
4316 (home-page "https://github.com/saghul/pycares")
4317 (synopsis "Python interface for @code{c-ares}")
4318 (description "@code{pycares} is a Python module which provides an
4319 interface to @code{c-ares}, a C library that performs DNS requests and
4320 name resolutions asynchronously.")
4321 (license license:expat)))
4322
4323 (define-public python-yarl
4324 (package
4325 (name "python-yarl")
4326 (version "1.1.1")
4327 (source
4328 (origin
4329 (method url-fetch)
4330 (uri (pypi-uri "yarl" version))
4331 (sha256
4332 (base32
4333 "1s6z13g8vgxfkkqwhn6imnm7pl7ky9arv4jygnn6bcndcbidg7d6"))))
4334 (build-system python-build-system)
4335 (native-inputs
4336 `(("python-pytest" ,python-pytest)
4337 ("python-pytest-runner" ,python-pytest-runner)))
4338 (propagated-inputs
4339 `(("python-idna" ,python-idna)
4340 ("python-multidict" ,python-multidict)))
4341 (home-page "https://github.com/aio-libs/yarl/")
4342 (synopsis "Yet another URL library")
4343 (description "@code{yarl} module provides handy @code{URL} class
4344 for URL parsing and changing.")
4345 (license license:asl2.0)))
4346
4347 (define-public python-google
4348 (package
4349 (name "python-google")
4350 (version "3.0.0")
4351 (source (origin
4352 (method url-fetch)
4353 (uri (pypi-uri "google" version))
4354 (sha256
4355 (base32
4356 "1gncv3l11za0mpxvmpaf5n5j3jzp282rz62yml4ha4z55q930d8l"))))
4357 (build-system python-build-system)
4358 (arguments
4359 `(#:tests? #f)) ; There are no tests.
4360 (home-page "https://breakingcode.wordpress.com/")
4361 (synopsis "Python bindings to the Google search engine")
4362 (description "This package provides Python bindings for using the
4363 Google search engine. Its module is called @code{googlesearch}.")
4364 (license license:bsd-3)))
4365
4366 (define-public python-google-api-client
4367 (package
4368 (name "python-google-api-client")
4369 (version "1.6.7")
4370 (source
4371 (origin
4372 (method url-fetch)
4373 (uri (pypi-uri "google-api-python-client" version))
4374 (sha256
4375 (base32
4376 "1wpbbbxfpy9mwxdy3kn352cb590ladv574j1aa2l4grjdqw3ln05"))))
4377 (build-system python-build-system)
4378 (arguments
4379 '(#:tests? #f)) ; tests require internet access
4380 (native-inputs
4381 `(("python-httplib2" ,python-httplib2)
4382 ("python-six" ,python-six)
4383 ("python-oauth2client" ,python-oauth2client)
4384 ("python-uritemplate" ,python-uritemplate)))
4385 (home-page "https://github.com/google/google-api-python-client")
4386 (synopsis "Core Python library for accessing Google APIs")
4387 (description "Python client library for Google's discovery based APIs")
4388 (license license:asl2.0)))
4389
4390 (define-public python-hawkauthlib
4391 (package
4392 (name "python-hawkauthlib")
4393 (version "2.0.0")
4394 (source
4395 (origin
4396 (method url-fetch)
4397 (uri (pypi-uri "hawkauthlib" version))
4398 (sha256
4399 (base32
4400 "03ai47s4h8nfnrf25shbfvkm1b9n1ccd4nmmj280sg1fayi69zgg"))))
4401 (build-system python-build-system)
4402 (propagated-inputs
4403 `(("python-requests" ,python-requests)
4404 ("python-webob" ,python-webob)))
4405 (home-page "https://github.com/mozilla-services/hawkauthlib")
4406 (synopsis "Hawk Access Authentication protocol")
4407 (description
4408 "This is a low-level Python library for implementing Hawk Access Authentication,
4409 a simple HTTP request-signing scheme.")
4410 (license license:mpl2.0)))
4411
4412 (define-public python-pybrowserid
4413 (package
4414 (name "python-pybrowserid")
4415 (version "0.14.0")
4416 (source
4417 (origin
4418 (method url-fetch)
4419 (uri (pypi-uri "PyBrowserID" version))
4420 (sha256
4421 (base32
4422 "1qvi79kfb8x9kxkm5lw2mp42hm82cpps1xknmsb5ghkwx1lpc8kc"))))
4423 (build-system python-build-system)
4424 (propagated-inputs
4425 `(("python-requests" ,python-requests)))
4426 (native-inputs
4427 `(("python-mock" ,python-mock)))
4428 (home-page "https://github.com/mozilla/PyBrowserID")
4429 (synopsis "Python library for the BrowserID protocol")
4430 (description
4431 "This is a Python client library for the BrowserID protocol that
4432 underlies Mozilla Persona.")
4433 (license license:mpl2.0)))
4434
4435 (define-public python-pyfxa
4436 (package
4437 (name "python-pyfxa")
4438 (version "0.6.0")
4439 (source
4440 (origin
4441 (method url-fetch)
4442 (uri (pypi-uri "PyFxA" version))
4443 (sha256
4444 (base32
4445 "0axl16fyrz2r88gnw4b12mk7dpkqscv8c4wsc1y5hicl7bsbc4fm"))))
4446 (build-system python-build-system)
4447 (arguments '(#:tests? #f)) ; 17 tests require network access
4448 (propagated-inputs
4449 `(("python-cryptography" ,python-cryptography)
4450 ("python-hawkauthlib" ,python-hawkauthlib)
4451 ("python-pybrowserid" ,python-pybrowserid)
4452 ("python-requests" ,python-requests)
4453 ("python-six" ,python-six)))
4454 (native-inputs
4455 `(("python-grequests" ,python-grequests)
4456 ("python-mock" ,python-mock)
4457 ("python-responses" ,python-responses)
4458 ("python-unittest2" ,python-unittest2)))
4459 (home-page "https://github.com/mozilla/PyFxA")
4460 (synopsis "Firefox Accounts client library for Python")
4461 (description
4462 "This is a Python library for interacting with the Firefox Accounts
4463 ecosystem.")
4464 (license license:mpl2.0)))
4465
4466 (define-public python-hyperlink
4467 (package
4468 (name "python-hyperlink")
4469 (version "19.0.0")
4470 (source
4471 (origin
4472 (method url-fetch)
4473 (uri (pypi-uri "hyperlink" version))
4474 (sha256
4475 (base32
4476 "0m2nhi0j8wmgfscf974wd5v1xfq8mah286hil6npy1ys0m3y7222"))))
4477 (build-system python-build-system)
4478 (propagated-inputs
4479 `(("python-idna" ,python-idna)))
4480 (home-page "https://github.com/python-hyper/hyperlink")
4481 (synopsis "Python module to create immutable URLs according to spec")
4482 (description "This package provides a Python module to create immutable, and
4483 correct URLs for Python according to RFCs 3986 and 3987.")
4484 (license license:expat)))
4485
4486 (define-public python-treq
4487 (package
4488 (name "python-treq")
4489 (version "18.6.0")
4490 (source
4491 (origin
4492 (method url-fetch)
4493 (uri (pypi-uri "treq" version))
4494 (sha256
4495 (base32
4496 "0j4zwq9p1c9piv1vc66nxcv9s6hdinf90jwkbsm91k14npv9zq4i"))))
4497 (build-system python-build-system)
4498 (propagated-inputs
4499 `(("python-attrs" ,python-attrs)
4500 ("python-idna" ,python-idna)
4501 ("python-incremental" ,python-incremental)
4502 ("python-requests" ,python-requests)
4503 ("python-service-identity" ,python-service-identity)
4504 ("python-twisted" ,python-twisted)))
4505 (home-page "https://github.com/twisted/treq")
4506 (synopsis "Requests-like API built on top of twisted.web's Agent")
4507 (description "This package provides an HTTP library inspired by
4508 @code{requests}} but written on top of Twisted's @code{Agents}. It offers a
4509 high level API for making HTTP requests when using Twisted.")
4510 (license license:expat)))
4511
4512 (define-public python-autobahn
4513 (package
4514 (name "python-autobahn")
4515 (version "19.2.1")
4516 (source
4517 (origin
4518 (method url-fetch)
4519 (uri (pypi-uri "autobahn" version))
4520 (sha256
4521 (base32
4522 "1mm7j24ls01c7jb1ad5p5cpyxvzgydiyf8b04ihykh2v8g98j0x7"))))
4523 (build-system python-build-system)
4524 (arguments
4525 ;; The tests fail to run:
4526 ;; https://github.com/crossbario/autobahn-python/issues/1117
4527 `(#:tests? #f))
4528 (propagated-inputs
4529 `(("python-cffi" ,python-cffi)
4530 ("python-twisted" ,python-twisted)
4531 ("python-txaio" ,python-txaio)))
4532 (home-page "https://crossbar.io/autobahn/")
4533 (synopsis "Web Application Messaging Protocol implementation")
4534 (description "This package provides an implementation of the @dfn{Web Application
4535 Messaging Protocol} (WAMP). WAMP connects components in distributed
4536 applications using Publish and Subscribe (PubSub) and routed Remote Procedure
4537 Calls (rRPC). It is ideal for distributed, multi-client and server applications
4538 such as IoT applications or multi-user database-driven business applications.")
4539 (license license:expat)))
4540
4541 (define-public python-ws4py
4542 (package
4543 (name "python-ws4py")
4544 (version "0.5.1")
4545 (source
4546 (origin
4547 (method url-fetch)
4548 (uri (pypi-uri "ws4py" version))
4549 (sha256
4550 (base32
4551 "10slbbf2jm4hpr92jx7kh7mhf48sjl01v2w4d8z3f1p0ybbp7l19"))))
4552 (build-system python-build-system)
4553 (arguments
4554 `(#:phases
4555 (modify-phases %standard-phases
4556 (add-after 'unpack 'python3.7-compatibility
4557 (lambda _
4558 (substitute* '("ws4py/server/tulipserver.py"
4559 "ws4py/async_websocket.py")
4560 (("asyncio.async")
4561 "asyncio.ensure_future"))
4562 #t))
4563 ;; We don't have a package for cherrypy.
4564 (add-after 'unpack 'remove-cherrypy-support
4565 (lambda _
4566 (delete-file "ws4py/server/cherrypyserver.py")
4567 #t)))))
4568 (propagated-inputs
4569 `(("python-gevent" ,python-gevent)
4570 ("python-tornado" ,python-tornado)))
4571 (home-page "https://github.com/Lawouach/WebSocket-for-Python")
4572 (synopsis "WebSocket client and server library")
4573 (description
4574 "This package provides a WebSocket client and server library for
4575 Python.")
4576 (license license:bsd-3)))
4577
4578 (define-public python-slugify
4579 (package
4580 (name "python-slugify")
4581 (version "5.0.2")
4582 (source
4583 (origin
4584 (method url-fetch)
4585 (uri (pypi-uri "python-slugify" version))
4586 (sha256
4587 (base32 "1aww2ncglyii4jkbfjxqhinivawf9zmwifcj32d69gpwp6h86czi"))))
4588 (propagated-inputs
4589 `(("python-unidecode" ,python-unidecode)))
4590 (arguments
4591 `(#:phases
4592 (modify-phases %standard-phases
4593 (replace 'check
4594 (lambda* (#:key tests? #:allow-other-keys)
4595 (when tests?
4596 (invoke "python" "test.py")))))))
4597 (build-system python-build-system)
4598 (home-page "https://github.com/un33k/python-slugify")
4599 (synopsis "Python Slugify application that handles Unicode")
4600 (description "This package provides a @command{slufigy} command and
4601 library to create slugs from unicode strings while keeping it DRY.")
4602 (license license:expat)))
4603
4604 (define-public python-branca
4605 (package
4606 (name "python-branca")
4607 (version "0.3.1")
4608 (source
4609 (origin
4610 (method url-fetch)
4611 (uri (pypi-uri "branca" version))
4612 (sha256
4613 (base32
4614 "0pmigd521j2228xf8x34vbx0niwvms7xl7za0lymywj0vydjqxiy"))))
4615 (build-system python-build-system)
4616 (propagated-inputs
4617 `(("python-jinja2" ,python-jinja2)
4618 ("python-six" ,python-six)))
4619 (native-inputs
4620 `(("python-pytest" ,python-pytest)))
4621 (home-page "https://github.com/python-visualization/branca")
4622 (synopsis "Generate complex HTML+JS pages with Python")
4623 (description "Generate complex HTML+JS pages with Python")
4624 (license license:expat)))
4625
4626 (define-public python-tinycss
4627 (package
4628 (name "python-tinycss")
4629 (version "0.4")
4630 (source
4631 (origin
4632 (method url-fetch)
4633 (uri (pypi-uri "tinycss" version))
4634 (sha256
4635 (base32 "0vkifr595h28ymkjhrswwf0bm23lhznh5f44xyp7x7jy1ssnyc0j"))))
4636 (build-system python-build-system)
4637 (arguments
4638 `(#:phases
4639 (modify-phases %standard-phases
4640 (add-after 'unpack 'disable-flake8-isort
4641 ;; Flake8 and isort tests fail.
4642 (lambda _
4643 (substitute* "setup.cfg" ((" --flake8 --isort") ""))
4644 #t))
4645 (replace 'check
4646 (lambda _
4647 ;; Disable failing test.
4648 (invoke "python" "-m" "pytest" "-k"
4649 "not test_speedups"))))))
4650 (native-inputs
4651 `(("python-pytest-cov" ,python-pytest-cov)
4652 ("python-pytest-flake8" ,python-pytest-flake8)
4653 ("python-pytest-isort" ,python-pytest-isort)
4654 ("python-pytest-runner" ,python-pytest-runner)))
4655 (home-page "https://tinycss.readthedocs.io/")
4656 (synopsis "Complete yet simple CSS parser for Python")
4657 (description
4658 "@code{tinycss} is a complete yet simple CSS parser for Python. It
4659 supports the full syntax and error handling for CSS 2.1 as well as some CSS 3
4660 modules:
4661
4662 @itemize
4663 @item CSS Color 3
4664 @item CSS Fonts 3
4665 @item CSS Paged Media 3
4666 @end itemize")
4667 (license license:bsd-3)))
4668
4669 (define-public python-tinycss2
4670 (package
4671 (name "python-tinycss2")
4672 (version "1.1.0")
4673 (source
4674 (origin
4675 (method git-fetch)
4676 (uri (git-reference
4677 (url "https://github.com/Kozea/tinycss2")
4678 (commit (string-append "v" version))
4679 (recursive? #true)))
4680 (file-name (git-file-name name version))
4681 (sha256
4682 (base32 "0zyc48vbmczpqj7f3f0d7zb3bz29fyj50dg0m6bbwbr5i88kq3sq"))))
4683 (build-system python-build-system)
4684 (arguments
4685 `(#:phases
4686 (modify-phases %standard-phases
4687 (replace 'build
4688 (lambda _
4689 ;; A ZIP archive should be generated, but it fails with "ZIP does
4690 ;; not support timestamps before 1980". Luckily,
4691 ;; SOURCE_DATE_EPOCH is respected, which we set to some time in
4692 ;; 1980.
4693 (setenv "SOURCE_DATE_EPOCH" "315532800")
4694 (invoke "flit" "build")))
4695 (replace 'install
4696 (lambda* (#:key inputs outputs #:allow-other-keys)
4697 (add-installed-pythonpath inputs outputs)
4698 (let ((out (assoc-ref outputs "out")))
4699 (for-each (lambda (wheel)
4700 (format #true wheel)
4701 (invoke "python" "-m" "pip" "install"
4702 wheel (string-append "--prefix=" out)))
4703 (find-files "dist" "\\.whl$")))))
4704 (replace 'check
4705 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4706 (add-installed-pythonpath inputs outputs)
4707 (invoke "pytest" "-vv"))))))
4708 (propagated-inputs
4709 `(("python-webencodings" ,python-webencodings)))
4710 (native-inputs
4711 `(("python-flit" ,python-flit)
4712 ("python-pytest" ,python-pytest)
4713 ("python-pytest-cov" ,python-pytest-cov)
4714 ("python-pytest-flake8" ,python-pytest-flake8)
4715 ("python-pytest-isort" ,python-pytest-isort)))
4716 (home-page "https://tinycss2.readthedocs.io/")
4717 (synopsis "Low-level CSS parser for Python")
4718 (description "@code{tinycss2} can parse strings, return Python objects
4719 representing tokens and blocks, and generate CSS strings corresponding to
4720 these objects.
4721
4722 Based on the CSS Syntax Level 3 specification, @code{tinycss2} knows the
4723 grammar of CSS but doesn’t know specific rules, properties or values supported
4724 in various CSS modules.")
4725 (license license:bsd-3)))
4726
4727 (define-public python-cssselect2
4728 (package
4729 (name "python-cssselect2")
4730 (version "0.4.1")
4731 (source
4732 (origin
4733 (method url-fetch)
4734 (uri (pypi-uri "cssselect2" version))
4735 (sha256
4736 (base32 "1j2fcr217rsvkipsg6zjq03rl64rxnvb5hqqpx0dv58fhspvkywk"))))
4737 (build-system python-build-system)
4738 (arguments
4739 `(#:phases
4740 (modify-phases %standard-phases
4741 (replace 'check
4742 (lambda _ (invoke "pytest"))))))
4743 (propagated-inputs
4744 `(("python-tinycss2" ,python-tinycss2)))
4745 (native-inputs
4746 `(("python-pytest-cov" ,python-pytest-cov)
4747 ("python-pytest-flake8" ,python-pytest-flake8)
4748 ("python-pytest-isort" ,python-pytest-isort)
4749 ("python-pytest-runner" ,python-pytest-runner)))
4750 (home-page "https://cssselect2.readthedocs.io/")
4751 (synopsis "CSS selectors for Python ElementTree")
4752 (description "@code{cssselect2} is a straightforward implementation of
4753 CSS3 Selectors for markup documents (HTML, XML, etc.) that can be read by
4754 ElementTree-like parsers (including cElementTree, lxml, html5lib, etc.).
4755
4756 Unlike the Python package @code{cssselect}, it does not translate selectors to
4757 XPath and therefore does not have all the correctness corner cases that are
4758 hard or impossible to fix in cssselect.")
4759 (license license:bsd-3)))
4760
4761 (define-public python-uvloop
4762 (package
4763 (name "python-uvloop")
4764 (version "0.14.0")
4765 (source
4766 (origin
4767 (method url-fetch)
4768 (uri (pypi-uri "uvloop" version))
4769 (sha256
4770 (base32 "07j678z9gf41j98w72ysrnb5sa41pl5yxd7ib17lcwfxqz0cjfhj"))))
4771 (build-system python-build-system)
4772 (arguments
4773 '(#:tests? #f ;FIXME: tests hang and with some errors in the way
4774 #:phases
4775 (modify-phases %standard-phases
4776 (add-after 'unpack 'preparations
4777 (lambda _
4778 ;; Use packaged libuv.
4779 (substitute* "setup.py" (("self.use_system_libuv = False")
4780 "self.use_system_libuv = True"))
4781 #t)))))
4782 (native-inputs
4783 `(("python-aiohttp" ,python-aiohttp)
4784 ("python-cython" ,python-cython)
4785 ("python-flake8" ,python-flake8)
4786 ("python-psutil" ,python-psutil)
4787 ("python-pyopenssl" ,python-pyopenssl)
4788 ("python-twine" ,python-twine)))
4789 (inputs
4790 `(("libuv" ,libuv)))
4791 (home-page "https://github.com/MagicStack/uvloop")
4792 (synopsis "Fast implementation of asyncio event loop on top of libuv")
4793 (description
4794 "@code{uvloop} is a fast, drop-in replacement of the built-in asyncio
4795 event loop. It is implemented in Cython and uses libuv under the hood.")
4796 (license license:expat)))
4797
4798 (define-public gunicorn
4799 (package
4800 (name "gunicorn")
4801 (version "20.1.0")
4802 (source
4803 (origin
4804 (method url-fetch)
4805 (uri (pypi-uri "gunicorn" version))
4806 (sha256
4807 (base32
4808 "1s7670qw36x90bgmazmgib170i5gnpyb2ypxzlla7y0mpasniag0"))))
4809 (outputs '("out" "doc"))
4810 (build-system python-build-system)
4811 (arguments
4812 `(#:phases
4813 (modify-phases %standard-phases
4814 (add-after 'build 'build-doc
4815 (lambda _
4816 (invoke "make" "-C" "docs" "PAPER=a4" "html" "info")
4817 (delete-file "docs/build/texinfo/Makefile")
4818 (delete-file "docs/build/texinfo/Gunicorn.texi")
4819 #t))
4820 (replace 'check
4821 (lambda* (#:key tests? #:allow-other-keys)
4822 (if tests?
4823 (begin
4824 (setenv "PYTHONPATH"
4825 (string-append ".:" (getenv "PYTHONPATH")))
4826 (invoke "pytest" "-vv"
4827 ;; Disable the geventlet tests because eventlet uses
4828 ;; dnspython, which does not work in the build
4829 ;; container due to lack of /etc/resolv.conf, etc.
4830 "--ignore=tests/workers/test_geventlet.py"))
4831 (format #t "test suite not run~%"))))
4832 (add-after 'install 'install-doc
4833 (lambda* (#:key outputs #:allow-other-keys)
4834 (let* ((doc (string-append (assoc-ref outputs "doc")
4835 "/share/doc/" ,name "-" ,version))
4836 (html (string-append doc "/html"))
4837 (info (string-append doc "/info"))
4838 (examples (string-append doc "/examples")))
4839 (mkdir-p html)
4840 (mkdir-p info)
4841 (mkdir-p examples)
4842 (copy-recursively "docs/build/html" html)
4843 (copy-recursively "docs/build/texinfo" info)
4844 (copy-recursively "examples" examples)
4845 (for-each (lambda (file)
4846 (copy-file file (string-append doc "/" file)))
4847 '("README.rst" "NOTICE" "LICENSE" "THANKS")))))
4848 ;; XXX: The wrap phase includes native inputs on PYTHONPATH, (see
4849 ;; <https://bugs.gnu.org/25235>), leading to an inflated closure
4850 ;; size. Override it to only add the essential entries.
4851 (replace 'wrap
4852 (lambda* (#:key native-inputs inputs outputs #:allow-other-keys)
4853 (let* ((out (assoc-ref outputs "out"))
4854 (python (assoc-ref (or native-inputs inputs) "python"))
4855 (sitedir (string-append "/lib/python"
4856 (python-version python)
4857 "/site-packages")))
4858 (wrap-program (string-append out "/bin/gunicorn")
4859 `("PYTHONPATH" ":" prefix
4860 ,(map (lambda (output)
4861 (string-append output sitedir))
4862 (list python out))))))))))
4863 (native-inputs
4864 `(("binutils" ,binutils) ;; for ctypes.util.find_library()
4865 ("python-aiohttp" ,python-aiohttp)
4866 ("python-gevent" ,python-gevent)
4867 ("python-pytest" ,python-pytest)
4868 ("python-pytest-cov" ,python-pytest-cov)
4869 ("python-sphinx" ,python-sphinx)
4870 ("texinfo" ,texinfo)))
4871 (home-page "https://gunicorn.org/")
4872 (synopsis "Python WSGI HTTP Server for UNIX")
4873 (description "Gunicorn ‘Green Unicorn’ is a Python WSGI HTTP
4874 Server for UNIX. It’s a pre-fork worker model ported from Ruby’s
4875 Unicorn project. The Gunicorn server is broadly compatible with
4876 various web frameworks, simply implemented, light on server resources,
4877 and fairly speedy.")
4878 (license license:expat)))
4879
4880 ;; break cyclic dependency for python-aiohttp, which depends on gunicorn for
4881 ;; its tests
4882 (define-public gunicorn-bootstrap
4883 (package
4884 (inherit gunicorn)
4885 (name "gunicorn")
4886 (arguments `(#:tests? #f))
4887 (properties '((hidden? . #t)))
4888 (native-inputs `())))
4889
4890 (define-public python-httptools
4891 (package
4892 (name "python-httptools")
4893 (version "0.1.1")
4894 (source
4895 (origin
4896 ;; PyPI tarball comes with a vendored http-parser and no tests.
4897 (method git-fetch)
4898 (uri (git-reference
4899 (url "https://github.com/MagicStack/httptools")
4900 (commit (string-append "v" version))))
4901 (file-name (git-file-name name version))
4902 (sha256
4903 (base32 "0g08128x2ixsiwrzskxc6c8ymgzs39wbzr5mhy0mjk30q9pqqv77"))))
4904 (build-system python-build-system)
4905 (arguments
4906 '(#:phases
4907 (modify-phases %standard-phases
4908 (add-after 'unpack 'preparations
4909 (lambda _
4910 ;; Skip a failing test (AssertionError). Bug report:
4911 ;; https://github.com/MagicStack/httptools/issues/10.
4912 (substitute* "tests/test_parser.py"
4913 ((" def test_parser_response_1")
4914 (string-append
4915 " @unittest.skip(\"Disabled.\")\n"
4916 " def test_parser_response_1")))
4917 ;; Use packaged http-parser.
4918 (substitute* "setup.py" (("self.use_system_http_parser = False")
4919 "self.use_system_http_parser = True"))
4920 ;; This path is hardcoded. Hardcode our own.
4921 (substitute* "httptools/parser/cparser.pxd"
4922 (("../../vendor/http-parser")
4923 (string-append (assoc-ref %build-inputs "http-parser")
4924 "/include")))
4925 ;; Don't force Cython version.
4926 (substitute* "setup.py" (("Cython==") "Cython>="))
4927 #t)))))
4928 (native-inputs
4929 `(("python-cython" ,python-cython)
4930 ("python-pytest" ,python-pytest)))
4931 (inputs
4932 `(("http-parser" ,http-parser)))
4933 (home-page "https://github.com/MagicStack/httptools")
4934 (synopsis "Collection of framework independent HTTP protocol utils")
4935 (description
4936 "@code{httptools} is a Python binding for the nodejs HTTP parser.")
4937 (license license:expat)))
4938
4939 (define-public python-uvicorn
4940 (package
4941 (name "python-uvicorn")
4942 (version "0.11.8")
4943 (source
4944 (origin
4945 ;; PyPI tarball has no tests.
4946 (method git-fetch)
4947 (uri (git-reference
4948 (url "https://github.com/encode/uvicorn")
4949 (commit version)))
4950 (file-name (git-file-name name version))
4951 (sha256
4952 (base32 "00iidg5ysp7k00bw3kmkvr8mghnh4jdi0p2ryiarhryf8wz2r3fy"))))
4953 (build-system python-build-system)
4954 (arguments
4955 `(#:phases
4956 (modify-phases %standard-phases
4957 (replace 'check
4958 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4959 (add-installed-pythonpath inputs outputs)
4960 (invoke "pytest" "-vv"))))))
4961 (native-inputs
4962 `(("python-black" ,python-black)
4963 ("python-codecov" ,python-codecov)
4964 ("python-flake8" ,python-flake8)
4965 ("python-isort" ,python-isort)
4966 ("python-mypy" ,python-mypy)
4967 ("python-pytest" ,python-pytest)
4968 ("python-pytest-cov" ,python-pytest-cov)
4969 ("python-pytest-mock" ,python-pytest-mock)
4970 ("python-requests" ,python-requests)))
4971 (propagated-inputs
4972 `(("python-click" ,python-click)
4973 ("python-h11" ,python-h11)
4974 ("python-httptools" ,python-httptools)
4975 ("python-pyyaml" ,python-pyyaml)
4976 ("python-uvloop" ,python-uvloop)
4977 ("python-watchgod" ,python-watchgod)
4978 ("python-websockets" ,python-websockets)
4979 ("python-wsproto" ,python-wsproto)))
4980 (home-page "https://github.com/encode/uvicorn")
4981 (synopsis "Fast ASGI server implementation")
4982 (description
4983 "@code{uvicorn} is a fast ASGI server implementation, using @code{uvloop}
4984 and @code{httptools}. It currently supports HTTP/1.1 and WebSockets. Support
4985 for HTTP/2 is planned.")
4986 (license license:bsd-3)))
4987
4988 (define-public python-translation-finder
4989 (package
4990 (name "python-translation-finder")
4991 (version "1.7")
4992 (source
4993 (origin
4994 (method url-fetch)
4995 (uri (pypi-uri "translation-finder" version))
4996 (sha256
4997 (base32
4998 "1pcy9z8gmb8x41gjhw9x0lkr0d2mv5mdxcs2hwg6q8mxs857j589"))))
4999 (build-system python-build-system)
5000 (arguments
5001 `(#:phases
5002 (modify-phases %standard-phases
5003 (add-before 'build 'remove-failing-test
5004 (lambda _
5005 (delete-file "translation_finder/test_api.py")
5006 #t)))))
5007 (propagated-inputs
5008 `(("python-chardet" ,python-chardet)
5009 ("python-pathlib2" ,python-pathlib2)
5010 ("python-ruamel.yaml" ,python-ruamel.yaml)
5011 ("python-six" ,python-six)))
5012 (native-inputs
5013 `(("python-codecov" ,python-codecov)
5014 ("python-codacy-coverage" ,python-codacy-coverage)
5015 ("python-pytest-cov" ,python-pytest-cov)
5016 ("python-pytest-runner" ,python-pytest-runner)
5017 ("python-twine" ,python-twine)))
5018 (home-page "https://weblate.org/")
5019 (synopsis "Translation file finder for Weblate")
5020 (description "This package provides a function to find translation file in
5021 the source code of a project. It supports many translation file formats and
5022 is part of the Weblate translation platform.")
5023 (license license:gpl3+)))
5024
5025 (define-public python-gitlab
5026 (package
5027 (name "python-gitlab")
5028 (version "1.15.0")
5029 (source
5030 (origin
5031 (method url-fetch)
5032 (uri (pypi-uri "python-gitlab" version))
5033 (sha256
5034 (base32
5035 "0zl6kz8v8cg1bcy2r78b2snb0lpw0b573gdx2x1ps0nhsh75l4j5"))))
5036 (build-system python-build-system)
5037 (propagated-inputs
5038 `(("python-requests" ,python-requests)
5039 ("python-six" ,python-six)))
5040 (native-inputs
5041 `(("python-httmock" ,python-httmock)
5042 ("python-mock" ,python-mock)))
5043 (home-page
5044 "https://github.com/python-gitlab/python-gitlab")
5045 (synopsis "Interact with GitLab API")
5046 (description "This package provides an extended library for interacting
5047 with GitLab instances through their API.")
5048 (license license:lgpl3+)))
5049
5050 (define-public python-path-and-address
5051 (package
5052 (name "python-path-and-address")
5053 (version "2.0.1")
5054 (source
5055 (origin
5056 ;; The source distributed on PyPI doesn't include tests.
5057 (method git-fetch)
5058 (uri (git-reference
5059 (url "https://github.com/joeyespo/path-and-address")
5060 (commit (string-append "v" version))))
5061 (file-name (git-file-name name version))
5062 (sha256
5063 (base32
5064 "0b0afpsaim06mv3lhbpm8fmawcraggc11jhzr6h72kdj1cqjk5h6"))))
5065 (build-system python-build-system)
5066 (arguments
5067 `(#:phases
5068 (modify-phases %standard-phases
5069 (replace 'check
5070 (lambda* (#:key inputs outputs #:allow-other-keys)
5071 (add-installed-pythonpath inputs outputs)
5072 (invoke "py.test"))))))
5073 (native-inputs
5074 `(("python-pytest" ,python-pytest)))
5075 (home-page "https://github.com/joeyespo/path-and-address")
5076 (synopsis "Functions for command-line server tools used by humans")
5077 (description "Path-and-address resolves ambiguities of command-line
5078 interfaces, inferring which argument is the path, and which is the address.")
5079 (license license:expat)))
5080
5081 (define-public grip
5082 ;; No release by upstream for quite some time, some bugs fixed since. See:
5083 ;; https://github.com/joeyespo/grip/issues/304
5084 (let ((commit "27a4d6d87ea1d0ea7f7f120de55baabee3de73e3"))
5085 (package
5086 (name "grip")
5087 (version (git-version "4.5.2" "1" commit))
5088 (source
5089 (origin
5090 (method git-fetch)
5091 (uri (git-reference
5092 (url "https://github.com/joeyespo/grip")
5093 (commit commit)))
5094 (file-name (git-file-name name version))
5095 (sha256
5096 (base32
5097 "0kx5hgb3q19i4l18a4vqdq9af390xgpk88lp2ay75qi96k0dc68w"))))
5098 (build-system python-build-system)
5099 (propagated-inputs
5100 `(("python-docopt" ,python-docopt)
5101 ("python-flask" ,python-flask)
5102 ("python-markdown" ,python-markdown)
5103 ("python-path-and-address" ,python-path-and-address)
5104 ("python-pygments" ,python-pygments)
5105 ("python-requests" ,python-requests)))
5106 (native-inputs
5107 `(("python-pytest" ,python-pytest)
5108 ("python-responses" ,python-responses)))
5109 (arguments
5110 `(#:phases
5111 (modify-phases %standard-phases
5112 (replace 'check
5113 (lambda* (#:key inputs outputs #:allow-other-keys)
5114 (add-installed-pythonpath inputs outputs)
5115 (setenv "PATH" (string-append
5116 (getenv "PATH") ":"
5117 (assoc-ref %outputs "out") "/bin"))
5118 (invoke "py.test" "-m" "not assumption"))))))
5119 (home-page "https://github.com/joeyespo/grip")
5120 (synopsis "Preview Markdown files using the GitHub API")
5121 (description "Grip is a command-line server application written in Python
5122 that uses the GitHub Markdown API to render a local Markdown file. The styles
5123 and rendering come directly from GitHub, so you'll know exactly how it will
5124 appear. Changes you make to the file will be instantly reflected in the browser
5125 without requiring a page refresh.")
5126 (license license:expat))))
5127
5128 (define-public python-port-for
5129 (package
5130 (name "python-port-for")
5131 (version "0.4")
5132 (source
5133 (origin
5134 (method url-fetch)
5135 (uri (pypi-uri "port-for" version))
5136 (sha256
5137 (base32
5138 "1pncxlj25ggw99r0ijfbkq70gd7cbhqdx5ivsxy4jdp0z14cpda7"))))
5139 (build-system python-build-system)
5140 (arguments
5141 `(#:phases
5142 (modify-phases %standard-phases
5143 (add-after 'unpack 'use-urllib3
5144 (lambda _
5145 (substitute* "port_for/_download_ranges.py"
5146 (("urllib2") "urllib3"))
5147 #t)))))
5148 (propagated-inputs
5149 `(("python-urllib3" ,python-urllib3)))
5150 (native-inputs
5151 `(("python-mock" ,python-mock)))
5152 (home-page "https://github.com/kmike/port-for/")
5153 (synopsis "TCP localhost port finder and association manager")
5154 (description
5155 "This package provides a utility that helps with local TCP ports
5156 management. It can find an unused TCP localhost port and remember the
5157 association.")
5158 (license license:expat)))
5159
5160 (define-public python-livereload
5161 (package
5162 (name "python-livereload")
5163 (version "2.6.1")
5164 (source
5165 (origin
5166 (method url-fetch)
5167 (uri (pypi-uri "livereload" version))
5168 (sha256
5169 (base32
5170 "0rhggz185bxc3zjnfpmhcvibyzi86i624za1lfh7x7ajsxw4y9c9"))))
5171 (build-system python-build-system)
5172 (propagated-inputs
5173 `(("python-six" ,python-six)
5174 ("python-tornado" ,python-tornado)))
5175 (home-page "https://github.com/lepture/python-livereload")
5176 (synopsis "Python LiveReload")
5177 (description
5178 "Python LiveReload provides a command line utility, @command{livereload},
5179 for starting a web server in a directory. It can trigger arbitrary commands
5180 and serve updated contents upon changes to the directory.")
5181 (license license:bsd-3)))
5182
5183 (define-public python-vf-1
5184 (package
5185 (name "python-vf-1")
5186 (version "0.0.11")
5187 (source
5188 (origin
5189 (method url-fetch)
5190 (uri (pypi-uri "VF-1" version))
5191 (sha256
5192 (base32
5193 "0xlqsaxsiayk1sd07kpz8abbcnab582y29a1y4882fq6j4gma5xi"))))
5194 (build-system python-build-system)
5195 (home-page "https://github.com/solderpunk/VF-1")
5196 (synopsis "Command line gopher client")
5197 (description "@code{VF-1} is a command line gopher client with
5198 @acronym{TLS, Transport Layer Security} support.")
5199 (license license:bsd-2)))
5200
5201 (define-public python-httpcore
5202 (package
5203 (name "python-httpcore")
5204 (version "0.12.2")
5205 (source
5206 (origin
5207 ;; PyPI tarball does not contain tests.
5208 (method git-fetch)
5209 (uri (git-reference
5210 (url "https://github.com/encode/httpcore")
5211 (commit version)))
5212 (file-name (git-file-name name version))
5213 (sha256
5214 (base32 "1nrwwfdqjfc2a1k3j41cdwkprwvplf95fwmypdl2aq2qgp3209q0"))))
5215 (build-system python-build-system)
5216 (arguments
5217 `(#:tests? #f ; Tests hang at 98%
5218 #:phases
5219 (modify-phases %standard-phases
5220 (replace 'check
5221 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5222 (when tests?
5223 (add-installed-pythonpath inputs outputs)
5224 (invoke "pytest" "-vv" "--cov=httpcore"
5225 "--cov=tests" "tests"))
5226 #t)))))
5227 (native-inputs
5228 `(("python-autoflake" ,python-autoflake)
5229 ("python-flake8" ,python-flake8)
5230 ("python-flake8-bugbear" ,python-flake8-bugbear)
5231 ("python-flake8-pie" ,python-flake8-pie)
5232 ("python-isort" ,python-isort)
5233 ("python-mypy" ,python-mypy)
5234 ("python-pytest" ,python-pytest)
5235 ("python-pytest-asyncio" ,python-pytest-asyncio)
5236 ("python-pytest-cov" ,python-pytest-cov)
5237 ("python-pytest-trio" ,python-pytest-trio)
5238 ("python-uvicorn" ,python-uvicorn)
5239 ("python-trustme" ,python-trustme)))
5240 (propagated-inputs
5241 `(("python-h11" ,python-h11)
5242 ("python-h2" ,python-h2)
5243 ("python-sniffio" ,python-sniffio)
5244 ("python-trio" ,python-trio)
5245 ("python-trio-typing" ,python-trio-typing)))
5246 (home-page "https://github.com/encode/httpcore")
5247 (synopsis "Minimal, low-level HTTP client")
5248 (description
5249 "HTTP Core provides a minimal and low-level HTTP client, which does one
5250 thing only: send HTTP requests.
5251
5252 Some things HTTP Core does do:
5253
5254 @itemize
5255 @item Sending HTTP requests.
5256 @item Provides both sync and async interfaces.
5257 @item Supports HTTP/1.1 and HTTP/2.
5258 @item Async backend support for asyncio and trio.
5259 @item Automatic connection pooling.
5260 @item HTTP(S) proxy support.
5261 @end itemize")
5262 (license license:bsd-3)))
5263
5264 (define-public python-httpx
5265 (package
5266 (name "python-httpx")
5267 (version "0.16.1")
5268 (source
5269 (origin
5270 ;; PyPI tarball does not contain tests.
5271 (method git-fetch)
5272 (uri (git-reference
5273 (url "https://github.com/encode/httpx")
5274 (commit version)))
5275 (file-name (git-file-name name version))
5276 (sha256
5277 (base32 "00gmq45fckcqkj910bvd7pyqz1mvgsdvz4s0k7dzbnc5czzq1f4a"))))
5278 (build-system python-build-system)
5279 (arguments
5280 `(#:phases
5281 (modify-phases %standard-phases
5282 (replace 'check
5283 (lambda* (#:key tests? #:allow-other-keys)
5284 (when tests?
5285 (invoke "pytest" "-vv" "-k"
5286 ;; These tests try to open an outgoing connection.
5287 (string-append
5288 "not test_connect_timeout"
5289 " and not test_that_send_cause_async_client_to_be_not_"
5290 "closed"
5291 " and not test_that_async_client_caused_warning_when_"
5292 "being_deleted"
5293 " and not test_that_send_cause_client_to_be_not_closed"
5294 " and not test_async_proxy_close"
5295 " and not test_sync_proxy_close"))))))))
5296 (native-inputs
5297 `(("python-autoflake" ,python-autoflake)
5298 ("python-black" ,python-black)
5299 ("python-cryptography" ,python-cryptography)
5300 ("python-flake8" ,python-flake8)
5301 ("python-flake8-bugbear" ,python-flake8-bugbear)
5302 ("python-flake8-pie" ,python-flake8-pie)
5303 ("python-isort" ,python-isort)
5304 ("python-mypy" ,python-mypy)
5305 ("python-pytest" ,python-pytest)
5306 ("python-pytest-asyncio" ,python-pytest-asyncio)
5307 ("python-pytest-trio" ,python-pytest-trio)
5308 ("python-pytest-cov" ,python-pytest-cov)
5309 ("python-trio" ,python-trio)
5310 ("python-trio-typing" ,python-trio-typing)
5311 ("python-trustme" ,python-trustme)
5312 ("python-uvicorn" ,python-uvicorn)))
5313 (propagated-inputs
5314 `(("python-brotli" ,python-brotli)
5315 ("python-certifi" ,python-certifi)
5316 ("python-chardet" ,python-chardet)
5317 ("python-httpcore" ,python-httpcore)
5318 ("python-idna" ,python-idna)
5319 ("python-rfc3986" ,python-rfc3986)
5320 ("python-sniffio" ,python-sniffio)))
5321 (home-page "https://www.python-httpx.org/")
5322 (synopsis "HTTP client for Python")
5323 (description
5324 "HTTPX is a fully featured HTTP client for Python 3, which provides sync
5325 and async APIs, and support for both HTTP/1.1 and HTTP/2.
5326
5327 HTTPX builds on the well-established usability of requests, and gives you:
5328
5329 @itemize
5330 @item A broadly requests-compatible API.
5331 @item Standard synchronous interface, but with async support if you need it.
5332 @item HTTP/1.1 and HTTP/2 support.
5333 @item Ability to make requests directly to WSGI applications or ASGI applications.
5334 @item Strict timeouts everywhere.
5335 @item Fully type annotated.
5336 @item 99% test coverage.
5337 @end itemize
5338
5339 Plus all the standard features of requests:
5340
5341 @itemize
5342 @item International Domains and URLs
5343 @item Keep-Alive & Connection Pooling
5344 @item Sessions with Cookie Persistence
5345 @item Browser-style SSL Verification
5346 @item Basic/Digest Authentication
5347 @item Elegant Key/Value Cookies
5348 @item Automatic Decompression
5349 @item Automatic Content Decoding
5350 @item Unicode Response Bodies
5351 @item Multipart File Uploads
5352 @item HTTP(S) Proxy Support
5353 @item Connection Timeouts
5354 @item Streaming Downloads
5355 @item .netrc Support
5356 @item Chunked Requests
5357 @end itemize")
5358 (license license:bsd-3)))
5359
5360 (define-public python-wsgiprox
5361 (package
5362 (name "python-wsgiprox")
5363 (version "1.5.2")
5364 (source
5365 (origin
5366 (method url-fetch)
5367 (uri (pypi-uri "wsgiprox" version))
5368 (sha256
5369 (base32
5370 "11fsm199pvwbmqx2lccznvws65aam1rqqv0w79gal8hispwgd5rs"))))
5371 (build-system python-build-system)
5372 (arguments
5373 ;; The test suite hangs (see:
5374 ;; https://github.com/webrecorder/wsgiprox/issues/6).
5375 `(#:tests? #f
5376 #:phases
5377 (modify-phases %standard-phases
5378 (add-after 'unpack 'fix-pytest-argument
5379 (lambda _
5380 ;; See: https://github.com/webrecorder/wsgiprox/issues/7.
5381 (substitute* "setup.py"
5382 (("--doctest-module")
5383 "--doctest-modules")))))))
5384 (propagated-inputs
5385 `(("python-certauth" ,python-certauth)
5386 ("python-gevent" ,python-gevent)
5387 ("python-websocket-client" ,python-websocket-client)))
5388 (native-inputs
5389 `(("python-mock" ,python-mock)
5390 ("python-pytest-cov" ,python-pytest-cov)
5391 ("python-waitress" ,python-waitress)))
5392 (home-page "https://github.com/webrecorder/wsgiprox")
5393 (synopsis "HTTP/S proxy with WebSockets over WSGI")
5394 (description "@code{wsgiprox} is a Python WSGI (Web Server Gateway
5395 Interface) middle-ware for adding HTTP and HTTPS proxy support to a WSGI
5396 application. The library accepts HTTP and HTTPS proxy connections, and routes
5397 them to a designated prefix.")
5398 (license license:asl2.0)))
5399
5400 (define-public python-warcio
5401 ;; The PyPI release is missing some test support files (see:
5402 ;; https://github.com/webrecorder/warcio/issues/132).
5403 (let ((revision "0")
5404 (commit "aa702cb321621b233c6e5d2a4780151282a778be"))
5405 (package
5406 (name "python-warcio")
5407 (version (git-version "1.7.4" revision commit))
5408 (source
5409 (origin
5410 (method git-fetch)
5411 (uri (git-reference
5412 (url "https://github.com/webrecorder/warcio")
5413 (commit commit)))
5414 (file-name (git-file-name name version))
5415 (sha256
5416 (base32
5417 "11afr6zy3r6rda81010iq496dazg4xid0izg3smg6ighpmvsnzf2"))))
5418 (build-system python-build-system)
5419 (arguments
5420 `(#:phases
5421 (modify-phases %standard-phases
5422 (add-after 'unpack 'skip-problematic-tests
5423 (lambda _
5424 ;; These tests fail due to networking requirements.
5425 (substitute* "setup.py"
5426 (("pytest.main\\(\\[" all)
5427 (string-append all "'-k', '"
5428 (string-append "not test_post_chunked and "
5429 "not test_remote") "'"))))))))
5430 (native-inputs
5431 ;; These inputs are required for the test suite.
5432 `(("python-httpbin" ,python-httpbin)
5433 ("python-pytest-cov" ,python-pytest-cov)
5434 ("python-requests" ,python-requests)
5435 ("python-wsgiprox" ,python-wsgiprox)))
5436 (home-page "https://github.com/webrecorder/warcio")
5437 (synopsis "Streaming web archival archive (WARC) library")
5438 (description "warcio is a Python library to read and write the WARC format
5439 commonly used in Web archives. It is designed for fast, low-level access to
5440 web archival content, oriented around a stream of WARC records rather than
5441 files.")
5442 (license license:asl2.0))))
5443
5444 (define-public python-websockets
5445 (package
5446 (name "python-websockets")
5447 (version "8.1")
5448 (source
5449 (origin
5450 (method url-fetch)
5451 (uri (pypi-uri "websockets" version))
5452 (sha256
5453 (base32
5454 "03s3ml6sbki24aajllf8aily0xzrn929zxi84p50zkkbikdd4raw"))))
5455 (build-system python-build-system)
5456 (arguments '(#:tests? #f)) ; Tests not included in release tarball.
5457 (home-page "https://github.com/aaugustin/websockets")
5458 (synopsis
5459 "Python implementation of the WebSocket Protocol (RFC 6455 & 7692)")
5460 (description
5461 "@code{websockets} is a library for building WebSocket servers and clients
5462 in Python with a focus on correctness and simplicity.
5463
5464 Built on top of @code{asyncio}, Python's standard asynchronous I/O framework,
5465 it provides an elegant coroutine-based API.")
5466 (license license:bsd-3)))
5467
5468 (define-public python-selenium
5469 (package
5470 (name "python-selenium")
5471 (version "3.141.0")
5472 (source
5473 (origin
5474 (method url-fetch)
5475 (uri (pypi-uri "selenium" version))
5476 (sha256
5477 (base32
5478 "039hf9knvl4s3hp21bzwsp1g5ri9gxsh504dp48lc6nr1av35byy"))))
5479 (build-system python-build-system)
5480 (propagated-inputs
5481 `(("python-urllib3" ,python-urllib3)))
5482 (home-page
5483 "https://github.com/SeleniumHQ/selenium/")
5484 (synopsis "Python bindings for Selenium")
5485 (description "Selenium enables web browser automation.
5486 Selenium specifically provides infrastructure for the W3C WebDriver specification
5487 — a platform and language-neutral coding interface compatible with all
5488 major web browsers.")
5489 (license license:asl2.0)))
5490
5491 (define-public python-rapidjson
5492 (package
5493 (name "python-rapidjson")
5494 (version "0.9.1")
5495 (source
5496 (origin
5497 (method url-fetch)
5498 (uri (pypi-uri "python-rapidjson" version))
5499 (sha256
5500 (base32
5501 "18cl2dhx3gds5vg52jxmh9wjlbiy8dx06c3n482rfpdi9dzbv05d"))
5502 (modules '((guix build utils)))
5503 (snippet
5504 '(begin (delete-file-recursively "rapidjson") #t))))
5505 (build-system python-build-system)
5506 (arguments
5507 `(#:configure-flags
5508 (list (string-append "--rj-include-dir="
5509 (assoc-ref %build-inputs "rapidjson")
5510 "/include/rapidjson"))
5511 #:phases
5512 (modify-phases %standard-phases
5513 (replace 'build
5514 (lambda* (#:key inputs #:allow-other-keys)
5515 (invoke "python" "setup.py" "build"
5516 (string-append "--rj-include-dir="
5517 (assoc-ref %build-inputs "rapidjson")
5518 "/include/rapidjson"))))
5519 (replace 'check
5520 (lambda* (#:key inputs outputs #:allow-other-keys)
5521 (add-installed-pythonpath inputs outputs)
5522 ;; Some tests are broken.
5523 (delete-file "tests/test_base_types.py")
5524 (delete-file "tests/test_validator.py")
5525 (invoke "python" "-m" "pytest" "tests"))))))
5526 (native-inputs
5527 `(("rapidjson" ,rapidjson)
5528 ("python-pytest" ,python-pytest)
5529 ("python-pytz" ,python-pytz)))
5530 (home-page "https://github.com/python-rapidjson/python-rapidjson")
5531 (synopsis "Python wrapper around rapidjson")
5532 (description "This package provides a python wrapper around rapidjson.")
5533 (license license:expat)))
5534
5535 (define-public python-venusian
5536 (package
5537 (name "python-venusian")
5538 (version "3.0.0")
5539 (source
5540 (origin
5541 (method url-fetch)
5542 (uri (pypi-uri "venusian" version))
5543 (sha256
5544 (base32 "0f7f67dkgxxcjfhpdd5frb9pszkf04lyzzpn5069q0xi89r2p17n"))))
5545 (build-system python-build-system)
5546 (native-inputs
5547 `(("python-pytest" ,python-pytest)
5548 ("python-runner" ,python-pytest-runner)
5549 ("python-pytest-cov" ,python-pytest-cov)))
5550 (arguments '(#:test-target "pytest"))
5551 (home-page "https://docs.pylonsproject.org/projects/venusian")
5552 (synopsis "Library for deferring decorator actions")
5553 (description
5554 "Venusian is a library which allows framework authors to defer decorator
5555 actions. Instead of taking actions when a function (or class) decorator is
5556 executed at import time, you can defer the action usually taken by the
5557 decorator until a separate scan phase.")
5558 (license license:repoze)))
5559
5560 (define-public python-zope-deprecation
5561 (package
5562 (name "python-zope-deprecation")
5563 (version "4.4.0")
5564 (source (origin
5565 (method url-fetch)
5566 (uri (pypi-uri "zope.deprecation" version))
5567 (sha256
5568 (base32
5569 "1pz2cv7gv9y1r3m0bdv7ks1alagmrn5msm5spwdzkb2by0w36i8d"))))
5570 (build-system python-build-system)
5571 (native-inputs `())
5572 (propagated-inputs `())
5573 (home-page "https://zopedeprecation.readthedocs.io/")
5574 (synopsis "Function for marking deprecations")
5575 (description "The @code{zope.deprecation} module provides a function for
5576 marking modules, classes, functions, methods and properties as deprecated,
5577 displaying warnings when usaged in application code.")
5578 (license license:zpl2.1)))
5579
5580 (define-public python-translationstring
5581 (package
5582 (name "python-translationstring")
5583 (version "1.3")
5584 (source (origin
5585 (method url-fetch)
5586 (uri (pypi-uri "translationstring" version))
5587 (sha256
5588 (base32
5589 "0bdpcnd9pv0131dl08h4zbcwmgc45lyvq3pa224xwan5b3x4rr2f"))))
5590 (build-system python-build-system)
5591 (home-page "http://docs.pylonsproject.org/projects/translationstring")
5592 (synopsis "Internationalization tooling for the Pylons project")
5593 (description "This package provides a library used by various Pylons
5594 project packages for internationalization (i18n) duties related to
5595 translation.")
5596 (license license:repoze)))
5597
5598 (define-public python-plaster
5599 (package
5600 (name "python-plaster")
5601 (version "1.0")
5602 (source (origin
5603 (method url-fetch)
5604 (uri (pypi-uri "plaster" version))
5605 (sha256
5606 (base32
5607 "1hy8k0nv2mxq94y5aysk6hjk9ryb4bsd13g83m60hcyzxz3wflc3"))))
5608 (build-system python-build-system)
5609 (native-inputs
5610 `(("python-pytest" ,python-pytest)))
5611 (home-page "https://docs.pylonsproject.org/projects/plaster/en/latest/")
5612 (synopsis "Configuration loader for multiple config file formats")
5613 (description
5614 "Plaster is a loader interface around multiple config file formats. It
5615 exists to define a common API for applications to use when they wish to load
5616 configuration. The library itself does not aim to handle anything except a
5617 basic API that applications may use to find and load configuration settings.
5618 Any specific constraints should be implemented in a pluggable loader which can
5619 be registered via an entrypoint.")
5620 (license license:repoze)))
5621
5622 (define-public python-plaster-pastedeploy
5623 (package
5624 (name "python-plaster-pastedeploy")
5625 (version "0.7")
5626 (source (origin
5627 (method url-fetch)
5628 (uri (pypi-uri "plaster_pastedeploy" version))
5629 (sha256
5630 (base32
5631 "1zg7gcsvc1kzay1ry5p699rg2qavfsxqwl17mqxzr0gzw6j9679r"))))
5632 (build-system python-build-system)
5633 (native-inputs
5634 `(("python-pytest" ,python-pytest)))
5635 (propagated-inputs
5636 `(("python-plaster" ,python-plaster)
5637 ("python-pastedeploy" ,python-pastedeploy)))
5638 (home-page "https://github.com/Pylons/plaster_pastedeploy")
5639 (synopsis "Plugin for python-plaster adding PasteDeploy syntax")
5640 (description
5641 "This plugin for @code{python-plaster} adds support for PasteDeploy
5642 syntax, it provides a plaster @code{Loader} object that can parse ini files
5643 according to the standard set by PasteDeploy ")
5644 (license license:expat)))
5645
5646 (define-public python-hupper
5647 (package
5648 (name "python-hupper")
5649 (version "1.10.3")
5650 (source (origin
5651 (method url-fetch)
5652 (uri (pypi-uri "hupper" version))
5653 (sha256
5654 (base32
5655 "1nbc648d110jx6ziji980cdmzsd14p8fqrcarsdvr1vm5jvm2vyd"))))
5656 (build-system python-build-system)
5657 (arguments '(#:test-target "pytest"))
5658 (native-inputs
5659 `(("python-pytest" ,python-pytest)
5660 ("python-pytest-runner" ,python-pytest-runner)
5661 ("python-watchdog" ,python-watchdog)
5662 ("python-mock" ,python-mock)
5663 ("python-pytest-cov" ,python-pytest-cov)))
5664 (propagated-inputs
5665 `(("python-pytz" ,python-pytz)))
5666 (home-page "https://readthedocs.org/projects/hupper")
5667 (synopsis "Integrated process monitor tracking changes to imported Python files")
5668 (description
5669 "Hupper is an integrated process monitor that will track changes to any
5670 imported Python files in sys.modules as well as custom paths. When files are
5671 changed the process is restarted.")
5672 (license license:expat)))
5673
5674 (define-public python-pyramid
5675 (package
5676 (name "python-pyramid")
5677 (version "1.10.4")
5678 (source (origin
5679 (method url-fetch)
5680 (uri (pypi-uri "pyramid" version))
5681 (sha256
5682 (base32
5683 "0rkxs1ajycg2zh1c94xlmls56mx5m161sn8112skj0amza6cn36q"))))
5684 (build-system python-build-system)
5685 (propagated-inputs
5686 `(("python-hupper" ,python-hupper)
5687 ("python-plaster-pastedeploy" ,python-plaster-pastedeploy)
5688 ("python-translationstring" ,python-translationstring)
5689 ("python-venusian" ,python-venusian)
5690 ("python-webob" ,python-webob)
5691 ("python-zope-deprecation" ,python-zope-deprecation)
5692 ("python-zope-interface" ,python-zope-interface)
5693 ("python-webtest" ,python-webtest)
5694 ("python-zope-component" ,python-zope-component)
5695 ("python-plaster" ,python-plaster)))
5696 (home-page "https://trypyramid.com/")
5697 (synopsis "Python web-framework suitable for small and large sites")
5698 (description
5699 "Pyramid makes it easy to write web applications. From minimal
5700 request/response web apps to larger, grown applications.")
5701 (license license:repoze)))
5702
5703 (define-public python-random-user-agent
5704 (package
5705 (name "python-random-user-agent")
5706 (version "1.0.1")
5707 (source
5708 (origin
5709 (method url-fetch)
5710 (uri (pypi-uri "random_user_agent" version))
5711 (sha256
5712 (base32
5713 "04nhzdh2ki7ybhjrmghxci6hcm6i03vvin2q2ynj87fbr1pa534g"))))
5714 (build-system python-build-system)
5715 (home-page "https://github.com/Luqman-Ud-Din/random_user_agent")
5716 (synopsis "List of user agents")
5717 (description
5718 "This package provides a list of user agents, from a collection of more
5719 than 326,000 known user-agents. Users can pick a random one, or select one
5720 based on filters.")
5721 (license license:expat)))
5722
5723 (define-public python-flask-restx
5724 (package
5725 (name "python-flask-restx")
5726 (version "0.2.0")
5727 (source
5728 ;; We fetch from the Git repo because there are no tests in the PyPI
5729 ;; archive.
5730 (origin
5731 (method git-fetch)
5732 (uri (git-reference
5733 (url "https://github.com/python-restx/flask-restx")
5734 (commit version)))
5735 (file-name (git-file-name name version))
5736 (sha256
5737 (base32 "0xf2vkmdngp9cv9klznizai4byxjcf0iqh1pr4b83nann0jxqwy7"))))
5738 (build-system python-build-system)
5739 (propagated-inputs
5740 `(("python-aniso8601" ,python-aniso8601)
5741 ("python-flask" ,python-flask)
5742 ("python-jsonschema" ,python-jsonschema)
5743 ("python-pytz" ,python-pytz)))
5744 (native-inputs
5745 `(("python-blinker" ,python-blinker)
5746 ("python-faker" ,python-faker)
5747 ("python-pytest" ,python-pytest)
5748 ("python-pytest-benchmark"
5749 ,python-pytest-benchmark)
5750 ("python-pytest-flask" ,python-pytest-flask)
5751 ("python-pytest-mock" ,python-pytest-mock)))
5752 (arguments
5753 `(#:phases
5754 (modify-phases %standard-phases
5755 (replace 'check
5756 (lambda _
5757 (invoke "pytest" "--benchmark-skip" "-k"
5758 ;; Those tests need internet access
5759 "not test_check and not test_valid_value_check"))))))
5760 (home-page "https://github.com/python-restx/flask-restx")
5761 (synopsis
5762 "Framework for fast, easy and documented API development with Flask")
5763 (description
5764 "Flask-RESTX is an extension for Flask that adds support for quickly building
5765 REST APIs. Flask-RESTX encourages best practices with minimal setup. If you are familiar
5766 with Flask, Flask-RESTX should be easy to pick up. It provides a coherent collection of
5767 decorators and tools to describe your API and expose its documentation properly using
5768 Swagger.")
5769 (license license:bsd-3)))
5770
5771 (define-public python-flask-socketio
5772 (package
5773 (name "python-flask-socketio")
5774 (version "5.0.1")
5775 (source
5776 (origin
5777 (method url-fetch)
5778 (uri (pypi-uri "Flask-SocketIO" version))
5779 (sha256
5780 (base32
5781 "09r2gpj2nbn72v2zaf6xsvlazln77pgqzp2pg2021nja47sijhsw"))))
5782 (build-system python-build-system)
5783 (propagated-inputs
5784 `(("python-flask" ,python-flask)
5785 ("python-socketio" ,python-socketio)))
5786 (arguments '(#:tests? #f)) ; Tests not included in release tarball.
5787 (home-page "https://github.com/miguelgrinberg/Flask-SocketIO/")
5788 (synopsis "Socket.IO integration for Flask applications")
5789 (description "Socket.IO integration for Flask applications")
5790 (license license:expat)))
5791
5792 (define-public python-manuel
5793 (package
5794 (name "python-manuel")
5795 (version "1.10.1")
5796 (source
5797 (origin
5798 (method url-fetch)
5799 (uri (pypi-uri "manuel" version))
5800 (sha256
5801 (base32
5802 "1bdzay7j70fly5fy6wbdi8fbrxjrrlxnxnw226rwry1c8a351rpy"))))
5803 (build-system python-build-system)
5804 (propagated-inputs
5805 `(("python-six" ,python-six)))
5806 (native-inputs
5807 `(("python-zope-testing" ,python-zope-testing)))
5808 (home-page "https://pypi.org/project/manuel/")
5809 (synopsis "Build tested documentation")
5810 (description
5811 "Manuel lets you mix and match traditional doctests with custom test syntax.")
5812 (license license:asl2.0)))
5813
5814 (define-public python-persistent
5815 (package
5816 (name "python-persistent")
5817 (version "4.6.4")
5818 (source
5819 (origin
5820 (method url-fetch)
5821 (uri (pypi-uri "persistent" version))
5822 (sha256
5823 (base32
5824 "0imm9ji03lhkpcfmhid7x5209ix8g2rlgki9ik1qxks4b8sm8gzq"))))
5825 (build-system python-build-system)
5826 (propagated-inputs
5827 `(("python-cffi" ,python-cffi)
5828 ("python-zope-interface" ,python-zope-interface)))
5829 (native-inputs
5830 `(("python-manuel" ,python-manuel)
5831 ("python-zope-testrunner" ,python-zope-testrunner)))
5832 (home-page "https://github.com/zopefoundation/persistent/")
5833 (synopsis "Translucent persistent objects")
5834 (description "This package contains a generic persistence implementation for
5835 Python. It forms the core protocol for making objects interact
5836 \"transparently\" with a database such as the ZODB.")
5837 (license license:zpl2.1)))
5838
5839 (define-public python-btrees
5840 (package
5841 (name "python-btrees")
5842 (version "4.7.2")
5843 (source
5844 (origin
5845 (method url-fetch)
5846 (uri (pypi-uri "BTrees" version))
5847 (sha256
5848 (base32
5849 "0iiq0g9k1g6qgqq84q9h6639vlvzznk1rgdm0rfcnnqkbkmsbr3w"))))
5850 (build-system python-build-system)
5851 (propagated-inputs
5852 `(("python-persistent" ,python-persistent)
5853 ("python-zope-interface" ,python-zope-interface)))
5854 (native-inputs
5855 `(("python-persistent" ,python-persistent)
5856 ("python-transaction" ,python-transaction)
5857 ("python-zope-testrunner" ,python-zope-testrunner)))
5858 (home-page "https://github.com/zopefoundation/BTrees")
5859 (synopsis "Scalable persistent object containers")
5860 (description
5861 "This package contains a set of persistent object containers built around a
5862 modified BTree data structure. The trees are optimized for use inside ZODB's
5863 \"optimistic concurrency\" paradigm, and include explicit resolution of
5864 conflicts detected by that mechanism.")
5865 (license license:zpl2.1)))
5866
5867 (define-public python-transaction
5868 (package
5869 (name "python-transaction")
5870 (version "3.0.0")
5871 (source
5872 (origin
5873 (method url-fetch)
5874 (uri (pypi-uri "transaction" version))
5875 (sha256
5876 (base32
5877 "0bdaks31bgfh78wnj3sij24bfysmqk25crsis6amz8kzrc0d82iv"))))
5878 (build-system python-build-system)
5879 (propagated-inputs
5880 `(("python-zope-interface" ,python-zope-interface)))
5881 (native-inputs
5882 `(("python-coverage" ,python-coverage)
5883 ("python-mock" ,python-mock)
5884 ("python-nose" ,python-nose)))
5885 (home-page "https://github.com/zopefoundation/transaction")
5886 (synopsis "Transaction management for Python")
5887 (description "This package contains a generic transaction implementation
5888 for Python. It is mainly used by the ZODB.")
5889 (license license:zpl2.1)))
5890
5891 (define-public python-robot-detection
5892 (package
5893 (name "python-robot-detection")
5894 (version "0.4")
5895 (source
5896 (origin
5897 (method url-fetch)
5898 (uri (pypi-uri "robot-detection" version))
5899 (sha256
5900 (base32
5901 "1xd2jm3yn31bnk1kqzggils2rxj26ylxsfz3ap7bhr3ilhnbg3rx"))))
5902 (build-system python-build-system)
5903 (arguments '(#:tests? #f)) ; Tests not shipped in pypi release.
5904 (propagated-inputs `(("python-six" ,python-six)))
5905 (home-page "https://github.com/rory/robot-detection")
5906 (synopsis "Detect web crawlers")
5907 (description
5908 "@code{robot_detection} is a python module to detect if a given HTTP User
5909 Agent is a web crawler. It uses the list of registered robots from
5910 @url{http://www.robotstxt.org}.")
5911 (license license:gpl3+)))
5912
5913 (define-public python-pysolr
5914 (package
5915 (name "python-pysolr")
5916 (version "3.9.0")
5917 (source
5918 (origin
5919 (method url-fetch)
5920 (uri (pypi-uri "pysolr" version))
5921 (sha256
5922 (base32
5923 "1rj5jmscvxjwcmlfi6hmkj44l4x6n3ln5p7d8d18j566hzmmzw3f"))))
5924 (build-system python-build-system)
5925 (arguments
5926 '(#:tests? #f)) ; Tests require network access.
5927 (propagated-inputs
5928 `(("python-requests" ,python-requests)))
5929 (native-inputs
5930 `(("python-setuptools-scm" ,python-setuptools-scm)))
5931 (home-page "https://github.com/django-haystack/pysolr/")
5932 (synopsis "Lightweight python wrapper for Apache Solr")
5933 (description
5934 "This module provides an interface that queries the Apache Solr server
5935 using a pure Python implementation.")
5936 (license license:bsd-3)))
5937
5938 (define-public python-pyjsparser
5939 (package
5940 (name "python-pyjsparser")
5941 (version "2.7.1")
5942 (source
5943 (origin
5944 (method url-fetch)
5945 (uri (pypi-uri "pyjsparser" version))
5946 (sha256
5947 (base32 "0ycmf9fsvwliqmm1n6sfz7x71y7i2kbfgn39d8lsbiccfxmxlq5y"))))
5948 (build-system python-build-system)
5949 (home-page "https://github.com/PiotrDabkowski/pyjsparser")
5950 (synopsis "Fast JavaScript parser")
5951 (description "This package provides a fast JavaScript parser (based on
5952 esprima.js)")
5953 (license license:expat)))
5954
5955 (define-public python-js2py
5956 (package
5957 (name "python-js2py")
5958 (version "0.71")
5959 (source
5960 (origin
5961 (method url-fetch)
5962 (uri (pypi-uri "Js2Py" version))
5963 (sha256
5964 (base32 "1kkzkys6dfcbdv51vqxr9cmak350ab4mmykb8dysx60lvl4i06x4"))))
5965 (build-system python-build-system)
5966 (arguments '(#:tests? #false)) ; none included
5967 (propagated-inputs
5968 `(("python-pyjsparser" ,python-pyjsparser)
5969 ("python-six" ,python-six)
5970 ("python-tzlocal" ,python-tzlocal)))
5971 (home-page "https://github.com/PiotrDabkowski/Js2Py")
5972 (synopsis "JavaScript to Python translator")
5973 (description
5974 "This package provides a JavaScript to Python translator and a JavaScript
5975 interpreter written in pure Python.")
5976 (license license:expat)))
5977
5978 (define-public python-http-ece
5979 (package
5980 (name "python-http-ece")
5981 (version "1.1.0")
5982 (source
5983 (origin
5984 (method git-fetch)
5985 (uri (git-reference
5986 (url "https://github.com/web-push-libs/encrypted-content-encoding")
5987 (commit (string-append "v" version))))
5988 (file-name (git-file-name name version))
5989 (sha256
5990 (base32
5991 "0bp4cc0xc123i72h80ax3qz3ixfwx3j7pw343kc7i6kdvfi8klx7"))))
5992 (build-system python-build-system)
5993 (arguments
5994 `(#:phases
5995 (modify-phases %standard-phases
5996 (add-after 'unpack 'change-directory
5997 (lambda _ (chdir "python") #t)))))
5998 (propagated-inputs
5999 `(("python-cryptography" ,python-cryptography)))
6000 (native-inputs
6001 `(("python-coverage" ,python-coverage)
6002 ("python-flake8" ,python-flake8)
6003 ("python-mock" ,python-mock)
6004 ("python-nose" ,python-nose)))
6005 (home-page "https://github.com/web-push-libs/encrypted-content-encoding")
6006 (synopsis "Encrypted Content Encoding for HTTP")
6007 (description
6008 "This package provices a simple implementation of Encrypted Content
6009 Encoding for HTTP.")
6010 (license license:expat)))
6011
6012 (define-public python-cloudscraper
6013 (package
6014 (name "python-cloudscraper")
6015 (version "1.2.58")
6016 (source
6017 (origin
6018 (method git-fetch)
6019 (uri (git-reference
6020 (url "https://github.com/VeNoMouS/cloudscraper")
6021 ;; Corresponds to 1.2.58
6022 (commit "f3a3d067ea8b5238e9a0948aed0c3fa0d9c29b96")))
6023 (sha256
6024 (base32 "18fbp086imabjxly04rrchbf6n6m05bpd150zxbw7z2w3mjnpsqd"))
6025 (modules '((guix build utils)))
6026 (snippet
6027 '(with-directory-excursion "cloudscraper"
6028 (for-each delete-file
6029 '("captcha/9kw.py"
6030 "captcha/anticaptcha.py"))
6031 (substitute* "__init__.py"
6032 ;; Perhaps it's a joke, but don't promote proprietary software.
6033 (("([Th]is feature is not available) in the .*'" _ prefix)
6034 (string-append prefix ".'")))))))
6035 (build-system python-build-system)
6036 (arguments
6037 `(#:phases
6038 (modify-phases %standard-phases
6039 ;; XXX: Dependencies, that have not yet been packaged
6040 ;; and cause an import error when included.
6041 (add-after 'unpack 'drop-unsupported-sources
6042 (lambda _
6043 (with-directory-excursion "cloudscraper"
6044 (for-each delete-file
6045 '("interpreters/v8.py")))))
6046 (add-after 'unpack 'fix-references
6047 (lambda _
6048 (substitute* "cloudscraper/interpreters/nodejs.py"
6049 (("'node'")
6050 (string-append "'" (which "node") "'")))))
6051 (replace 'check
6052 (lambda* (#:key tests? #:allow-other-keys)
6053 (when tests?
6054 (invoke "pytest" "-vv"
6055 "-k" "not test_getCookieString_challenge_js_challenge1_16_05_2020")))))))
6056 (inputs
6057 `(("node" ,node)))
6058 (propagated-inputs
6059 `(("python-js2py" ,python-js2py)
6060 ("python-polling2" ,python-polling2)
6061 ("python-requests" ,python-requests)
6062 ("python-requests-toolbelt" ,python-requests-toolbelt-0.9.1)
6063 ("python-responses" ,python-responses)
6064 ("python-pyparsing" ,python-pyparsing-2.4.7)))
6065 (native-inputs
6066 `(("python-pytest" ,python-pytest)))
6067 (home-page "https://github.com/venomous/cloudscraper")
6068 (synopsis "Cloudflare anti-bot bypass")
6069 (description
6070 "This module acts as a webbrowser solving Cloudflare's Javascript
6071 challenges.")
6072 (license license:expat)))
6073
6074 (define-public python-imap-tools
6075 (package
6076 (name "python-imap-tools")
6077 (version "0.29.0")
6078 (source
6079 (origin
6080 (method url-fetch)
6081 (uri (pypi-uri "imap_tools" version))
6082 (sha256
6083 (base32
6084 "0x122jwpc74wwyw2rsv2fvh6p12y31019ndfr9717jzjkj2d3lhb"))))
6085 (build-system python-build-system)
6086 (arguments '(#:tests? #f)) ; tests require internet access
6087 (home-page "https://github.com/ikvk/imap_tools")
6088 (synopsis "Work with email and mailbox by IMAP")
6089 (description
6090 "This Python library provides tools to deal with email and mailboxes
6091 over IMAP:
6092
6093 @itemize
6094 @item Parsed email message attributes
6095 @item Query builder for searching emails
6096 @item Work with emails in folders (copy, delete, flag, move, seen)
6097 @item Work with mailbox folders (list, set, get, create, exists, rename, delete, status)
6098 @end itemize")
6099 (license license:asl2.0)))
6100
6101 (define-public python-giturlparse
6102 (package
6103 (name "python-giturlparse")
6104 (version "0.10.0")
6105 (source
6106 (origin
6107 (method url-fetch)
6108 (uri (pypi-uri "giturlparse" version))
6109 (sha256
6110 (base32 "0dxk7sqy8ibaqdl6jzxd0ac1p7shzp4p9f3lhkd7qw9h3llsp595"))))
6111 (build-system python-build-system)
6112 (home-page "https://github.com/nephila/giturlparse")
6113 (synopsis "Git URL parsing module")
6114 (description "This package provides a git URL parsing module which supports
6115 parsing and rewriting of remote git URLs from various hosting providers.")
6116 (license license:asl2.0)))
6117
6118 (define-public python-hstspreload
6119 (package
6120 (name "python-hstspreload")
6121 (version "2020.10.20")
6122 (source
6123 (origin
6124 (method url-fetch)
6125 (uri (pypi-uri "hstspreload" version))
6126 (sha256
6127 (base32
6128 "1qah80p2xlib1rhivvdj9v5y3girxrj7dwp1mnh8mwaj5wy32y8a"))))
6129 (build-system python-build-system)
6130 (home-page
6131 "https://github.com/sethmlarson/hstspreload")
6132 (synopsis
6133 "Chromium HSTS Preload list as a Python package")
6134 (description
6135 "@code{python-hstspreload} contains Chromium HSTS Preload list
6136 as a Python package.")
6137 (license license:bsd-3)))
6138
6139 (define-public python-sanic
6140 (package
6141 (name "python-sanic")
6142 (version "20.12.2")
6143 (source
6144 (origin
6145 (method url-fetch)
6146 (uri (pypi-uri "sanic" version))
6147 (sha256
6148 (base32
6149 "1c02gdp1j18xny9jd33fp0w57qqi7g66zwmaykv2dhcks96f5mxr"))))
6150 (build-system python-build-system)
6151 (arguments
6152 '(#:phases
6153 (modify-phases %standard-phases
6154 (add-after 'unpack 'use-recent-pytest
6155 ;; Allow using recent dependencies.
6156 (lambda* (#:key inputs #:allow-other-keys)
6157 (substitute* "setup.py"
6158 (("pytest==5.2.1") "pytest")
6159 (("multidict>=5.0,<6.0") "multidict")
6160 (("httpx==0\\.15\\.4") "httpx"))
6161 #t))
6162 (replace 'check
6163 (lambda* (#:key inputs outputs #:allow-other-keys)
6164 (add-installed-pythonpath inputs outputs)
6165 (invoke "pytest" "-vv" "./tests" "-k"
6166 "not test_zero_downtime and not test_gunicorn_worker"))))))
6167 (propagated-inputs
6168 `(("python-aiofiles" ,python-aiofiles)
6169 ("python-httptools" ,python-httptools)
6170 ("python-httpx" ,python-httpx)
6171 ("python-multidict" ,python-multidict)
6172 ("python-ujson" ,python-ujson)
6173 ("python-uvloop" ,python-uvloop)
6174 ("python-websockets" ,python-websockets)))
6175 (native-inputs
6176 `(("gunicorn" ,gunicorn)
6177 ("python-beautifulsoup4" ,python-beautifulsoup4)
6178 ("python-hstspreload" ,python-hstspreload)
6179 ("python-httpcore" ,python-httpcore)
6180 ("python-pytest" ,python-pytest)
6181 ("python-pytest-cov" ,python-pytest-cov)
6182 ("python-pytest-benchmark" ,python-pytest-benchmark)
6183 ("python-pytest-sanic" ,python-pytest-sanic)
6184 ("python-pytest-sugar" ,python-pytest-sugar)
6185 ("python-pytest-asyncio" ,python-pytest-asyncio)
6186 ("python-urllib3" ,python-urllib3)
6187 ("python-uvicorn" ,python-uvicorn)))
6188 (home-page
6189 "https://github.com/sanic-org/sanic/")
6190 (synopsis
6191 "Async Python web server/framework")
6192 (description
6193 "Sanic is a Python web server and web framework
6194 that's written to go fast. It allows the usage of the
6195 @code{async/await} syntax added in Python 3.5, which makes
6196 your code non-blocking and speedy.")
6197 (license license:expat)))
6198
6199 (define-public python-socketio
6200 (package
6201 (name "python-socketio")
6202 (version "5.1.0")
6203 (source
6204 (origin
6205 (method url-fetch)
6206 (uri (pypi-uri "python-socketio" version))
6207 (sha256
6208 (base32
6209 "14vhpxdn54lz54mhcqlgcks0ssbws9gd1y7ii16a2g3gpfdc531k"))))
6210 (build-system python-build-system)
6211 (propagated-inputs
6212 `(("python-aiohttp" ,python-aiohttp)
6213 ("python-bidict" ,python-bidict)
6214 ("python-engineio" ,python-engineio)
6215 ("python-requests" ,python-requests)
6216 ("python-websocket-client" ,python-websocket-client)
6217 ("python-websockets" ,python-websockets)))
6218 (arguments '(#:tests? #f)) ; Tests not included in release tarball.
6219 (home-page "https://github.com/miguelgrinberg/python-socketio/")
6220 (synopsis "Python Socket.IO server")
6221 (description
6222 "Python implementation of the Socket.IO realtime client and server.")
6223 (license license:expat)))
6224
6225 (define-public python-socks
6226 (package
6227 (name "python-socks")
6228 (version "1.2.4")
6229 (source
6230 (origin
6231 (method url-fetch)
6232 (uri (pypi-uri "python-socks" version))
6233 (sha256
6234 (base32
6235 "1n6xb18jy41ybgkmamakg6psp3qididd45qknxiggngaiibz43kx"))))
6236 (build-system python-build-system)
6237 (arguments
6238 `(#:tests? #f ; tests not included
6239 #:phases
6240 (modify-phases %standard-phases
6241 (replace 'check
6242 (lambda* (#:key tests? #:allow-other-keys)
6243 (when tests?
6244 (invoke "pytest" "tests/" "-s"))
6245 #t)))))
6246 (propagated-inputs
6247 `(("python-async-timeout" ,python-async-timeout)
6248 ("python-curio" ,python-curio)
6249 ("python-trio" ,python-trio)))
6250 (native-inputs
6251 `(("python-pytest" ,python-pytest)))
6252 (home-page "https://github.com/romis2012/python-socks")
6253 (synopsis
6254 "Core proxy (SOCKS4, SOCKS5, HTTP tunneling) functionality for Python")
6255 (description
6256 "Socks is a library providing core proxy (SOCKS4, SOCKS5, HTTP tunneling)
6257 functionality.")
6258 (license license:asl2.0)))
6259
6260 (define-public python-azure-nspkg
6261 (package
6262 (name "python-azure-nspkg")
6263 (version "3.0.2")
6264 (source
6265 (origin
6266 (method url-fetch)
6267 (uri (pypi-uri "azure-nspkg" version ".zip"))
6268 (sha256
6269 (base32
6270 "1l4xwdh0fcnvrv0mzig4g2kgqkfbsy64zjm1ggc6grk3mykcxlz7"))))
6271 (build-system python-build-system)
6272 (native-inputs `(("unzip" ,unzip)))
6273 (home-page "https://github.com/Azure/azure-sdk-for-python")
6274 (synopsis "Azure namespace internals")
6275 (description
6276 "This package is an internal Azure namespace package.")
6277 (license license:expat)))
6278
6279 (define-public python-azure-storage-nspkg
6280 (package
6281 (name "python-azure-storage-nspkg")
6282 (version "3.1.0")
6283 (source
6284 (origin
6285 (method url-fetch)
6286 (uri (pypi-uri "azure-storage-nspkg" version))
6287 (sha256
6288 (base32
6289 "049qcmgshz7dj9yaqma0fwcgbxwddgwyfcw4gmv45xfmaa3bwfvg"))))
6290 (build-system python-build-system)
6291 (propagated-inputs
6292 `(("python-azure-nspkg" ,python-azure-nspkg)))
6293 (home-page "https://github.com/Azure/azure-storage-python")
6294 (synopsis "Microsoft Azure Storage Namespace package")
6295 (description
6296 "This project provides a client library in Python that makes it easy to
6297 communicate with Microsoft Azure Storage services.")
6298 (license license:expat)))
6299
6300 (define-public python-w3lib
6301 (package
6302 (name "python-w3lib")
6303 (version "1.22.0")
6304 (source
6305 (origin
6306 (method url-fetch)
6307 (uri (pypi-uri "w3lib" version))
6308 (sha256
6309 (base32
6310 "1pv02lvvmgz2qb61vz1jkjc04fgm4hpfvaj5zm4i3mjp64hd1mha"))))
6311 (build-system python-build-system)
6312 (native-inputs
6313 `(("python-six" ,python-six)))
6314 (home-page "https://github.com/scrapy/w3lib")
6315 (synopsis "Python library of web-related functions")
6316 (description
6317 "This is a Python library of web-related functions, such as: remove
6318 comments, or tags from HTML snippets, extract base url from HTML snippets,
6319 translate entities on HTML strings, among other things.")
6320 (license license:bsd-3)))
6321
6322 (define-public python-webcolors
6323 (package
6324 (name "python-webcolors")
6325 (version "1.11.1")
6326 (source
6327 (origin
6328 (method url-fetch)
6329 (uri (pypi-uri "webcolors" version))
6330 (sha256
6331 (base32 "1rkda75h2p65zx6r84c9mjavn4xpviqvqrklvdvcklapd5in1wvn"))))
6332 (build-system python-build-system)
6333 (arguments
6334 `(#:phases
6335 (modify-phases %standard-phases
6336 (replace 'check
6337 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
6338 (when tests?
6339 (add-installed-pythonpath inputs outputs)
6340 (invoke "pytest")))))))
6341 (native-inputs
6342 `(("python-pytest" ,python-pytest)))
6343 (home-page "https://github.com/ubernostrum/webcolors")
6344 (synopsis "HTML/CSS color definitions library")
6345 (description "@code{python-webcolors} is a module for working with
6346 HTML/CSS color definitions. Normalizing and converting between the following
6347 formats is supported.
6348 @itemize
6349 @item Specification-defined color names
6350 @item Six-digit hexadecimal
6351 @item Three-digit hexadecimal
6352 @item Integer rgb() triplet
6353 @item Percentage rgb() triplet
6354 @end itemize
6355 Only the RGB colorspace is supported. Conversion to/from the HSL colorspace
6356 can be handled by the @code{colorsys} module in the Python standard library.")
6357 (license license:bsd-3)))
6358
6359 (define-public python-woob
6360 (package
6361 (name "python-woob")
6362 (version "3.0")
6363 (source
6364 (origin
6365 (method url-fetch)
6366 (uri (pypi-uri "woob" version))
6367 (sha256
6368 (base32 "09hpxy5zhn2b8li0xjf3zd7s46lawb0315p5mdcsci3bj3s4v1j7"))))
6369 (build-system python-build-system)
6370 ;; A small number of tests for optional applications fails due to missing
6371 ;; inputs.
6372 (arguments `(#:tests? #f))
6373 (propagated-inputs
6374 `(("python-babel" ,python-babel)
6375 ("python-colorama" ,python-colorama)
6376 ("python-cssselect" ,python-cssselect)
6377 ("python-dateutil" ,python-dateutil)
6378 ("python-feedparser" ,python-feedparser)
6379 ("python-html2text" ,python-html2text)
6380 ("python-lxml" ,python-lxml)
6381 ("python-pillow" ,python-pillow)
6382 ("python-prettytable" ,python-prettytable)
6383 ("python-pyqt" ,python-pyqt)
6384 ("python-pyyaml" ,python-pyyaml)
6385 ("python-requests" ,python-requests)
6386 ("python-six" ,python-six)
6387 ("python-unidecode" ,python-unidecode)))
6388 (native-inputs
6389 `(("python-coverage" ,python-coverage)
6390 ("python-flake8" ,python-flake8)
6391 ("python-nose" ,python-nose)
6392 ("python-selenium" ,python-selenium)
6393 ("python-xunitparser" ,python-xunitparser)))
6394 (home-page "https://woob.tech/")
6395 (synopsis "Woob, Web Outside Of Browsers")
6396 (description "Woob is a collection of applications able to interact with
6397 websites, without requiring the user to open them in a browser. It also
6398 provides well-defined APIs to talk to websites lacking one.")
6399 (license license:lgpl3+)))
6400
6401 (define-public python-flask-combo-jsonapi
6402 (package
6403 (name "python-flask-combo-jsonapi")
6404 (version "1.1.0")
6405 (source
6406 (origin
6407 (method git-fetch)
6408 (uri (git-reference
6409 (url "https://github.com/AdCombo/flask-combo-jsonapi")
6410 (commit version)))
6411 (file-name (git-file-name name version))
6412 (sha256
6413 (base32 "07fhcjiyif80z1vyh35za29sqx1mmqh568jrbrrs675j4a797sj1"))))
6414 (build-system python-build-system)
6415 (propagated-inputs
6416 `(("python-flask" ,python-flask)
6417 ("python-marshmallow" ,python-marshmallow-3.2)
6418 ("python-marshmallow-jsonapi" ,python-marshmallow-jsonapi)
6419 ("python-simplejson" ,python-simplejson)
6420 ("python-sqlalchemy" ,python-sqlalchemy-1.3)
6421 ("python-apispec" ,python-apispec)
6422 ("python-simplejson" ,python-simplejson)
6423 ("python-six" ,python-six)))
6424 (native-inputs
6425 `(("python-coverage" ,python-coverage)
6426 ("python-coveralls" ,python-coveralls)
6427 ("python-pytest" ,python-pytest)
6428 ("python-pytest-runner" ,python-pytest-runner)))
6429 (home-page "https://github.com/AdCombo/flask-combo-jsonapi")
6430 (synopsis "Flask extension to quickly create JSON:API 1.0 REST Web APIs")
6431 (description
6432 "Flask-COMBO-JSONAPI is a Python Flask extension for building REST Web APIs
6433 compliant with the @uref{https://jsonapi.org, JSON:API 1.0} specification.
6434
6435 It tries to combine the power of Flask-Restless with the flexibility of
6436 Flask-RESTful to quickly build APIs that fit the complexity of existing
6437 real-life projects with legacy data and diverse storage providers.")
6438 (license license:expat)))
6439
6440 (define-public python-mwparserfromhell
6441 (package
6442 (name "python-mwparserfromhell")
6443 (version "0.6.3")
6444 (source
6445 (origin
6446 (method url-fetch)
6447 (uri (pypi-uri "mwparserfromhell" version))
6448 (sha256
6449 (base32 "0zh9zaqbac18s7mivqk8am9xw97lfkgcj9hhxj0d4208pkqpkmqs"))))
6450 (build-system python-build-system)
6451 (native-inputs
6452 `(("python-pytest" ,python-pytest)
6453 ("python-pytest-runner" ,python-pytest-runner)))
6454 (home-page "https://github.com/earwig/mwparserfromhell")
6455 (synopsis "Python parser for MediaWiki wikicode")
6456 (description
6457 "The MediaWiki Parser From Hell is a python library package that provides
6458 a parser for MediaWiki.
6459
6460 It exposes parses as normal string objects with additional methods giving
6461 access to the special Wikicode features it contains (hyperlinks, tags,
6462 templates…). The parser doesn't interpolate strings at all, it remains at a
6463 purely formal level.
6464
6465 Full documentation may be found at
6466 @uref{https://mwparserfromhell.readthedocs.io, ReadTheDocs}")
6467 (license license:expat)))