guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

14/14: gnu: Add snakemake-7.


From: guix-commits
Subject: 14/14: gnu: Add snakemake-7.
Date: Fri, 20 May 2022 08:45:03 -0400 (EDT)

rekado pushed a commit to branch master
in repository guix.

commit 8d32ec335b35948d190b3fee3b561f19b9ed24ff
Author: Ricardo Wurmus <rekado@elephly.net>
AuthorDate: Fri May 20 14:43:52 2022 +0200

    gnu: Add snakemake-7.
    
    * gnu/packages/python-xyz.scm (snakemake-7): New variable.
---
 gnu/packages/python-xyz.scm | 73 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 73 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 96a739f90e..738dfd61cd 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -10262,6 +10262,79 @@ Python style, together with a fast and comfortable 
execution environment.")
            python-pandas
            python-requests-mock))))
 
+(define-public snakemake-7
+  (package
+    (inherit snakemake-6)
+    (name "snakemake")
+    (version "7.7.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/snakemake/snakemake";)
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1qrqbmx4cbis0wxr6dl2rdjv9v627sbirsz6v5c31vlbqwkvs04q"))))
+    (build-system python-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         ;; 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")))))
+         (replace 'check
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               (setenv "HOME" "/tmp")
+               ;; This test attempts to change S3 buckets on AWS and fails
+               ;; because there are no AWS credentials.
+               (delete-file "tests/test_tibanna.py")
+               ;; It's a similar story with this test, which requires access
+               ;; to the Google Storage service.
+               (delete-file "tests/test_google_lifesciences.py")
+               (invoke "pytest")))))))
+    (inputs
+     (list python-appdirs
+           python-configargparse
+           python-connection-pool
+           python-datrie
+           python-docutils
+           python-filelock
+           python-gitpython
+           python-jinja2
+           python-jsonschema
+           python-nbformat
+           python-networkx
+           python-psutil
+           python-pulp
+           python-pyyaml
+           python-py-tes
+           python-ratelimiter
+           python-requests
+           python-retry
+           python-smart-open
+           python-stopit
+           python-tabulate
+           python-toposort
+           python-wrapt
+           python-yte))
+    (native-inputs
+     (list git-minimal
+           python-wrapper
+           python-pytest
+           python-pandas
+           python-requests-mock))))
+
 (define-public python-pyqrcode
   (package
     (name "python-pyqrcode")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]