aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/python.scm
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2017-06-28 16:22:55 +0200
committerRicardo Wurmus <rekado@elephly.net>2017-06-28 16:49:20 +0200
commite61bc976f6f3020f4420dabc6e582e1a8c9e4b75 (patch)
tree4fc6ba3435e0e42ed2bb8396998ad05f45b1c2d9 /gnu/packages/python.scm
parent03b055a1163cbfbd0cc5e931a71a74a7fec6a4d9 (diff)
downloadguix-e61bc976f6f3020f4420dabc6e582e1a8c9e4b75.tar
guix-e61bc976f6f3020f4420dabc6e582e1a8c9e4b75.tar.gz
gnu: snakemake: Fix cluster execution.
* gnu/packages/python.scm (snakemake)[arguments]: Add build phase "call-wrapper-not-wrapped-snakemake".
Diffstat (limited to 'gnu/packages/python.scm')
-rw-r--r--gnu/packages/python.scm14
1 files changed, 13 insertions, 1 deletions
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 6150a8798f..6e1e289e90 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)))