diff options
author | Sharlatan Hellseher <sharlatanus@gmail.com> | 2025-04-19 20:23:41 +0100 |
---|---|---|
committer | Sharlatan Hellseher <sharlatanus@gmail.com> | 2025-04-19 22:55:35 +0100 |
commit | 05c70eee324d4007cb58780a488522bd11524b61 (patch) | |
tree | eee29be56be3c853423cbdc56d63cc8bfa753d0f | |
parent | 7e031486b77247b8b2566937e7348c659db5fb8a (diff) | |
download | guix-05c70eee324d4007cb58780a488522bd11524b61.tar.gz guix-05c70eee324d4007cb58780a488522bd11524b61.zip |
gnu: python-scikit-learn: Use G-expressions.
* gnu/packages/machine-learning.scm (python-scikit-learn): Adjust
package indentation, use G-expressions.
Change-Id: I332d5f13096d94bc2a8e4f1daa8e44b6dcb0d6d5
-rw-r--r-- | gnu/packages/machine-learning.scm | 67 |
1 files changed, 34 insertions, 33 deletions
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index e45950f473..e551fa4580 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -2174,43 +2174,41 @@ computing environments.") (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 - "0pdd508c9540x9qimq83b8kspb6mb98w7w7i7lnb1jqj7rijal6f")))) + (base32 "0pdd508c9540x9qimq83b8kspb6mb98w7w7i7lnb1jqj7rijal6f")))) (build-system pyproject-build-system) (arguments (list #:test-flags - '(list "-m" "not network" - "-k" (string-append - ;; This test tries to access the internet. - "not test_load_boston_alternative" - ;; DID NOT RAISE <class 'ValueError'> - " and not test_check_pandas_sparse_invalid" - )) + #~(list "-m" "not network" + "-k" (string-append + ;; This test tries to access the internet. + "not test_load_boston_alternative" + ;; DID NOT RAISE <class 'ValueError'> + " and not test_check_pandas_sparse_invalid")) #:phases - '(modify-phases %standard-phases - (add-before 'build 'configure - (lambda _ - (setenv "SKLEARN_BUILD_PARALLEL" - (number->string (parallel-job-count))))) - (add-after 'build 'build-ext - (lambda _ (invoke "python" "setup.py" "build_ext" "--inplace" - "-j" (number->string (parallel-job-count))))) - (replace 'check - (lambda* (#:key tests? test-flags #: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") - - ;; Step out of the source directory to avoid interference; - ;; we want to run the installed code with extensions etc. - (with-directory-excursion "/tmp" - (apply invoke "pytest" "--pyargs" "sklearn" - test-flags)))))))) - (inputs (list openblas)) + #~(modify-phases %standard-phases + (add-before 'build 'configure + (lambda _ + (setenv "SKLEARN_BUILD_PARALLEL" + (number->string (parallel-job-count))))) + (add-after 'build 'build-ext + (lambda _ + (invoke "python" "setup.py" "build_ext" "--inplace" + "-j" (number->string (parallel-job-count))))) + (replace 'check + (lambda* (#:key tests? test-flags #: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") + ;; Step out of the source directory to avoid interference; we + ;; want to run the installed code with extensions etc. + (with-directory-excursion "/tmp" + (apply invoke "pytest" "--pyargs" "sklearn" test-flags)))))))) + (inputs + (list openblas)) (native-inputs (list python-cython-3 python-pandas @@ -2219,7 +2217,10 @@ computing environments.") python-setuptools python-wheel)) (propagated-inputs - (list python-numpy python-threadpoolctl python-scipy python-joblib)) + (list python-numpy + python-threadpoolctl + python-scipy + python-joblib)) (home-page "https://scikit-learn.org/") (synopsis "Machine Learning in Python") (description |