[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/01: gnu: snakemake: Fix cluster execution.
From: |
Ricardo Wurmus |
Subject: |
01/01: gnu: snakemake: Fix cluster execution. |
Date: |
Wed, 28 Jun 2017 10:49:27 -0400 (EDT) |
rekado pushed a commit to branch master
in repository guix.
commit e61bc976f6f3020f4420dabc6e582e1a8c9e4b75
Author: Ricardo Wurmus <address@hidden>
Date: Wed Jun 28 16:22:55 2017 +0200
gnu: snakemake: Fix cluster execution.
* gnu/packages/python.scm (snakemake)[arguments]: Add build phase
"call-wrapper-not-wrapped-snakemake".
---
gnu/packages/python.scm | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 6150a87..6e1e289 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -6032,7 +6032,19 @@ of the structure, dynamics, and functions of complex
networks.")
(build-system python-build-system)
(arguments
;; TODO: Package missing test dependencies.
- '(#:tests? #f))
+ '(#:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ ;; For cluster execution Snakemake will call Python. Since there is
+ ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
+ ;; this by calling the snakemake wrapper instead.
+ (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
+ (lambda* (#:key outputs #:allow-other-keys)
+ (substitute* "snakemake/executors.py"
+ (("\\{sys.executable\\} -m snakemake")
+ (string-append (assoc-ref outputs "out")
+ "/bin/snakemake")))
+ #t)))))
(propagated-inputs
`(("python-wrapt" ,python-wrapt)
("python-requests" ,python-requests)))