diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2021-07-18 16:05:21 +0200 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2021-07-18 19:50:01 +0200 |
| commit | 0e47fcced442d8e7c1b05184fdc1c14f10ed04ec (patch) | |
| tree | 4ae844bc0ec3c670f8697bdc24362c122fa718ad /gnu/packages/python-web.scm | |
| parent | e4b70bc55a538569465bcedee19d1f2607308e65 (diff) | |
| parent | 8b1bde7bb3936a64244824500ffe60f123704437 (diff) | |
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/packages/python-web.scm')
| -rw-r--r-- | gnu/packages/python-web.scm | 132 |
1 files changed, 104 insertions, 28 deletions
diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index e4d1326fb8f..3ce4eb9ab27 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm | |||
| @@ -42,6 +42,7 @@ | |||
| 42 | ;;; Copyright © 2020 Giacomo Leidi <goodoldpaul@autistici.org> | 42 | ;;; Copyright © 2020 Giacomo Leidi <goodoldpaul@autistici.org> |
| 43 | ;;; Copyright © 2021 Ekaitz Zarraga <ekaitz@elenq.tech> | 43 | ;;; Copyright © 2021 Ekaitz Zarraga <ekaitz@elenq.tech> |
| 44 | ;;; Copyright © 2021 Greg Hogan <code@greghogan.com> | 44 | ;;; Copyright © 2021 Greg Hogan <code@greghogan.com> |
| 45 | ;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be> | ||
| 45 | ;;; | 46 | ;;; |
| 46 | ;;; This file is part of GNU Guix. | 47 | ;;; This file is part of GNU Guix. |
| 47 | ;;; | 48 | ;;; |
| @@ -826,9 +827,10 @@ follow links and submit forms. It doesn’t do JavaScript.") | |||
| 826 | `(#:phases | 827 | `(#:phases |
| 827 | (modify-phases %standard-phases | 828 | (modify-phases %standard-phases |
| 828 | (replace 'check | 829 | (replace 'check |
| 829 | (lambda* (#:key inputs outputs #:allow-other-keys) | 830 | (lambda* (#:key tests? inputs outputs #:allow-other-keys) |
| 830 | (add-installed-pythonpath inputs outputs) | 831 | (when tests? |
| 831 | (invoke "pytest" "-vv" "test")))))) | 832 | (add-installed-pythonpath inputs outputs) |
| 833 | (invoke "pytest" "-vv" "test"))))))) | ||
| 832 | (native-inputs | 834 | (native-inputs |
| 833 | `(("python-pytest" ,python-pytest))) | 835 | `(("python-pytest" ,python-pytest))) |
| 834 | (home-page "https://github.com/python-hyper/hyperframe") | 836 | (home-page "https://github.com/python-hyper/hyperframe") |
| @@ -858,12 +860,13 @@ into HTTP/2 frames.") | |||
| 858 | `(#:phases | 860 | `(#:phases |
| 859 | (modify-phases %standard-phases | 861 | (modify-phases %standard-phases |
| 860 | (replace 'check | 862 | (replace 'check |
| 861 | (lambda* (#:key inputs outputs #:allow-other-keys) | 863 | (lambda* (#:key tests? inputs outputs #:allow-other-keys) |
| 862 | (add-installed-pythonpath inputs outputs) | 864 | (when tests? |
| 863 | (invoke "pytest" "-vv" "test" "-k" | 865 | (add-installed-pythonpath inputs outputs) |
| 864 | ;; This test will be fixed in the next version. See: | 866 | (invoke "pytest" "-vv" "test" "-k" |
| 865 | ;; https://github.com/python-hyper/hpack/issues/168. | 867 | ;; This test will be fixed in the next version. See: |
| 866 | "not test_get_by_index_out_of_range")))))) | 868 | ;; https://github.com/python-hyper/hpack/issues/168. |
| 869 | "not test_get_by_index_out_of_range"))))))) | ||
| 867 | (native-inputs | 870 | (native-inputs |
| 868 | `(("python-pytest" ,python-pytest))) | 871 | `(("python-pytest" ,python-pytest))) |
| 869 | (home-page "https://hyper.rtfd.org") | 872 | (home-page "https://hyper.rtfd.org") |
| @@ -888,8 +891,9 @@ for use in Python programs that implement HTTP/2.") | |||
| 888 | `(#:phases | 891 | `(#:phases |
| 889 | (modify-phases %standard-phases | 892 | (modify-phases %standard-phases |
| 890 | (replace 'check | 893 | (replace 'check |
| 891 | (lambda _ | 894 | (lambda* (#:key tests? #:allow-other-keys) |
| 892 | (invoke "pytest" "-vv")))))) | 895 | (when tests? |
| 896 | (invoke "pytest" "-vv"))))))) | ||
| 893 | (native-inputs | 897 | (native-inputs |
| 894 | `(("python-pytest" ,python-pytest))) | 898 | `(("python-pytest" ,python-pytest))) |
| 895 | (home-page "https://github.com/python-hyper/h11") | 899 | (home-page "https://github.com/python-hyper/h11") |
| @@ -916,9 +920,10 @@ and that could be anything you want.") | |||
| 916 | `(#:phases | 920 | `(#:phases |
| 917 | (modify-phases %standard-phases | 921 | (modify-phases %standard-phases |
| 918 | (replace 'check | 922 | (replace 'check |
| 919 | (lambda* (#:key inputs outputs #:allow-other-keys) | 923 | (lambda* (#:key tests? inputs outputs #:allow-other-keys) |
| 920 | (add-installed-pythonpath inputs outputs) | 924 | (when tests? |
| 921 | (invoke "pytest" "-vv" "test")))))) | 925 | (add-installed-pythonpath inputs outputs) |
| 926 | (invoke "pytest" "-vv" "test"))))))) | ||
| 922 | (native-inputs | 927 | (native-inputs |
| 923 | `(("python-pytest" ,python-pytest))) | 928 | `(("python-pytest" ,python-pytest))) |
| 924 | (propagated-inputs | 929 | (propagated-inputs |
| @@ -1752,17 +1757,7 @@ web framework, either via the basic or digest authentication schemes.") | |||
| 1752 | (synopsis "Terminals served to term.js using Tornado websockets") | 1757 | (synopsis "Terminals served to term.js using Tornado websockets") |
| 1753 | (description "This package provides a Tornado websocket backend for the | 1758 | (description "This package provides a Tornado websocket backend for the |
| 1754 | term.js Javascript terminal emulator library.") | 1759 | term.js Javascript terminal emulator library.") |
| 1755 | (license license:bsd-2) | 1760 | (license license:bsd-2))) |
| 1756 | (properties `((python2-variant . ,(delay python2-terminado)))))) | ||
| 1757 | |||
| 1758 | (define-public python2-terminado | ||
| 1759 | (let ((terminado (package-with-python2 (strip-python2-variant python-terminado)))) | ||
| 1760 | (package/inherit terminado | ||
| 1761 | (propagated-inputs | ||
| 1762 | `(("python2-backport-ssl-match-hostname" | ||
| 1763 | ,python2-backport-ssl-match-hostname) | ||
| 1764 | ("python2-futures" ,python2-futures) | ||
| 1765 | ,@(package-propagated-inputs terminado)))))) | ||
| 1766 | 1761 | ||
| 1767 | (define-public python-wsgi-intercept | 1762 | (define-public python-wsgi-intercept |
| 1768 | (package | 1763 | (package |
| @@ -2849,9 +2844,6 @@ It also includes code to sign requests and pass private data, | |||
| 2849 | and to spawn subprocesses to handle requests.") | 2844 | and to spawn subprocesses to handle requests.") |
| 2850 | (license license:expat))) | 2845 | (license license:expat))) |
| 2851 | 2846 | ||
| 2852 | (define-public python2-wsgiproxy2 | ||
| 2853 | (package-with-python2 python-wsgiproxy2)) | ||
| 2854 | |||
| 2855 | (define-public python-pastedeploy | 2847 | (define-public python-pastedeploy |
| 2856 | (package | 2848 | (package |
| 2857 | (name "python-pastedeploy") | 2849 | (name "python-pastedeploy") |
| @@ -5268,6 +5260,90 @@ Plus all the standard features of requests: | |||
| 5268 | @end itemize") | 5260 | @end itemize") |
| 5269 | (license license:bsd-3))) | 5261 | (license license:bsd-3))) |
| 5270 | 5262 | ||
| 5263 | (define-public python-wsgiprox | ||
| 5264 | (package | ||
| 5265 | (name "python-wsgiprox") | ||
| 5266 | (version "1.5.2") | ||
| 5267 | (source | ||
| 5268 | (origin | ||
| 5269 | (method url-fetch) | ||
| 5270 | (uri (pypi-uri "wsgiprox" version)) | ||
| 5271 | (sha256 | ||
| 5272 | (base32 | ||
| 5273 | "11fsm199pvwbmqx2lccznvws65aam1rqqv0w79gal8hispwgd5rs")))) | ||
| 5274 | (build-system python-build-system) | ||
| 5275 | (arguments | ||
| 5276 | ;; The test suite hangs (see: | ||
| 5277 | ;; https://github.com/webrecorder/wsgiprox/issues/6). | ||
| 5278 | `(#:tests? #f | ||
| 5279 | #:phases | ||
| 5280 | (modify-phases %standard-phases | ||
| 5281 | (add-after 'unpack 'fix-pytest-argument | ||
| 5282 | (lambda _ | ||
| 5283 | ;; See: https://github.com/webrecorder/wsgiprox/issues/7. | ||
| 5284 | (substitute* "setup.py" | ||
| 5285 | (("--doctest-module") | ||
| 5286 | "--doctest-modules"))))))) | ||
| 5287 | (propagated-inputs | ||
| 5288 | `(("python-certauth" ,python-certauth) | ||
| 5289 | ("python-gevent" ,python-gevent) | ||
| 5290 | ("python-websocket-client" ,python-websocket-client))) | ||
| 5291 | (native-inputs | ||
| 5292 | `(("python-mock" ,python-mock) | ||
| 5293 | ("python-pytest-cov" ,python-pytest-cov) | ||
| 5294 | ("python-waitress" ,python-waitress))) | ||
| 5295 | (home-page "https://github.com/webrecorder/wsgiprox") | ||
| 5296 | (synopsis "HTTP/S proxy with WebSockets over WSGI") | ||
| 5297 | (description "@code{wsgiprox} is a Python WSGI (Web Server Gateway | ||
| 5298 | Interface) middle-ware for adding HTTP and HTTPS proxy support to a WSGI | ||
| 5299 | application. The library accepts HTTP and HTTPS proxy connections, and routes | ||
| 5300 | them to a designated prefix.") | ||
| 5301 | (license license:asl2.0))) | ||
| 5302 | |||
| 5303 | (define-public python-warcio | ||
| 5304 | ;; The PyPI release is missing some test support files (see: | ||
| 5305 | ;; https://github.com/webrecorder/warcio/issues/132). | ||
| 5306 | (let ((revision "0") | ||
| 5307 | (commit "aa702cb321621b233c6e5d2a4780151282a778be")) | ||
| 5308 | (package | ||
| 5309 | (name "python-warcio") | ||
| 5310 | (version (git-version "1.7.4" revision commit)) | ||
| 5311 | (source | ||
| 5312 | (origin | ||
| 5313 | (method git-fetch) | ||
| 5314 | (uri (git-reference | ||
| 5315 | (url "https://github.com/webrecorder/warcio") | ||
| 5316 | (commit commit))) | ||
| 5317 | (file-name (git-file-name name version)) | ||
| 5318 | (sha256 | ||
| 5319 | (base32 | ||
| 5320 | "11afr6zy3r6rda81010iq496dazg4xid0izg3smg6ighpmvsnzf2")))) | ||
| 5321 | (build-system python-build-system) | ||
| 5322 | (arguments | ||
| 5323 | `(#:phases | ||
| 5324 | (modify-phases %standard-phases | ||
| 5325 | (add-after 'unpack 'skip-problematic-tests | ||
| 5326 | (lambda _ | ||
| 5327 | ;; These tests fail due to networking requirements. | ||
| 5328 | (substitute* "setup.py" | ||
| 5329 | (("pytest.main\\(\\[" all) | ||
| 5330 | (string-append all "'-k', '" | ||
| 5331 | (string-append "not test_post_chunked and " | ||
| 5332 | "not test_remote") "'")))))))) | ||
| 5333 | (native-inputs | ||
| 5334 | ;; These inputs are required for the test suite. | ||
| 5335 | `(("python-httpbin" ,python-httpbin) | ||
| 5336 | ("python-pytest-cov" ,python-pytest-cov) | ||
| 5337 | ("python-requests" ,python-requests) | ||
| 5338 | ("python-wsgiprox" ,python-wsgiprox))) | ||
| 5339 | (home-page "https://github.com/webrecorder/warcio") | ||
| 5340 | (synopsis "Streaming web archival archive (WARC) library") | ||
| 5341 | (description "warcio is a Python library to read and write the WARC format | ||
| 5342 | commonly used in Web archives. It is designed for fast, low-level access to | ||
| 5343 | web archival content, oriented around a stream of WARC records rather than | ||
| 5344 | files.") | ||
| 5345 | (license license:asl2.0)))) | ||
| 5346 | |||
| 5271 | (define-public python-websockets | 5347 | (define-public python-websockets |
| 5272 | (package | 5348 | (package |
| 5273 | (name "python-websockets") | 5349 | (name "python-websockets") |
