From: Carsten Schoenert Date: Sat, 8 Nov 2025 11:14:42 +0200 Subject: Sphinx: Catch up package version from environment We don't have a installed version of drf-yasg within the chroot, inflating the package version through the environment variable 'DRF_YASG_UPSTREAM_VERSION' which is exported through debian/rules. Forwarded: not-needed --- docs/conf.py | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 758d130..1667736 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -51,17 +51,18 @@ author = "Cristi V." # built documents. # The full version, including alpha/beta/rc tags. -release = metadata.version("drf_yasg") -if "noscm" in release: - raise AssertionError( - "Invalid package version string: %s. \n" - "The documentation must be built with drf_yasg installed from a distribution " - "package, which must have been built with a proper version number (i.e. from " - "a full source checkout)." % (release,) - ) - +#release = metadata.version("drf_yasg") +#if "noscm" in release: +# raise AssertionError( +# "Invalid package version string: %s. \n" +# "The documentation must be built with drf_yasg installed from a distribution " +# "package, which must have been built with a proper version number (i.e. from " +# "a full source checkout)." % (release,) +# ) +# # The short X.Y.Z version. -version = ".".join(release.split(".")[:3]) +#version = ".".join(release.split(".")[:3]) +version = os.environ['DRF_YASG_UPSTREAM_VERSION'] # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages.