From 73f68c1a45bbdbd64633d5cc05f5dcf4080d581a Mon Sep 17 00:00:00 2001 From: Raghav Gururajan Date: Sat, 11 Sep 2021 19:24:53 -0400 Subject: gnu: python-wtforms: Update to 2.3.3 and adjust arguments+inputs. * gnu/packages/python-web.scm (python-wtforms)[version]: Update to 2.3.3. [phases](remove-django-test): Remove phase. (check): Replace with custom phase. [native-inputs]: Remove unzip. Add python-coverage, python-dateutil, python-pep8 and python-sqlalchemy. [propagated-inputs]: Add python-babel, python-email-validaor and python-markupsafe. Co-authored-by: jgart --- gnu/packages/python-web.scm | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) (limited to 'gnu/packages/python-web.scm') diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 32b4aa4bf0..bd390d371d 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -4150,28 +4150,33 @@ addon modules.") (define-public python-wtforms (package (name "python-wtforms") - (version "2.1") + (version "2.3.3") (source (origin (method url-fetch) - (uri (pypi-uri "WTForms" version ".zip")) + (uri (pypi-uri "WTForms" version ".tar.gz")) (sha256 (base32 - "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz")))) + "17427m7p9nn9byzva697dkykykwcp2br3bxvi8vciywlmkh5s6c1")))) (build-system python-build-system) (arguments - '(#:phases + `(#:phases (modify-phases %standard-phases - (add-after 'unpack 'remove-django-test - ;; Don't fail the tests when the inputs for the optional tests cannot be found. - (lambda _ - (substitute* - "tests/runtests.py" - (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "") - (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") "")) - #t))))) + (replace 'check + (lambda* (#:key inputs outputs tests? #:allow-other-keys) + (when tests? + (add-installed-pythonpath inputs outputs) + (invoke "python" "setup.py" "compile_catalog") + (invoke "coverage" "run" "tests/runtests.py" "--with-pep8"))))))) (native-inputs - `(("unzip" ,unzip))) + `(("python-coverage" ,python-coverage) + ("python-dateutil" ,python-dateutil) + ("python-pep8" ,python-pep8) + ("python-sqlalchemy" ,python-sqlalchemy))) + (propagated-inputs + `(("python-babel" ,python-babel) + ("python-email-validator" ,python-email-validator) + ("python-markupsafe" ,python-markupsafe))) (home-page "http://wtforms.simplecodes.com/") (synopsis "Form validation and rendering library for Python web development") -- cgit v1.2.3 From 1289d4119e1865fff09d6ff7736655b6ca1e97fc Mon Sep 17 00:00:00 2001 From: Pradana AUMARS Date: Sun, 5 Sep 2021 10:25:14 +0200 Subject: gnu: Add python-w3lib MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/python-web.scm (python-w3lib): New variable. Signed-off-by: Ludovic Courtès --- gnu/packages/python-web.scm | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'gnu/packages/python-web.scm') diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index bd390d371d..9ff819f682 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -43,6 +43,7 @@ ;;; Copyright © 2021 Ekaitz Zarraga ;;; Copyright © 2021 Greg Hogan ;;; Copyright © 2021 Maxime Devos +;;; Copyright © 2021 Pradana Aumars ;;; ;;; This file is part of GNU Guix. ;;; @@ -6210,3 +6211,25 @@ your code non-blocking and speedy.") "This project provides a client library in Python that makes it easy to communicate with Microsoft Azure Storage services.") (license license:expat))) + +(define-public python-w3lib + (package + (name "python-w3lib") + (version "1.22.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "w3lib" version)) + (sha256 + (base32 + "1pv02lvvmgz2qb61vz1jkjc04fgm4hpfvaj5zm4i3mjp64hd1mha")))) + (build-system python-build-system) + (native-inputs + `(("python-six" ,python-six))) + (home-page "https://github.com/scrapy/w3lib") + (synopsis "Python library of web-related functions") + (description + "This is a Python library of web-related functions, such as: remove comments, +or tags from HTML snippets, extract base url from HTML snippets, translate entites +on HTML strings, among other things.") + (license license:bsd-3))) -- cgit v1.2.3 From 3b13dae8617ddda6125b493957ef13272b58e68c Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 15 Sep 2021 19:26:21 +0200 Subject: gnu: python-aws-sam-translator: Update to 1.38.0. * gnu/packages/python-web.scm (python-aws-sam-translator): Update to 1.38.0. --- 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 9ff819f682..2b25cbc1c9 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -376,13 +376,13 @@ WSGI. This package includes libraries for implementing ASGI servers.") (define-public python-aws-sam-translator (package (name "python-aws-sam-translator") - (version "1.36.0") + (version "1.38.0") (source (origin (method url-fetch) (uri (pypi-uri "aws-sam-translator" version)) (sha256 (base32 - "115mcbb4r205c1hln199llqrvvbijfqz075rwx991l99jc6rj6zs")))) + "1djwlsjpbh13m4biglimrm9lq7hmla0k29giay7k3cjsrylxvjhf")))) (build-system python-build-system) (arguments `(;; XXX: Tests are not distributed with the PyPI archive, and would -- cgit v1.2.3 From ca9f5de1e4a3ac1ac60c7faf3002ad50ed048752 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 15 Sep 2021 19:26:55 +0200 Subject: gnu: python-cfn-lint: Update to 0.54.1. * gnu/packages/python-web.scm (python-cfn-lint): Update to 0.54.1. [arguments]: Run tests verbosely. --- gnu/packages/python-web.scm | 6 +++--- 1 file changed, 3 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 2b25cbc1c9..06c538c5c4 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -479,7 +479,7 @@ emit information from within their applications to the AWS X-Ray service.") (define-public python-cfn-lint (package (name "python-cfn-lint") - (version "0.51.0") + (version "0.54.1") (home-page "https://github.com/aws-cloudformation/cfn-python-lint") (source (origin (method git-fetch) @@ -489,7 +489,7 @@ emit information from within their applications to the AWS X-Ray service.") (file-name (git-file-name name version)) (sha256 (base32 - "1027s243sik25c6sqw6gla7k7vl3jdicrik5zdsa8pafxh2baja4")))) + "161mzzlpbi85q43kwzrj39qb32l6wg6xhnbbd4z860yrfbymsn87")))) (build-system python-build-system) (arguments `(#:phases (modify-phases %standard-phases @@ -507,7 +507,7 @@ emit information from within their applications to the AWS X-Ray service.") (getenv "PYTHONPATH"))) (setenv "PATH" (string-append out "/bin:" (getenv "PATH"))) - (invoke "python" "-m" "unittest" "discover" + (invoke "python" "-m" "unittest" "discover" "-v" "-s" "test"))))))) (native-inputs `(("python-pydot" ,python-pydot) -- cgit v1.2.3 From d0e23782dff3c93a23be40150adca0419d10c924 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 15 Sep 2021 19:27:45 +0200 Subject: gnu: python-flask-sqlalchemy: Update to 2.5.1. * gnu/packages/python-web.scm (python-flask-sqlalchemy): Update to 2.5.1. --- 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 06c538c5c4..785669410b 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -3551,13 +3551,13 @@ applications.") (define-public python-flask-sqlalchemy (package (name "python-flask-sqlalchemy") - (version "2.4.4") + (version "2.5.1") (source (origin (method url-fetch) (uri (pypi-uri "Flask-SQLAlchemy" version)) (sha256 (base32 - "1rgsj49gnx361hnb3vn6c1h17497qh22yc3r70l1r6w0mw71bixz")))) + "04jrx4sjrz1b20j38qk4qin975xwz30krzq59rfv3b3w7ss49nib")))) (build-system python-build-system) (propagated-inputs `(("python-flask" ,python-flask) -- cgit v1.2.3 From 16110ba476d90d0fb5b2921eb57f42f8faa3623c Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 15 Sep 2021 19:28:43 +0200 Subject: gnu: python-wtforms: Adjust for SQLAlchemy >= 1.4. * gnu/packages/python-web.scm (python-wtforms)[arguments]: Add phase to delete test. --- gnu/packages/python-web.scm | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gnu/packages/python-web.scm') diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 785669410b..ac9245ac7b 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -4163,6 +4163,12 @@ addon modules.") (arguments `(#:phases (modify-phases %standard-phases + (add-after 'unpack 'delete-bundled-test + (lambda _ + ;; Delete test copied from a third party package that fails + ;; with newer SQLAlchemy. This can be removed for 3.0. + ;; See . + (delete-file "tests/ext_sqlalchemy.py"))) (replace 'check (lambda* (#:key inputs outputs tests? #:allow-other-keys) (when tests? -- cgit v1.2.3 From 16236cda58565b122e81e1f87a80a3e942ba6a3e Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 15 Sep 2021 19:30:21 +0200 Subject: gnu: python-wtforms: Don't run style and coverage tests. Such tests are fragile and does not affect functionality of the package. * gnu/packages/python-web.scm (python-wtforms)[arguments]: In the check phase, disable code coverage and pep8. [native-inputs]: Remove PYTHON-COVERAGE and PYTHON-PEP8. [source](uri): While at it, remove redundant '.tar.gz' argument to PYPI-URI. --- gnu/packages/python-web.scm | 8 +++----- 1 file changed, 3 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 ac9245ac7b..e1742cf71b 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -4155,7 +4155,7 @@ addon modules.") (source (origin (method url-fetch) - (uri (pypi-uri "WTForms" version ".tar.gz")) + (uri (pypi-uri "WTForms" version)) (sha256 (base32 "17427m7p9nn9byzva697dkykykwcp2br3bxvi8vciywlmkh5s6c1")))) @@ -4174,11 +4174,9 @@ addon modules.") (when tests? (add-installed-pythonpath inputs outputs) (invoke "python" "setup.py" "compile_catalog") - (invoke "coverage" "run" "tests/runtests.py" "--with-pep8"))))))) + (invoke "python" "tests/runtests.py"))))))) (native-inputs - `(("python-coverage" ,python-coverage) - ("python-dateutil" ,python-dateutil) - ("python-pep8" ,python-pep8) + `(("python-dateutil" ,python-dateutil) ("python-sqlalchemy" ,python-sqlalchemy))) (propagated-inputs `(("python-babel" ,python-babel) -- cgit v1.2.3 From 7de73cabe8812a07cd88fa38d29c121a994f8490 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 16 Sep 2021 14:38:08 +0200 Subject: gnu: Remove python2-wtforms. This trivial package currently fails to build and has no users in Guix. * gnu/packages/python-web.scm (python2-wtforms): Remove variable. --- gnu/packages/python-web.scm | 3 --- 1 file changed, 3 deletions(-) (limited to 'gnu/packages/python-web.scm') diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index e1742cf71b..302e5d6459 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -4191,9 +4191,6 @@ for Python web development. It is very similar to the web form API available in Django, but is a standalone package.") (license license:bsd-3))) -(define-public python2-wtforms - (package-with-python2 python-wtforms)) - (define-public python-paste (package (name "python-paste") -- cgit v1.2.3