summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/debops-setup-py-avoid-git.patch
diff options
context:
space:
mode:
authorNicolas Graves <[email protected]>2024-10-20 00:57:33 +0200
committerLudovic Courtès <[email protected]>2024-10-23 12:59:58 +0200
commit04f084f2d40a962d3fbad3de817f4ce0df31ef44 (patch)
tree7537923f7ce7483553c0996e25d8bb0656f2d884 /gnu/packages/patches/debops-setup-py-avoid-git.patch
parentb3092b8064a8b3037f8b96c0de4817506cb417a7 (diff)
gnu: debops: Update to 3.2.2.
* gnu/packages/patches/debops-constants-for-external-program-names.patch and gnu/packages/patches/debops-debops-defaults-fall-back-to-less.patch: Remove patches. * gnu/packages/patches/debops-setup-py-avoid-git.patch: Add patch. * gnu/local.mk: Adjust patches. * gnu/packages/admin.scm (debops): Update to 3.2.2. [source]<patches>: Adjust patches. [build-system]: Switch to pyproject-build-system. [native-inputs]: Remove git. [inputs]: Add git, git-crypt. [propagated-inputs]: Reorder. Add python-dotenv, python-future, python-gitpython, python-jinja2, python-pyyaml, python-pyxdg, python-toml. [arguments]<#:tests?>: Unset (although no tests in source). <#:phases>: Remove all existing modifications. Add 'wrap-script phase. <#:modules>: Add for <#phases>. Signed-off-by: Ludovic Courtès <[email protected]>
Diffstat (limited to 'gnu/packages/patches/debops-setup-py-avoid-git.patch')
-rw-r--r--gnu/packages/patches/debops-setup-py-avoid-git.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/gnu/packages/patches/debops-setup-py-avoid-git.patch b/gnu/packages/patches/debops-setup-py-avoid-git.patch
new file mode 100644
index 0000000000..7586e661db
--- /dev/null
+++ b/gnu/packages/patches/debops-setup-py-avoid-git.patch
@@ -0,0 +1,38 @@
+From a6219db1c473f862a2dddbdef9593d8a57dfc9ae Mon Sep 17 00:00:00 2001
+From: Nicolas Graves <[email protected]>
+Date: Sat, 19 Oct 2024 19:49:30 +0200
+Subject: [PATCH] setup: Don't rely on git to set the version.
+
+---
+ setup.py | 15 +--------------
+ 1 file changed, 1 insertion(+), 14 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index 0fc4555a4..98e4bffac 100755
+--- a/setup.py
++++ b/setup.py
+@@ -48,20 +48,7 @@ except NameError:
+ return s
+ return s and s.decode('utf-8') or None
+
+-# Retrieve the project version from 'git describe' command and store it in the
+-# __version__.py and VERSION files, needed for correct installation of the
+-# Python package
+-try:
+- with open(os.devnull, 'w') as devnull:
+- GIT_RELEASE = subprocess.check_output(
+- ['git', 'describe'], stderr=devnull
+- ).strip().lstrip(b'v').decode('utf-8').split('-')
+- if len(GIT_RELEASE) > 1:
+- RELEASE = (GIT_RELEASE[0] + '.dev' + GIT_RELEASE[1]
+- + '+' + GIT_RELEASE[2])
+- else:
+- RELEASE = GIT_RELEASE[0]
+-except subprocess.CalledProcessError:
++if True:
+ try:
+ RELEASE = open('VERSION').read().strip()
+ except Exception:
+--
+2.46.0
+