| 1 | From a6219db1c473f862a2dddbdef9593d8a57dfc9ae Mon Sep 17 00:00:00 2001
|
| 2 | From: Nicolas Graves <[email protected]>
|
| 3 | Date: Sat, 19 Oct 2024 19:49:30 +0200
|
| 4 | Subject: [PATCH] setup: Don't rely on git to set the version.
|
| 5 |
|
| 6 | ---
|
| 7 | setup.py | 15 +--------------
|
| 8 | 1 file changed, 1 insertion(+), 14 deletions(-)
|
| 9 |
|
| 10 | diff --git a/setup.py b/setup.py
|
| 11 | index 0fc4555a4..98e4bffac 100755
|
| 12 | |
| 13 | |
| 14 | @@ -48,20 +48,7 @@ except NameError:
|
| 15 | return s
|
| 16 | return s and s.decode('utf-8') or None
|
| 17 |
|
| 18 | -# Retrieve the project version from 'git describe' command and store it in the
|
| 19 | -# __version__.py and VERSION files, needed for correct installation of the
|
| 20 | -# Python package
|
| 21 | -try:
|
| 22 | - with open(os.devnull, 'w') as devnull:
|
| 23 | - GIT_RELEASE = subprocess.check_output(
|
| 24 | - ['git', 'describe'], stderr=devnull
|
| 25 | - ).strip().lstrip(b'v').decode('utf-8').split('-')
|
| 26 | - if len(GIT_RELEASE) > 1:
|
| 27 | - RELEASE = (GIT_RELEASE[0] + '.dev' + GIT_RELEASE[1]
|
| 28 | - + '+' + GIT_RELEASE[2])
|
| 29 | - else:
|
| 30 | - RELEASE = GIT_RELEASE[0]
|
| 31 | -except subprocess.CalledProcessError:
|
| 32 | +if True:
|
| 33 | try:
|
| 34 | RELEASE = open('VERSION').read().strip()
|
| 35 | except Exception:
|
| 36 | --
|
| 37 | 2.46.0
|
| 38 |
|