gnu: ghmm: Run tests after install.
* gnu/packages/machine-learning.scm (ghmm)[arguments]: Move "check" phase after "install"; add phase "fix-PYTHONPATH".
This commit is contained in:
parent
4262d178a7
commit
ced12a7bff
|
@ -134,20 +134,25 @@ classification.")
|
||||||
"0qbq1rqp94l530f043qzp8aw5lj7dng9wq0miffd7spd1ff638wq"))))
|
"0qbq1rqp94l530f043qzp8aw5lj7dng9wq0miffd7spd1ff638wq"))))
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:phases
|
`(#:imported-modules (,@%gnu-build-system-modules
|
||||||
|
(guix build python-build-system))
|
||||||
|
#:phases
|
||||||
(modify-phases %standard-phases
|
(modify-phases %standard-phases
|
||||||
(add-after 'unpack 'enter-dir
|
(add-after 'unpack 'enter-dir
|
||||||
(lambda _ (chdir "ghmm") #t))
|
(lambda _ (chdir "ghmm") #t))
|
||||||
(add-after 'enter-dir 'fix-PYTHONPATH
|
(delete 'check)
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(add-after 'install 'check
|
||||||
;; The Python tests fail as the library is assumed to be stored
|
(assoc-ref %standard-phases 'check))
|
||||||
;; in ./build/lib.linux-i686-*. To fix this we detect the CPU
|
(add-before 'check 'fix-PYTHONPATH
|
||||||
;; and use it in the path.
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||||
(substitute* "configure.in"
|
(let ((python-version ((@@ (guix build python-build-system)
|
||||||
(("AM_INIT_AUTOMAKE" line)
|
get-python-version)
|
||||||
(string-append line "\nAC_CANONICAL_HOST\n")))
|
(assoc-ref inputs "python"))))
|
||||||
(substitute* "ghmmwrapper/Makefile.am"
|
(setenv "PYTHONPATH"
|
||||||
(("i686") "@host_cpu@"))
|
(string-append (getenv "PYTHONPATH")
|
||||||
|
":" (assoc-ref outputs "out")
|
||||||
|
"/lib/python" python-version
|
||||||
|
"/site-packages")))
|
||||||
#t))
|
#t))
|
||||||
(add-after 'enter-dir 'fix-runpath
|
(add-after 'enter-dir 'fix-runpath
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
|
|
Loading…
Reference in New Issue