mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 05:18: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
|
||||
(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
|
||||
|
|
Loading…
Reference in a new issue