me
/
guix
Archived
1
0
Fork 0

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.
master
Ricardo Wurmus 2023-08-01 08:17:27 +02:00
parent a3f4ccfebd
commit 896b40d2ca
No known key found for this signature in database
GPG Key ID: 197A5888235FACAC
1 changed files with 30 additions and 22 deletions

View File

@ -11443,30 +11443,38 @@ Python style, together with a fast and comfortable execution environment.")
(file-name (git-file-name name version)) (file-name (git-file-name name version))
(sha256 (sha256
(base32 "09yrpi9f86r9yvcm2dfjs5zy87c4j31bxama77kfd6y8yfrrjlai")))) (base32 "09yrpi9f86r9yvcm2dfjs5zy87c4j31bxama77kfd6y8yfrrjlai"))))
(build-system python-build-system) (build-system pyproject-build-system)
(arguments (arguments
'(#:phases (list
(modify-phases %standard-phases #:phases
;; For cluster execution Snakemake will call Python. Since there is #~(modify-phases %standard-phases
;; no suitable GUIX_PYTHONPATH set, cluster execution will fail. We ;; For cluster execution Snakemake will call Python. Since there is
;; fix this by calling the snakemake wrapper instead. ;; 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 ;; XXX: There is another instance of sys.executable on line 692, but
;; it is not clear how to patch it. ;; it is not clear how to patch it.
(add-after 'unpack 'call-wrapper-not-wrapped-snakemake (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(substitute* "snakemake/executors/__init__.py" (substitute* "snakemake/executors/__init__.py"
(("\\{sys.executable\\} -m snakemake") (("\\{sys.executable\\} -m snakemake")
(string-append (assoc-ref outputs "out") (string-append #$output "/bin/snakemake")))))
"/bin/snakemake"))))) (add-after 'unpack 'patch-version
(replace 'check (lambda _
(lambda* (#:key tests? #:allow-other-keys) (substitute* "setup.py"
(when tests? (("version=versioneer.get_version\\(\\)")
(setenv "HOME" "/tmp") (format #f "version=~s" #$version)))
;; This test attempts to change S3 buckets on AWS and fails (substitute* '("snakemake/_version.py"
;; because there are no AWS credentials. "versioneer.py")
(delete-file "tests/test_tibanna.py") (("0\\+unknown") #$version))))
(invoke "pytest"))))))) (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 (propagated-inputs
(list python-appdirs (list python-appdirs
python-configargparse python-configargparse