gnu: snakemake: Fix cluster execution.

* gnu/packages/python.scm (snakemake)[arguments]: Add build phase
"call-wrapper-not-wrapped-snakemake".
This commit is contained in:
Ricardo Wurmus 2017-06-28 16:22:55 +02:00
parent 03b055a116
commit e61bc976f6
No known key found for this signature in database
GPG Key ID: 197A5888235FACAC
1 changed files with 13 additions and 1 deletions

View File

@ -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)))