guix-commits
[Top][All Lists]
Advanced

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

07/08: gnu: python-scikit-learn: Fix test failure.


From: Marius Bakke
Subject: 07/08: gnu: python-scikit-learn: Fix test failure.
Date: Sat, 18 Feb 2017 19:23:01 -0500 (EST)

mbakke pushed a commit to branch python-tests
in repository guix.

commit 4d25c486a5565e2b3fed1be53bc8b8278204f86e
Author: Marius Bakke <address@hidden>
Date:   Fri Feb 17 02:37:58 2017 +0100

    gnu: python-scikit-learn: Fix test failure.
    
    * gnu/packages/python.scm (python-scikit-learn,
    python2-scikit-learn)[arguments]: Use 'modify-phases'. Move 'check' phase
    after 'install' and incorporate 'set-HOME' phase.
---
 gnu/packages/python.scm | 19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index e7553bb..e2bf5f7 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -3210,11 +3210,20 @@ and is very extensible.")
     (build-system python-build-system)
     (arguments
      `(#:phases
-       (alist-cons-before
-        'check 'set-HOME
-        ;; some tests require access to "$HOME"
-        (lambda _ (setenv "HOME" "/tmp"))
-        %standard-phases)))
+       (modify-phases %standard-phases
+         (delete 'check)
+         (add-after 'install 'check
+           ;; Running tests from the source directory requires
+           ;; an "inplace" build with paths relative to CWD.
+           ;; 
http://scikit-learn.org/stable/developers/advanced_installation.html#testing
+           ;; Use the installed version instead.
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (add-installed-pythonpath inputs outputs)
+             ;; some tests require access to "$HOME"
+             (setenv "HOME" "/tmp")
+             ;; Step out of the source directory just to be sure.
+             (chdir "..")
+             (zero? (system* "nosetests" "-v" "sklearn")))))))
     (inputs
      `(("openblas" ,openblas)))
     (native-inputs



reply via email to

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