aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/bioinformatics.scm
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2017-03-22 12:18:59 +0100
committerRicardo Wurmus <rekado@elephly.net>2017-03-22 12:33:28 +0100
commit71dbf592c49e31b2f5e235278942b98f4ba99e72 (patch)
tree86c73a6243005bf9de4062c8350a66448d2b9d58 /gnu/packages/bioinformatics.scm
parent879b521cd051325255f03444d024c30106b4e9a1 (diff)
downloadpatches-71dbf592c49e31b2f5e235278942b98f4ba99e72.tar
patches-71dbf592c49e31b2f5e235278942b98f4ba99e72.tar.gz
gnu: python-pysam: Run tests before installation.
* gnu/packages/bioinformatics.scm (python-pysam)[arguments]: Adjust check phase to be run before installation.
Diffstat (limited to 'gnu/packages/bioinformatics.scm')
-rw-r--r--gnu/packages/bioinformatics.scm28
1 files changed, 15 insertions, 13 deletions
diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 8f0cd0ae77..51f0e0c0b0 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -1430,7 +1430,11 @@ multiple sequence alignments.")
'(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 @@ multiple sequence alignments.")
(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