diff mbox series

[bug#50213,17/19] gnu: python-flask: Use add-installed-pythonpath in the check phase.

Message ID 20210826151553.10127-17-jgart@dismail.de
State New
Headers show
Series [bug#50213,01/19] gnu: python-pytest-6: Update to 6.2.4. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

jgart Aug. 26, 2021, 3:15 p.m. UTC
* gnu/packages/python-web.scm (python-flask)[arguments]:
Use add-installed-pythonpath and tests? predicate in the check phase.
---
 gnu/packages/python-web.scm | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index 6784b5038f..561c788dde 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -2987,10 +2987,10 @@  minimum of WSGI.")
      '(#: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)))
     (propagated-inputs