aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2017-02-17 02:37:58 +0100
committerMarius Bakke <mbakke@fastmail.com>2017-02-19 01:19:33 +0100
commit4d25c486a5565e2b3fed1be53bc8b8278204f86e (patch)
treeffe3797856b7bba803c260b18f9e0ae077a518e7
parent9200fe14f70506474cfc178dc8c1066bf00a5e7e (diff)
downloadguix-4d25c486a5565e2b3fed1be53bc8b8278204f86e.tar
guix-4d25c486a5565e2b3fed1be53bc8b8278204f86e.tar.gz
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.
-rw-r--r--gnu/packages/python.scm19
1 files changed, 14 insertions, 5 deletions
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index e7553bb82b..e2bf5f73da 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