From 9692e2bb7c49ba9526dd023dba3b5d24404f466b Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus <rekado@elephly.net> Date: Thu, 2 May 2024 21:45:49 +0200 Subject: [PATCH] gnu: snakemake-5: Patch version string. * gnu/packages/python-xyz.scm (snakemake-5)[arguments]: Add phase 'patch-version. Change-Id: I647625e9d26b2ee06274a0c5bb844ccb87035537 --- gnu/packages/python-xyz.scm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index b3c6d9821e..b9a7c0b222 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -13227,6 +13227,14 @@ approach.") (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)))) ;; 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.