1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-05-03 15:55:57 +02:00

gnu: python-pysam: Update to 0.23.0.

* gnu/packages/bioinformatics.scm (python-pysam): Update to 0.23.0.
[arguments]: Use #:test-flags instead of custom 'check phase; add 'pre-check
phase.

Change-Id: I92c715d5dfd5cbdbcf6dd61fc5e472f6c6ca977d
This commit is contained in:
Ricardo Wurmus
2025-03-18 15:52:33 +01:00
committed by Andreas Enge
parent 80bdd80e52
commit 6fa27ee0f4
+28 -23
View File
@@ -5473,7 +5473,7 @@ subgroups.")
(define-public python-pysam
(package
(name "python-pysam")
(version "0.20.0")
(version "0.23.0")
(source (origin
(method git-fetch)
;; Test data is missing on PyPi.
@@ -5483,34 +5483,39 @@ subgroups.")
(file-name (git-file-name name version))
(sha256
(base32
"1dq6jwwm98lm30ijdgqc5xz5ppda4nj999y6qs78mhw8x0kij8gg"))
"0hk0ks6kqsm8252d0v1lw2d22x1awmxcr165nnhyacwbqh246skl"))
(modules '((guix build utils)))
(snippet '(begin
;; FIXME: Unbundle samtools and bcftools.
(delete-file-recursively "htslib")))))
(build-system pyproject-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(add-before 'build 'set-flags
(lambda* (#:key inputs #:allow-other-keys)
(setenv "HTSLIB_MODE" "external")
(setenv "HTSLIB_LIBRARY_DIR"
(string-append (assoc-ref inputs "htslib") "/lib"))
(setenv "HTSLIB_INCLUDE_DIR"
(string-append (assoc-ref inputs "htslib") "/include"))
(setenv "LDFLAGS" "-lncurses")
(setenv "CFLAGS" "-D_CURSES_LIB=1")))
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
;; Step out of source dir so python does not import from CWD.
(with-directory-excursion "tests"
(setenv "HOME" "/tmp")
(invoke "make" "-C" "pysam_data")
(invoke "make" "-C" "cbcf_data")
;; The FileHTTP test requires network access.
(invoke "pytest" "-k" "not FileHTTP"))))))))
(list
#:test-flags
;; This test requires network access.
'(list "-k" "not FileHTTP" "tests")
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'patch-build-system
(lambda _
(substitute* "pyproject.toml"
((":__legacy__") ""))))
(add-before 'build 'set-flags
(lambda* (#:key inputs #:allow-other-keys)
(setenv "HTSLIB_MODE" "external")
(setenv "HTSLIB_LIBRARY_DIR"
(string-append (assoc-ref inputs "htslib") "/lib"))
(setenv "HTSLIB_INCLUDE_DIR"
(string-append (assoc-ref inputs "htslib") "/include"))
(setenv "LDFLAGS" "-lncurses")
(setenv "CFLAGS" "-D_CURSES_LIB=1")))
(add-before 'check 'pre-check
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
(with-directory-excursion "tests"
(setenv "HOME" "/tmp")
(invoke "make" "-C" "pysam_data")
(invoke "make" "-C" "cbcf_data"))))))))
(propagated-inputs
(list htslib)) ; Included from installed header files.
(inputs