| 1 | Versioneer 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 |
|
| 7 | This patch adds support for extracting version from the
|
| 8 | GUIX_VERSIONEER_VERSION environment variable set by the set-version
|
| 9 | phase of the pyproject build system.
|
| 10 |
|
| 11 | |
| 12 | |
| 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 |
|