summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorNicolas Graves <ngraves@ngraves.fr>2025-04-22 16:00:31 +0200
committerSharlatan Hellseher <sharlatanus@gmail.com>2025-04-24 04:53:41 +0100
commitbfdf6a85b8025df358267499caedee1205821607 (patch)
tree4a24740daff77f704059b3e85292149b52fbba26 /gnu
parent7118f9feccb672ae47bb9ab3a79137a7557c748a (diff)
gnu: python-bed-reader: Improve phases' style.
* gnu/packages/bioinformatics.scm (python-bed-reader) [arguments]{phases}: Improve phases 'install-python-library and 'check-python with site-packages procedure. Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/bioinformatics.scm22
1 files changed, 8 insertions, 14 deletions
diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 7eec4350ced..74cf9b0bf5d 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -2333,26 +2333,20 @@ version = ~s
(add-after 'build-python-module 'install-python-module
(assoc-ref py:%standard-phases 'install))
(add-after 'install-python-module 'install-python-library
- (lambda _
- (let ((site (string-append #$output "/lib/python"
- #$(version-major+minor
- (package-version python))
- "/site-packages/")))
- (mkdir-p (string-append site "bed_reader"))
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((site (py:site-packages inputs outputs)))
+ (mkdir-p (string-append site "/bed_reader"))
(copy-file "target/release/libbed_reader.so"
- (string-append site "bed_reader/bed_reader.so")))))
+ (string-append site "/bed_reader/bed_reader.so")))))
(add-after 'install-python-library 'add-install-to-pythonpath
(assoc-ref py:%standard-phases 'add-install-to-pythonpath))
(add-after 'add-install-to-pythonpath 'check-python
- (lambda* (#:key tests? #:allow-other-keys)
+ (lambda* (#:key inputs outputs tests? #:allow-other-keys)
(when tests?
- (let ((site (string-append #$output "/lib/python"
- #$(version-major+minor
- (package-version python))
- "/site-packages/"))
+ (let ((site (py:site-packages inputs outputs))
(data-dir "bed_reader/tests/data"))
(symlink (canonicalize-path data-dir)
- (string-append site data-dir))
+ (string-append site "/" data-dir))
(invoke "pytest" "-v" #$output
;; These test require a 84 GB file.
"-k" (string-join
@@ -2363,7 +2357,7 @@ version = ~s
"test_optional_dependencies")
" and not "))
(delete-file-recursively
- (string-append site "bed_reader/tests"))
+ (string-append site "/bed_reader/tests"))
(delete-file-recursively
(string-append #$output "/.pytest_cache")))))))))
(native-inputs (list python-pytest