diff options
author | Ricardo Wurmus <rekado@elephly.net> | 2023-08-01 08:17:27 +0200 |
---|---|---|
committer | Ricardo Wurmus <rekado@elephly.net> | 2023-08-01 08:20:04 +0200 |
commit | 896b40d2cad5ebe34b6b99a5d6f82739ddbeea53 (patch) | |
tree | cc05568e8ae90aee8379201941d3531059646f4d /gnu | |
parent | a3f4ccfebde432dbe2418c13c16b4e58a7176002 (diff) |
gnu: snakemake-6: Fix version reporting.
* gnu/packages/python-xyz.scm (snakemake-6)[arguments]: Add phase
'patch-version and use G-exp.
[build-system]: Use pyproject-build-system.
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/packages/python-xyz.scm | 52 |
1 files changed, 30 insertions, 22 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index dff67e0d37..c058c25071 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -11443,30 +11443,38 @@ Python style, together with a fast and comfortable execution environment.") (file-name (git-file-name name version)) (sha256 (base32 "09yrpi9f86r9yvcm2dfjs5zy87c4j31bxama77kfd6y8yfrrjlai")))) - (build-system python-build-system) + (build-system pyproject-build-system) (arguments - '(#:phases - (modify-phases %standard-phases - ;; For cluster execution Snakemake will call Python. Since there is - ;; no suitable GUIX_PYTHONPATH set, cluster execution will fail. We - ;; fix this by calling the snakemake wrapper instead. + (list + #:phases + #~(modify-phases %standard-phases + ;; For cluster execution Snakemake will call Python. Since there is + ;; no suitable GUIX_PYTHONPATH set, cluster execution will fail. We + ;; fix this by calling the snakemake wrapper instead. - ;; XXX: There is another instance of sys.executable on line 692, but - ;; it is not clear how to patch it. - (add-after 'unpack 'call-wrapper-not-wrapped-snakemake - (lambda* (#:key outputs #:allow-other-keys) - (substitute* "snakemake/executors/__init__.py" - (("\\{sys.executable\\} -m snakemake") - (string-append (assoc-ref outputs "out") - "/bin/snakemake"))))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (setenv "HOME" "/tmp") - ;; This test attempts to change S3 buckets on AWS and fails - ;; because there are no AWS credentials. - (delete-file "tests/test_tibanna.py") - (invoke "pytest"))))))) + ;; XXX: There is another instance of sys.executable on line 692, but + ;; it is not clear how to patch it. + (add-after 'unpack 'call-wrapper-not-wrapped-snakemake + (lambda* (#:key outputs #:allow-other-keys) + (substitute* "snakemake/executors/__init__.py" + (("\\{sys.executable\\} -m snakemake") + (string-append #$output "/bin/snakemake"))))) + (add-after 'unpack 'patch-version + (lambda _ + (substitute* "setup.py" + (("version=versioneer.get_version\\(\\)") + (format #f "version=~s" #$version))) + (substitute* '("snakemake/_version.py" + "versioneer.py") + (("0\\+unknown") #$version)))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (setenv "HOME" "/tmp") + ;; This test attempts to change S3 buckets on AWS and fails + ;; because there are no AWS credentials. + (delete-file "tests/test_tibanna.py") + (invoke "pytest"))))))) (propagated-inputs (list python-appdirs python-configargparse |