guix-commits
[Top][All Lists]
Advanced

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

02/11: gnu: python-pytorch: Use ADD-INSTALLED-PYTHONPATH.


From: guix-commits
Subject: 02/11: gnu: python-pytorch: Use ADD-INSTALLED-PYTHONPATH.
Date: Sat, 20 Nov 2021 06:04:59 -0500 (EST)

rekado pushed a commit to branch core-updates-frozen
in repository guix.

commit 1e13f736057046232943ffde31a1b547f29152ea
Author: Ricardo Wurmus <rekado@elephly.net>
AuthorDate: Fri Nov 19 17:11:04 2021 +0100

    gnu: python-pytorch: Use ADD-INSTALLED-PYTHONPATH.
    
    * gnu/packages/machine-learning.scm (python-pytorch)[arguments]: Do not set
    PYTHONPATH; use add-installed-pythonpath instead.
---
 gnu/packages/machine-learning.scm | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/machine-learning.scm 
b/gnu/packages/machine-learning.scm
index 324d22a..ed79044 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -2811,13 +2811,10 @@ TensorFlow.js, PyTorch, and MediaPipe.")
                     (lambda* (#:key inputs outputs tests? #:allow-other-keys)
                       ;; Run the test suite following the instructions in
                       ;; 'CONTRIBUTING.md'.  XXX: Unfortunately this doesn't
-                      ;; work, unless you set PYTHONPATH presumably.
+                      ;; work, unless you set GUIX_PYTHONPATH presumably.
                       (when tests?
-                        (let ((python-site (site-packages inputs outputs)))
-                          (setenv "PYTHONPATH"
-                                  (string-append python-site ":"
-                                                 (getenv "PYTHONPATH")))
-                          (invoke "python" "test/run_test.py")))))
+                        (add-installed-pythonpath inputs outputs)
+                        (invoke "python" "test/run_test.py"))))
                   (add-after 'install 'remove-test-executables
                     (lambda* (#:key inputs outputs #:allow-other-keys)
                       ;; Remove test executables, but keep other executables



reply via email to

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