guix-commits
[Top][All Lists]
Advanced

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

03/21: gnu: snakemake-7: Fix version reporting.


From: guix-commits
Subject: 03/21: gnu: snakemake-7: Fix version reporting.
Date: Wed, 2 Aug 2023 00:15:20 -0400 (EDT)

lilyp pushed a commit to branch emacs-team
in repository guix.

commit f8724820439efad1c15801701be19bc1f7eae471
Author: Ricardo Wurmus <rekado@elephly.net>
AuthorDate: Tue Aug 1 08:18:36 2023 +0200

    gnu: snakemake-7: Fix version reporting.
    
    * gnu/packages/python-xyz.scm (snakemake-7)[arguments]: Add phase
    'patch-version and use G-exp.
    [build-system]: Use pyproject-build-system.
---
 gnu/packages/python-xyz.scm | 59 ++++++++++++++++++++++++++-------------------
 1 file changed, 34 insertions(+), 25 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index c058c25071..e7236c075c 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -11519,32 +11519,41 @@ Python style, together with a fast and comfortable 
execution environment.")
        (file-name (git-file-name name version))
        (sha256
         (base32 "1qrqbmx4cbis0wxr6dl2rdjv9v627sbirsz6v5c31vlbqwkvs04q"))))
-    (build-system python-build-system)
+    (build-system pyproject-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.
-         (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
-           (lambda* (#:key outputs #:allow-other-keys)
-             (substitute* "snakemake/executors/__init__.py"
-               (("self\\.get_python_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")))))))
+     (list
+      #: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.
+          (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
+            (lambda* (#:key outputs #:allow-other-keys)
+              (substitute* "snakemake/executors/__init__.py"
+                (("self\\.get_python_executable\\(\\),")
+                 "")
+                (("\"-m snakemake\"")
+                 (string-append "\"" #$output
+                                "/bin/snakemake" "\"")))))
+          (add-after 'unpack 'patch-version
+            (lambda _
+              (substitute* "setup.py"
+                (("version=versioneer.get_version\\(\\)")
+                 (format #f "version=~s" #$version)))
+              (substitute* '("snakemake/_version.py"
+                             "versioneer.py")
+                (("0\\+unknown") #$version))))
+          (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")))))))
     (propagated-inputs
      (list python-appdirs
            python-configargparse



reply via email to

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