summaryrefslogtreecommitdiff
path: root/gnu/packages/python-web.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/python-web.scm')
-rw-r--r--gnu/packages/python-web.scm67
1 files changed, 16 insertions, 51 deletions
diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index 86a732fa1b..23978547d0 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
@@ -1439,9 +1422,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..).
@@ -2754,15 +2734,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
@@ -2781,18 +2760,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)
@@ -2957,8 +2924,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)))
@@ -2991,8 +2956,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)
@@ -3766,13 +3729,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)
@@ -4540,7 +4499,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
@@ -4768,14 +4728,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
@@ -5321,7 +5278,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)")