| 1 |
From: Carsten Schoenert <[email protected]> |
| 2 |
Date: Sat, 8 Nov 2025 11:14:42 +0200 |
| 3 |
Subject: Sphinx: Catch up package version from environment |
| 4 |
|
| 5 |
We don't have a installed version of drf-yasg within the chroot, |
| 6 |
inflating the package version through the environment variable |
| 7 |
'DRF_YASG_UPSTREAM_VERSION' which is exported through debian/rules. |
| 8 |
|
| 9 |
Forwarded: not-needed |
| 10 |
--- |
| 11 |
docs/conf.py | 21 +++++++++++---------- |
| 12 |
1 file changed, 11 insertions(+), 10 deletions(-) |
| 13 |
|
| 14 |
diff --git a/docs/conf.py b/docs/conf.py |
| 15 |
index 758d130..1667736 100644 |
| 16 |
--- a/docs/conf.py |
| 17 |
+++ b/docs/conf.py |
| 18 |
@@ -51,17 +51,18 @@ author = "Cristi V." |
| 19 |
# built documents. |
| 20 |
|
| 21 |
# The full version, including alpha/beta/rc tags. |
| 22 |
-release = metadata.version("drf_yasg") |
| 23 |
-if "noscm" in release: |
| 24 |
- raise AssertionError( |
| 25 |
- "Invalid package version string: %s. \n" |
| 26 |
- "The documentation must be built with drf_yasg installed from a distribution " |
| 27 |
- "package, which must have been built with a proper version number (i.e. from " |
| 28 |
- "a full source checkout)." % (release,) |
| 29 |
- ) |
| 30 |
- |
| 31 |
+#release = metadata.version("drf_yasg") |
| 32 |
+#if "noscm" in release: |
| 33 |
+# raise AssertionError( |
| 34 |
+# "Invalid package version string: %s. \n" |
| 35 |
+# "The documentation must be built with drf_yasg installed from a distribution " |
| 36 |
+# "package, which must have been built with a proper version number (i.e. from " |
| 37 |
+# "a full source checkout)." % (release,) |
| 38 |
+# ) |
| 39 |
+# |
| 40 |
# The short X.Y.Z version. |
| 41 |
-version = ".".join(release.split(".")[:3]) |
| 42 |
+#version = ".".join(release.split(".")[:3]) |
| 43 |
+version = os.environ['DRF_YASG_UPSTREAM_VERSION'] |
| 44 |
|
| 45 |
# The language for content autogenerated by Sphinx. Refer to documentation |
| 46 |
# for a list of supported languages. |