MINGW-packages/mingw-w64-python-versioneer/002-allow-override.patch
Christoph Reiter aa4d23b3b0 jsonrpc-server: fix python package version
The unvendoring removed the feature for overriding the version.
Move the patch to the versioneer package and rebuild both.
2024-11-06 19:04:32 +01:00

19 lines
706 B
Diff

--- versioneer-0.29/src/get_versions.py.orig 2023-07-07 16:54:25.000000000 +0200
+++ versioneer-0.29/src/get_versions.py 2024-11-06 19:01:53.837786000 +0100
@@ -15,6 +15,15 @@
Returns dict with two keys: 'version' and 'full'.
"""
+
+ override = os.getenv("VERSIONEER_OVERRIDE")
+ if override:
+ if verbose:
+ print(f"got version from environment variable (VERSIONEER_OVERRIDE={override})")
+ return {"version": override, "dirty": False, "error": None,
+ "full-revisionid": None,
+ "date": None}
+
if "versioneer" in sys.modules:
# see the discussion in cmdclass.py:get_cmdclass()
del sys.modules["versioneer"]