From cf11bb5b9f29c165bdb8818b5695a2483bb2cff7 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Mon, 12 Apr 2021 02:48:18 +0200 Subject: gnu: python-webtest: Update to 2.0.35. * gnu/packages/python-web.scm (python-webtest): Update to 2.0.35. --- gnu/packages/python-web.scm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'gnu/packages/python-web.scm') diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 1e571655099..4f34502e86f 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -2916,14 +2916,13 @@ file.") (define-public python-webtest (package (name "python-webtest") - (version "2.0.33") + (version "2.0.35") (source (origin (method url-fetch) (uri (pypi-uri "WebTest" version)) (sha256 - (base32 - "1l3z0cwqslsf4rcrhi2gr8kdfh74wn2dw76376i4g9i38gz8wd21")))) + (base32 "11xhgdj251zkvz5w30fvspii08ki2vrpr1im9sph1wmlnasnihda")))) (build-system python-build-system) (arguments ;; Tests require python-pyquery, which creates a circular dependency. -- cgit v1.3 From 4cfc87d69949e999c2f13442c0519895fed8613e Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 5 May 2021 18:21:15 +0200 Subject: gnu: python-asgiref: Update to 3.3.4. * gnu/packages/python-web.scm (python-asgiref): Update to 3.3.4. --- gnu/packages/python-web.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/python-web.scm') diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 4f34502e86f..f13fb5b5c28 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -307,13 +307,13 @@ comes with a SOCKS proxy client.") (define-public python-asgiref (package (name "python-asgiref") - (version "3.2.10") + (version "3.3.4") (source (origin (method url-fetch) (uri (pypi-uri "asgiref" version)) (sha256 (base32 - "06kg3hnnvh7qg0w9amkvk1hd6n6bs055r04b7if6ipa7w4g92lby")))) + "0y0vdzldjkbs4pxf10pi6jpxq9b2sfp1rlwm153jcf5nvzxns8fi")))) (build-system python-build-system) (arguments '(#:phases (modify-phases %standard-phases -- cgit v1.3 From d51daf25c4210bdfe8e4d9db096bb8ccf088d3b4 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 6 May 2021 01:00:38 +0200 Subject: gnu: gunicorn: Respect '--without-tests'. * gnu/packages/python-web.scm (gunicorn)[arguments]: Only run tests when TESTS? is #true. --- gnu/packages/python-web.scm | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'gnu/packages/python-web.scm') diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index f13fb5b5c28..8b6b667c3fb 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -4,7 +4,7 @@ ;;; Copyright © 2017 Christopher Baines ;;; Copyright © 2016, 2017 Danny Milosavljevic ;;; Copyright © 2013, 2014, 2015, 2016, 2020 Andreas Enge -;;; Copyright © 2016, 2017, 2019, 2020 Marius Bakke +;;; Copyright © 2016, 2017, 2019, 2020, 2021 Marius Bakke ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ricardo Wurmus ;;; Copyright © 2017 Roel Janssen ;;; Copyright © 2016, 2017, 2020 Julien Lepiller @@ -4708,10 +4708,13 @@ event loop. It is implemented in Cython and uses libuv under the hood.") (delete-file "docs/build/texinfo/Gunicorn.texi") #t)) (replace 'check - (lambda _ - (setenv "PYTHONPATH" - (string-append ".:" (getenv "PYTHONPATH"))) - (invoke "pytest"))) + (lambda* (#:key tests? #:allow-other-keys) + (if tests? + (begin + (setenv "PYTHONPATH" + (string-append ".:" (getenv "PYTHONPATH"))) + (invoke "pytest" "-vv")) + (format #t "test suite not run~%")))) (add-after 'install 'install-doc (lambda* (#:key outputs #:allow-other-keys) (let* ((doc (string-append (assoc-ref outputs "doc") -- cgit v1.3 From 0f056f2c3360fe43ed12a554cca34617435fe8ee Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 6 May 2021 01:01:58 +0200 Subject: gnu: gunicorn: Remove unneeded runtime dependencies. * gnu/packages/python-web.scm (gunicorn)[arguments]: Override 'wrap' phase. --- gnu/packages/python-web.scm | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'gnu/packages/python-web.scm') diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 8b6b667c3fb..4d6d4788a8d 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -4730,8 +4730,22 @@ event loop. It is implemented in Cython and uses libuv under the hood.") (copy-recursively "examples" examples) (for-each (lambda (file) (copy-file file (string-append doc "/" file))) - '("README.rst" "NOTICE" "LICENSE" "THANKS"))) - #t))))) + '("README.rst" "NOTICE" "LICENSE" "THANKS"))))) + ;; XXX: The wrap phase includes native inputs on PYTHONPATH, (see + ;; ), leading to an inflated closure + ;; size. Override it to only add the essential entries. + (replace 'wrap + (lambda* (#:key native-inputs inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (python (assoc-ref (or native-inputs inputs) "python")) + (sitedir (string-append "/lib/python" + (python-version python) + "/site-packages"))) + (wrap-program (string-append out "/bin/gunicorn") + `("PYTHONPATH" ":" prefix + ,(map (lambda (output) + (string-append output sitedir)) + (list python out)))))))))) (native-inputs `(("binutils" ,binutils) ;; for ctypes.util.find_library() ("python-aiohttp" ,python-aiohttp) -- cgit v1.3 From 4bdc52bc21d501c7d8e2b6d1d3951783288e0398 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 6 May 2021 01:20:51 +0200 Subject: gnu: gunicorn: Update to 2.1.0. * gnu/packages/python-web.scm (gunicorn): Update to 2.1.0. [arguments]: Ignore one test that cannot run in the build container. [native-inputs]: Add PYTHON-GEVENT. --- gnu/packages/python-web.scm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'gnu/packages/python-web.scm') diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 4d6d4788a8d..5897893de3d 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -4688,14 +4688,14 @@ event loop. It is implemented in Cython and uses libuv under the hood.") (define-public gunicorn (package (name "gunicorn") - (version "20.0.4") + (version "20.1.0") (source (origin (method url-fetch) (uri (pypi-uri "gunicorn" version)) (sha256 (base32 - "09n6fc019bgrvph1s5h1lwhn2avcsprw6ncd203qhra3i8mvn10r")))) + "1s7670qw36x90bgmazmgib170i5gnpyb2ypxzlla7y0mpasniag0")))) (outputs '("out" "doc")) (build-system python-build-system) (arguments @@ -4713,7 +4713,11 @@ event loop. It is implemented in Cython and uses libuv under the hood.") (begin (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH"))) - (invoke "pytest" "-vv")) + (invoke "pytest" "-vv" + ;; Disable the geventlet tests because eventlet uses + ;; dnspython, which does not work in the build + ;; container due to lack of /etc/resolv.conf, etc. + "--ignore=tests/workers/test_geventlet.py")) (format #t "test suite not run~%")))) (add-after 'install 'install-doc (lambda* (#:key outputs #:allow-other-keys) @@ -4749,6 +4753,7 @@ event loop. It is implemented in Cython and uses libuv under the hood.") (native-inputs `(("binutils" ,binutils) ;; for ctypes.util.find_library() ("python-aiohttp" ,python-aiohttp) + ("python-gevent" ,python-gevent) ("python-pytest" ,python-pytest) ("python-pytest-cov" ,python-pytest-cov) ("python-sphinx" ,python-sphinx) -- cgit v1.3 From 5802228fca6ec789f973fcf6cc9bdaf39b40a97a Mon Sep 17 00:00:00 2001 From: Vinicius Monego Date: Tue, 20 Apr 2021 05:22:33 +0000 Subject: gnu: Add python-tinycss. * gnu/packages/python-web.scm (python-tinycss): New variable. --- gnu/packages/python-web.scm | 45 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) (limited to 'gnu/packages/python-web.scm') diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 5897893de3d..f6ce09aaa58 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -37,7 +37,7 @@ ;;; Copyright © 2020 Holger Peters ;;; Copyright © 2020 Noisytoot ;;; Copyright © 2020 Edouard Klein -;;; Copyright © 2020 Vinicius Monego +;;; Copyright © 2020, 2021 Vinicius Monego ;;; Copyright © 2020 Konrad Hinsen ;;; Copyright © 2020 Giacomo Leidi ;;; Copyright © 2021 Ekaitz Zarraga @@ -4556,6 +4556,49 @@ library to create slugs from unicode strings while keeping it DRY.") (description "Generate complex HTML+JS pages with Python") (license license:expat))) +(define-public python-tinycss + (package + (name "python-tinycss") + (version "0.4") + (source + (origin + (method url-fetch) + (uri (pypi-uri "tinycss" version)) + (sha256 + (base32 "0vkifr595h28ymkjhrswwf0bm23lhznh5f44xyp7x7jy1ssnyc0j")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'disable-flake8-isort + ;; Flake8 and isort tests fail. + (lambda _ + (substitute* "setup.cfg" ((" --flake8 --isort") "")) + #t)) + (replace 'check + (lambda _ + ;; Disable failing test. + (invoke "python" "-m" "pytest" "-k" + "not test_speedups")))))) + (native-inputs + `(("python-pytest-cov" ,python-pytest-cov) + ("python-pytest-flake8" ,python-pytest-flake8) + ("python-pytest-isort" ,python-pytest-isort) + ("python-pytest-runner" ,python-pytest-runner))) + (home-page "https://tinycss.readthedocs.io/") + (synopsis "Complete yet simple CSS parser for Python") + (description + "@code{tinycss} is a complete yet simple CSS parser for Python. It +supports the full syntax and error handling for CSS 2.1 as well as some CSS 3 +modules: + +@itemize +@item CSS Color 3 +@item CSS Fonts 3 +@item CSS Paged Media 3 +@end itemize") + (license license:bsd-3))) + (define-public python-tinycss2 (package (name "python-tinycss2") -- cgit v1.3