projects/guix·blob javascript-team · refs

23 lines · 757 B

1Versioneer does not work in the Guix build container because:
2
3* VCS information is unavailable
4* the build directory does not have the supported "$name-$version" format
5* as of 0.21, versioneer has no way to override the discovered values
6
7This patch adds support for extracting version from the
8GUIX_VERSIONEER_VERSION environment variable set by the set-version
9phase of the pyproject build system.
10
11--- a/src/get_versions.py
12+++ b/src/get_versions.py
13@@ -19,6 +19,10 @@
14 # see the discussion in cmdclass.py:get_cmdclass()
15 del sys.modules["versioneer"]
16
17+ ver = {"version": os.getenv("GUIX_VERSIONEER_VERSION")}
18+ if ver["version"] is not None:
19+ return ver
20+
21 root = get_root()
22 cfg = get_config_from_root(root)
23