~ruther/guix-local

e61bc976f6f3020f4420dabc6e582e1a8c9e4b75 — Ricardo Wurmus 8 years ago 03b055a
gnu: snakemake: Fix cluster execution.

* gnu/packages/python.scm (snakemake)[arguments]: Add build phase
"call-wrapper-not-wrapped-snakemake".
1 files changed, 13 insertions(+), 1 deletions(-)

M gnu/packages/python.scm
M gnu/packages/python.scm => gnu/packages/python.scm +13 -1
@@ 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)))