unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob 7586e661db27b836791fad2c8e670d5dc9eaf8ea 1261 bytes (raw)
name: gnu/packages/patches/debops-setup-py-avoid-git.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
 
From a6219db1c473f862a2dddbdef9593d8a57dfc9ae Mon Sep 17 00:00:00 2001
From: Nicolas Graves <ngraves@ngraves.fr>
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


debug log:

solving 7586e661db ...
found 7586e661db in https://yhetil.org/guix-patches/20241019225744.26601-1-ngraves@ngraves.fr/

applying [1/1] https://yhetil.org/guix-patches/20241019225744.26601-1-ngraves@ngraves.fr/
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

1:23: trailing whitespace.
 
1:42: trailing whitespace.
-- 
Checking patch gnu/packages/patches/debops-setup-py-avoid-git.patch...
1:44: new blank line at EOF.
+
Applied patch gnu/packages/patches/debops-setup-py-avoid-git.patch cleanly.
warning: 3 lines add whitespace errors.

index at:
100644 7586e661db27b836791fad2c8e670d5dc9eaf8ea	gnu/packages/patches/debops-setup-py-avoid-git.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).