mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 23:46:13 -05:00
gnu: python-skranger: Install library.
* gnu/packages/python-xyz.scm (python-skranger)[arguments]: Install the library that we've just built.
This commit is contained in:
parent
642b73a029
commit
6a02462ba2
1 changed files with 23 additions and 11 deletions
|
@ -1201,6 +1201,9 @@ (define-public python-skranger
|
|||
(build-system pyproject-build-system)
|
||||
(arguments
|
||||
(list
|
||||
#:modules '((guix build pyproject-build-system)
|
||||
(guix build utils)
|
||||
(ice-9 match))
|
||||
#:test-flags
|
||||
;; "from sklearn.datasets import load_boston" fails because it has been
|
||||
;; removed from scikit-learn since version 1.2.
|
||||
|
@ -1209,17 +1212,26 @@ (define-public python-skranger
|
|||
"--ignore=tests/tree/test_regressor.py"
|
||||
"--ignore=tests/ensemble/test_regressor.py")
|
||||
#:phases
|
||||
'(modify-phases %standard-phases
|
||||
(add-after 'unpack 'fix-tests
|
||||
(lambda _
|
||||
(substitute* "tests/conftest.py"
|
||||
(("from sklearn.datasets import load_boston") "")
|
||||
(("^_boston_X.*") "_boston_X, _boston_Y = (True, True)\n"))))
|
||||
(add-before 'check 'build-extensions
|
||||
(lambda _
|
||||
;; Cython extensions have to be built before running the tests.
|
||||
(invoke "python" "buildpre.py")
|
||||
(invoke "python" "build.py" "build_ext" "--inplace"))))))
|
||||
#~(modify-phases %standard-phases
|
||||
(add-after 'unpack 'fix-tests
|
||||
(lambda _
|
||||
(substitute* "tests/conftest.py"
|
||||
(("from sklearn.datasets import load_boston") "")
|
||||
(("^_boston_X.*") "_boston_X, _boston_Y = (True, True)\n"))))
|
||||
(add-before 'check 'build-extensions
|
||||
(lambda _
|
||||
;; Cython extensions have to be built before running the tests.
|
||||
(invoke "python" "buildpre.py")
|
||||
(invoke "python" "build.py" "build_ext" "--inplace")
|
||||
(let ((site (string-append #$output "/lib/python"
|
||||
#$(version-major+minor
|
||||
(package-version python))
|
||||
"/site-packages/skranger"))
|
||||
(lib (match (find-files "build" "\\.so")
|
||||
((the-lib) the-lib)
|
||||
(_ (error "could not find .so")))))
|
||||
(mkdir-p site)
|
||||
(install-file lib site)))))))
|
||||
(propagated-inputs (list python-scikit-learn))
|
||||
(native-inputs
|
||||
(list python-cython
|
||||
|
|
Loading…
Reference in a new issue