diff options
Diffstat (limited to 'gnu/packages/python-web.scm')
-rw-r--r-- | gnu/packages/python-web.scm | 67 |
1 files changed, 16 insertions, 51 deletions
diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 81cd4daea2..b7fc487bb5 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -192,12 +192,9 @@ API rules.") (string-append "@pytest.mark.xfail\n" all))) ;; Don't test the aiohttp pytest plugin to avoid a dependency loop. - (delete-file "tests/test_pytest_plugin.py") - #t)) + (delete-file "tests/test_pytest_plugin.py"))) (replace 'check (lambda* (#:key tests? #:allow-other-keys) - (setenv "PYTHONPATH" - (string-append ".:" (getenv "PYTHONPATH"))) (if tests? (invoke "pytest" "-vv" ;; Disable loading the aiohttp coverage plugin @@ -320,9 +317,6 @@ comes with a SOCKS proxy client.") '(#:phases (modify-phases %standard-phases (replace 'check (lambda _ - (setenv "PYTHONPATH" - (string-append "./build/lib:" - (getenv "PYTHONPATH"))) (invoke "pytest" "-vv")))))) (native-inputs `(("python-pytest" ,python-pytest) @@ -434,9 +428,6 @@ Model} (SAM) templates into AWS CloudFormation templates.") "tests/ext/aiohttp/test_client.py")))) (replace 'check (lambda _ - (setenv "PYTHONPATH" - (string-append "./build/lib:.:" - (getenv "PYTHONPATH"))) (invoke "pytest" "-vv" "tests")))))) (native-inputs `(;; These are required for the test suite. @@ -486,11 +477,6 @@ emit information from within their applications to the AWS X-Ray service.") ;; to avoid a dependency on 'git'. (delete-file "test/unit/module/maintenance/test_update_documentation.py") - (setenv "PYTHONPATH" - (string-append "./build/lib:" - (getenv "PYTHONPATH"))) - (setenv "PATH" (string-append out "/bin:" - (getenv "PATH"))) (invoke "python" "-m" "unittest" "discover" "-s" "test"))))))) (native-inputs @@ -773,9 +759,6 @@ content using a variety of algorithms.") `(#:phases (modify-phases %standard-phases (replace 'check (lambda _ - (setenv "PYTHONPATH" - (string-append "./build/lib:" - (getenv "PYTHONPATH"))) (invoke "pytest" "-vv" ;; Prevent running the flake8 and black ;; pytest plugins, which only tests style @@ -1442,9 +1425,6 @@ another XPath engine to find the matching elements in an XML or HTML document.") `(#:phases (modify-phases %standard-phases (replace 'check (lambda _ - (setenv "PYTHONPATH" - (string-append "./build/lib:" - (getenv "PYTHONPATH"))) (invoke "pytest" "tests" "-vv" ;; XXX: This fails with newer Pytest ;; (upstream uses Pytest 3..). @@ -2757,15 +2737,14 @@ authenticated session objects providing things like keep-alive.") (define-public python-urllib3 (package (name "python-urllib3") - (version "1.26.2") + (version "1.26.4") (source (origin (method url-fetch) (uri (pypi-uri "urllib3" version)) (sha256 (base32 - "024yldjwjavps39yb77sc422z8fa9bn20wcqrcncjwrqjab8y60r")))) - (replacement python-urllib3/fixed) + "0dw9w9bs3hmr5dp3r3h43jyzzb1g1046ag7lj8pqf58i4kvj3c77")))) (build-system python-build-system) (arguments `(#:tests? #f)) (propagated-inputs @@ -2784,18 +2763,6 @@ supports url redirection and retries, and also gzip and deflate decoding.") (properties `((python2-variant . ,(delay python2-urllib3)))) (license license:expat))) -(define python-urllib3/fixed - (package - (inherit python-urllib3) - (version "1.26.4") - (source - (origin - (method url-fetch) - (uri (pypi-uri "urllib3" version)) - (sha256 - (base32 - "0dw9w9bs3hmr5dp3r3h43jyzzb1g1046ag7lj8pqf58i4kvj3c77")))))) - ;; Some software requires an older version of urllib3, notably Docker. (define-public python-urllib3-1.24 (package (inherit python-urllib3) @@ -2960,8 +2927,6 @@ minimum of WSGI.") (modify-phases %standard-phases (replace 'check (lambda _ - (setenv "PYTHONPATH" (string-append "./build/lib:" - (getenv "PYTHONPATH"))) (invoke "pytest" "-vv" "tests")))))) (native-inputs `(("python-pytest" ,python-pytest))) @@ -2994,8 +2959,6 @@ presume or force a developer to use a particular tool or library.") (modify-phases %standard-phases (replace 'check (lambda _ - (setenv "PYTHONPATH" (string-append "./build/lib:" - (getenv "PYTHONPATH"))) (invoke "pytest" "-vv")))))) (propagated-inputs `(("python-flask-babel" ,python-flask-babel) @@ -3769,13 +3732,9 @@ for Flask.") (lambda _ ;; This test requires 'postcss' and 'babel' which are ;; not yet available in Guix. - (delete-file "tests/test_filters.py") - #t)) + (delete-file "tests/test_filters.py"))) (replace 'check (lambda _ - (setenv "PYTHONPATH" - (string-append "./build/lib:" - (getenv "PYTHONPATH"))) (invoke "pytest" "-vv")))))) (native-inputs `(("python-jinja2" ,python-jinja2) @@ -4543,7 +4502,8 @@ Python.") (sha256 (base32 "0w22fapghmzk3xdasc4dn7h8sl58l08d1h5zbf72dh80drv1g9b9")))) (propagated-inputs - `(("python-unidecode" ,python-unidecode))) + `(("python-unidecode" ,python-unidecode) + ("python-text-unidecode" ,python-text-unidecode))) (arguments `(#:phases (modify-phases %standard-phases @@ -4771,14 +4731,11 @@ event loop. It is implemented in Cython and uses libuv under the hood.") (lambda _ (invoke "make" "-C" "docs" "PAPER=a4" "html" "info") (delete-file "docs/build/texinfo/Makefile") - (delete-file "docs/build/texinfo/Gunicorn.texi") - #t)) + (delete-file "docs/build/texinfo/Gunicorn.texi"))) (replace 'check (lambda* (#:key tests? #:allow-other-keys) (if tests? (begin - (setenv "PYTHONPATH" - (string-append ".:" (getenv "PYTHONPATH"))) (invoke "pytest" "-vv" ;; Disable the geventlet tests because eventlet uses ;; dnspython, which does not work in the build @@ -5324,7 +5281,15 @@ Plus all the standard features of requests: (base32 "03s3ml6sbki24aajllf8aily0xzrn929zxi84p50zkkbikdd4raw")))) (build-system python-build-system) - (arguments '(#:tests? #f)) ; Tests not included in release tarball. + (arguments + '(#:tests? #f ; Tests not included in release tarball. + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'fix-websockets-package-name-requirement + (lambda* (#:key inputs #:allow-other-keys) + ;; Python package names use dot as separator. + (substitute* "setup.py" + (("websockets/extensions") "websockets.extensions"))))))) (home-page "https://github.com/aaugustin/websockets") (synopsis "Python implementation of the WebSocket Protocol (RFC 6455 & 7692)") |