1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
From: Colin Watson <cjwatson@debian.org>
Date: Wed, 30 Oct 2024 14:12:22 +0000
Subject: Handle building docs without installation
Forwarded: not-needed
Last-Update: 2025-08-26
---
docs/conf.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/docs/conf.py b/docs/conf.py
index 351f842..7d147bd 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -18,7 +18,11 @@ master_doc = "index"
project = "icalendar"
this_year = datetime.date.today().year
copyright = f"{this_year}, Plone Foundation"
-release = version = importlib.metadata.version("icalendar")
+if "DEB_VERSION_UPSTREAM" in os.environ:
+ version = os.environ["DEB_VERSION_UPSTREAM"]
+else:
+ version = importlib.metadata.version("icalendar")
+release = version
# -- Options for HTML output -------------------------------------------------
|