diff mbox series

[bug#57413] gnu: snakemake-7: Fix cluster execution bug

Message ID m1r114far0.fsf@fastmail.net
State Accepted
Headers show
Series [bug#57413] gnu: snakemake-7: Fix cluster execution bug | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git-branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Konrad Hinsen Aug. 25, 2022, 6:17 p.m. UTC
* gnu/packages/python-xyz.scm (snakemake-7): Revise the patch for
the cluster execution script
---
 gnu/packages/python-xyz.scm | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

Comments

Marius Bakke Aug. 29, 2022, 4:10 p.m. UTC | #1
Konrad Hinsen <konrad.hinsen@fastmail.net> skriver:

> * gnu/packages/python-xyz.scm (snakemake-7): Revise the patch for
> the cluster execution script

Applied, thanks!
diff mbox series

Patch

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index f7971b75fa..cb3eba77aa 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -9784,15 +9784,14 @@  (define-public snakemake-7
          ;; For cluster execution Snakemake will call Python.  Since there is
          ;; 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
-         ;; it is not clear how to patch it.
          (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
            (lambda* (#:key outputs #:allow-other-keys)
              (substitute* "snakemake/executors/__init__.py"
-               (("\\{sys.executable\\} -m snakemake")
-                (string-append (assoc-ref outputs "out")
-                               "/bin/snakemake")))))
+               (("self\\.get_python_executable\\(\\),")
+                "")
+               (("\"-m snakemake\"")
+                (string-append "\"" (assoc-ref outputs "out")
+                               "/bin/snakemake" "\"")))))
          (replace 'check
            (lambda* (#:key tests? #:allow-other-keys)
              (when tests?