| 1 |
From: Colin Watson <[email protected]> |
| 2 |
Date: Sun, 29 Dec 2024 00:47:01 +0000 |
| 3 |
Subject: Handle building docs without installation |
| 4 |
|
| 5 |
Forwarded: not-needed |
| 6 |
Last-Update: 2024-12-29 |
| 7 |
--- |
| 8 |
docs/conf.py | 8 +++++++- |
| 9 |
1 file changed, 7 insertions(+), 1 deletion(-) |
| 10 |
|
| 11 |
diff --git a/docs/conf.py b/docs/conf.py |
| 12 |
index b7634a4..b9ba465 100644 |
| 13 |
--- a/docs/conf.py |
| 14 |
+++ b/docs/conf.py |
| 15 |
@@ -1,3 +1,5 @@ |
| 16 |
+import os |
| 17 |
+ |
| 18 |
from pallets_sphinx_themes import get_version |
| 19 |
from pallets_sphinx_themes import ProjectLink |
| 20 |
|
| 21 |
@@ -6,7 +8,11 @@ from pallets_sphinx_themes import ProjectLink |
| 22 |
project = "Click" |
| 23 |
copyright = "2014 Pallets" |
| 24 |
author = "Pallets" |
| 25 |
-release, version = get_version("Click") |
| 26 |
+if "DEB_VERSION_UPSTREAM" in os.environ: |
| 27 |
+ version = os.environ["DEB_VERSION_UPSTREAM"] |
| 28 |
+ release = f"{version.split('.', 2)[:2]}.x" |
| 29 |
+else: |
| 30 |
+ release, version = get_version("Click") |
| 31 |
|
| 32 |
# General -------------------------------------------------------------- |
| 33 |
|