mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 21:38:07 -05:00
gnu: python-scikit-learn: Run tests conditionally.
* gnu/packages/machine-learning.scm (python-scikit-learn)[arguments]: Respect TESTS? in 'check phase.
This commit is contained in:
parent
7ca5dc370d
commit
3d56b8af90
1 changed files with 7 additions and 6 deletions
|
@ -944,14 +944,15 @@ (define-public python-scikit-learn
|
||||||
(add-after 'build 'build-ext
|
(add-after 'build 'build-ext
|
||||||
(lambda _ (invoke "python" "setup.py" "build_ext" "--inplace")))
|
(lambda _ (invoke "python" "setup.py" "build_ext" "--inplace")))
|
||||||
(replace 'check
|
(replace 'check
|
||||||
(lambda _
|
(lambda* (#:key tests? #:allow-other-keys)
|
||||||
;; Restrict OpenBLAS threads to prevent segfaults while testing!
|
(when tests?
|
||||||
(setenv "OPENBLAS_NUM_THREADS" "1")
|
;; Restrict OpenBLAS threads to prevent segfaults while testing!
|
||||||
|
(setenv "OPENBLAS_NUM_THREADS" "1")
|
||||||
|
|
||||||
;; Some tests require write access to $HOME.
|
;; Some tests require write access to $HOME.
|
||||||
(setenv "HOME" "/tmp")
|
(setenv "HOME" "/tmp")
|
||||||
|
|
||||||
(invoke "pytest" "sklearn" "-m" "not network")))
|
(invoke "pytest" "sklearn" "-m" "not network"))))
|
||||||
(add-before 'reset-gzip-timestamps 'make-files-writable
|
(add-before 'reset-gzip-timestamps 'make-files-writable
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
;; Make sure .gz files are writable so that the
|
;; Make sure .gz files are writable so that the
|
||||||
|
|
Loading…
Reference in a new issue