diff options
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/packages/machine-learning.scm | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index 4e18cf0517..d51bf63473 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -944,14 +944,15 @@ computing environments.") (add-after 'build 'build-ext (lambda _ (invoke "python" "setup.py" "build_ext" "--inplace"))) (replace 'check - (lambda _ - ;; Restrict OpenBLAS threads to prevent segfaults while testing! - (setenv "OPENBLAS_NUM_THREADS" "1") + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + ;; Restrict OpenBLAS threads to prevent segfaults while testing! + (setenv "OPENBLAS_NUM_THREADS" "1") - ;; Some tests require write access to $HOME. - (setenv "HOME" "/tmp") + ;; Some tests require write access to $HOME. + (setenv "HOME" "/tmp") - (invoke "pytest" "sklearn" "-m" "not network"))) + (invoke "pytest" "sklearn" "-m" "not network")))) (add-before 'reset-gzip-timestamps 'make-files-writable (lambda* (#:key outputs #:allow-other-keys) ;; Make sure .gz files are writable so that the |