Subject: [bug#50213] [PATCH 6/6] gnu: python-flask: Update to 2.0.1.

From: jgart <[email-masked]>
Date: Tue, 31 Aug 2021 23:09:58 -0400

* gnu/packages/python-web.scm (python-flask): Update to 2.0.1.
[arguments]:
Use add-installed-pythonpath and tests? predicate in the check phase.
[native-inputs]:
Add python-blinker, python-greenlet, and python-pytest-6.
[propagated-inputs]:
Add python-markupsafe, python-asgiref, and python-dotenv.
---
 gnu/packages/python-web.scm | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index 07db685e2a..938b93a4ba 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -2975,27 +2975,32 @@ minimum of WSGI.")
 (define-public python-flask
   (package
     (name "python-flask")
-    (version "1.1.2")
+    (version "2.0.1")
     (source (origin
               (method url-fetch)
               (uri (pypi-uri "Flask" version))
               (sha256
                (base32
-                "0q3h295izcil7lswkzfnyg3k5gq4hpmqmpl6i7s5m1n9szi1myjf"))))
+                "0mcgwq7b4qd99mf5bsvs3wphchxarf8kgil4hwww3blj31xjak0w"))))
     (build-system python-build-system)
     (arguments
      '(#:phases
        (modify-phases %standard-phases
          (replace 'check
-           (lambda _
-             (setenv "PYTHONPATH" (string-append "./build/lib:"
-                                                 (getenv "PYTHONPATH")))
-             (invoke "pytest" "-vv" "tests"))))))
+         (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+           (when tests?
+             (add-installed-pythonpath inputs outputs)
+             (invoke "pytest" "-vv")))))))
     (native-inputs
-     `(("python-pytest" ,python-pytest)))
+     `(("python-blinker" ,python-blinker)
+       ("python-greenlet" ,python-greenlet)
+       ("python-pytest" ,python-pytest-6)))
     (propagated-inputs
      `(("python-itsdangerous" ,python-itsdangerous)
        ("python-jinja2" ,python-jinja2)
+       ("python-markupsafe" ,python-markupsafe)
+       ("python-asgiref" ,python-asgiref)
+       ("python-dotenv" ,python-dotenv)
        ("python-click" ,python-click)
        ("python-werkzeug" ,python-werkzeug)))
     (home-page "https://www.palletsprojects.com/p/flask/")
-- 
2.33.0