File: build-uninstalled-docs.patch

package info (click to toggle)
python-icalendar 6.0.1-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 1,224 kB
  • sloc: python: 5,331; makefile: 170; sh: 59
file content (26 lines) | stat: -rw-r--r-- 803 bytes parent folder | download
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
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: 2024-10-30
---
 docs/conf.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/docs/conf.py b/docs/conf.py
index d3a67d1..500d967 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -29,7 +29,10 @@ master_doc = 'index'
 project = 'icalendar'
 this_year = datetime.date.today().year
 copyright = f'{this_year}, Plone Foundation'
-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
 
 exclude_patterns = ['_build', 'lib', 'bin', 'include', 'local']