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
|
From 5e1de2ca616138e973429696688a8139af77349a Mon Sep 17 00:00:00 2001
From: Matthias Klumpp <mak@debian.org>
Date: Sun, 4 May 2025 23:34:44 +0200
Subject: [PATCH] Don't fail Python build when we are not in a Git repo
We are building the Debian package not in a Git repo, so, allow us
to override the version number in the Debian packaging.
---
setup.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/setup.py b/setup.py
index 0ca138e60..5925f276c 100644
--- a/setup.py
+++ b/setup.py
@@ -110,7 +110,10 @@ try:
__version__ = os.environ["NEURON_WHEEL_VERSION"]
except Exception as e:
- raise RuntimeError("Could not get version from Git repo : " + str(e))
+ if "NRN_UPSTREAM_VERSION" in os.environ:
+ __version__ = os.environ["NRN_UPSTREAM_VERSION"]
+ else:
+ raise RuntimeError("Could not get version from Git repo : " + str(e))
# setup options must be checked for very early as it impacts imports
--
2.47.2
|