guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#50213] [PATCH 17/19] gnu: python-flask: Use add-installed-pythonpat


From: jgart
Subject: [bug#50213] [PATCH 17/19] gnu: python-flask: Use add-installed-pythonpath in the check phase.
Date: Thu, 26 Aug 2021 11:15:51 -0400

* 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 --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
-- 
2.33.0






reply via email to

[Prev in Thread] Current Thread [Next in Thread]