Subject: [PATCH v3 39/40] gnu: snakemake-6: Move to (gnu packages python-science).

From: Nicolas Graves <[email-masked]>
Date: Mon, 10 Mar 2025 03:16:44 +0100

* gnu/packages/python-xyz.scm (snakemake-6): Move from here…
* gnu/packages/python-science.scm (snakemake-6): …to here.
Inherit from snakemake-7.
---
 gnu/packages/python-science.scm | 19 ++++++++
 gnu/packages/python-xyz.scm     | 83 ---------------------------------
 2 files changed, 19 insertions(+), 83 deletions(-)

diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index 5acead6523..509e77b765 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -4602,6 +4602,25 @@ (define-public snakemake-7
            python-setuptools
            python-wheel))))
 
+(define-public snakemake-6
+  (package
+    (inherit snakemake-7)
+    (name "snakemake")
+    (version "6.15.5")
+    (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 "09yrpi9f86r9yvcm2dfjs5zy87c4j31bxama77kfd6y8yfrrjlai"))))
+    (build-system pyproject-build-system)
+    (propagated-inputs
+     (modify-inputs (package-propagated-inputs snakemake-7)
+       (delete "python-retry" "python-yte")))))
+
 ;;;
 ;;; Avoid adding new packages to the end of this file. To reduce the chances
 ;;; of a merge conflict, place them above by existing packages with similar
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 740e6cfd33..fa73a189ce 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -14999,89 +14999,6 @@ (define-public snakemake
 Python style, together with a fast and comfortable execution environment.")
     (license license:expat)))
 
-(define-public snakemake-6
-  (package
-    (inherit snakemake)
-    (name "snakemake")
-    (version "6.15.5")
-    (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 "09yrpi9f86r9yvcm2dfjs5zy87c4j31bxama77kfd6y8yfrrjlai"))))
-    (build-system pyproject-build-system)
-    (arguments
-     (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.
-
-          ;; 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 #$output "/bin/snakemake")))))
-          (add-after 'unpack 'tabulate-compatibility
-            (lambda _
-              (substitute* "snakemake/dag.py"
-                (("\"job\": rule,")
-                 "\"job\": rule.name,"))))
-          (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")
-                (invoke "pytest")))))))
-    (propagated-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-smart-open
-           python-stopit
-           python-tabulate
-           python-toposort
-           python-wrapt))
-    (native-inputs
-     (list git-minimal
-           python-wrapper
-           python-pytest
-           python-pandas
-           python-requests-mock
-           python-setuptools
-           python-wheel))))
-
 (define-public python-pyqrcode
   (package
     (name "python-pyqrcode")
-- 
2.48.1