mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-08 07:56:16 -05:00
gnu: python-pysam: Run tests before installation.
* gnu/packages/bioinformatics.scm (python-pysam)[arguments]: Adjust check phase to be run before installation.
This commit is contained in:
parent
9488776a18
commit
611154efc8
1 changed files with 15 additions and 13 deletions
|
@ -1430,7 +1430,11 @@ (define-public python-pysam
|
|||
'(delete-file-recursively "htslib"))))
|
||||
(build-system python-build-system)
|
||||
(arguments
|
||||
`(#:phases
|
||||
`(#:modules ((ice-9 ftw)
|
||||
(srfi srfi-26)
|
||||
(guix build python-build-system)
|
||||
(guix build utils))
|
||||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
(add-before 'build 'set-flags
|
||||
(lambda* (#:key inputs #:allow-other-keys)
|
||||
|
@ -1442,23 +1446,21 @@ (define-public python-pysam
|
|||
(setenv "LDFLAGS" "-lncurses")
|
||||
(setenv "CFLAGS" "-D_CURSES_LIB=1")
|
||||
#t))
|
||||
(delete 'check)
|
||||
(add-after 'install 'check
|
||||
(replace 'check
|
||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||
;; Add first subdirectory of "build" directory to PYTHONPATH.
|
||||
(setenv "PYTHONPATH"
|
||||
(string-append
|
||||
(getenv "PYTHONPATH")
|
||||
":" (assoc-ref outputs "out")
|
||||
"/lib/python"
|
||||
(string-take (string-take-right
|
||||
(assoc-ref inputs "python") 5) 3)
|
||||
"/site-packages"))
|
||||
":" (getcwd) "/build/"
|
||||
(car (scandir "build"
|
||||
(compose not (cut string-prefix? "." <>))))))
|
||||
;; Step out of source dir so python does not import from CWD.
|
||||
(chdir "tests")
|
||||
(setenv "HOME" "/tmp")
|
||||
(and (zero? (system* "make" "-C" "pysam_data"))
|
||||
(zero? (system* "make" "-C" "cbcf_data"))
|
||||
(zero? (system* "nosetests" "-v"))))))))
|
||||
(with-directory-excursion "tests"
|
||||
(setenv "HOME" "/tmp")
|
||||
(and (zero? (system* "make" "-C" "pysam_data"))
|
||||
(zero? (system* "make" "-C" "cbcf_data"))
|
||||
(zero? (system* "nosetests" "-v")))))))))
|
||||
(propagated-inputs
|
||||
`(("htslib" ,htslib))) ; Included from installed header files.
|
||||
(inputs
|
||||
|
|
Loading…
Reference in a new issue