File: 001-fix-for-docs.patch

package info (click to toggle)
python-changelogd 0.1.9-1~bpo12%2B1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-backports
  • size: 420 kB
  • sloc: python: 1,918; makefile: 21
file content (29 lines) | stat: -rw-r--r-- 819 bytes parent folder | download | duplicates (3)
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
28
29
Description: Fix for docs
 Fix for unable to find module changelogd during build,
 define the path + import version locally instead of pip.
Forwarded: not-needed
Author: Yogeswaran Umasankar <yogu@debian.org>
Last-Update: 2024-07-30

--- a/docs/conf.py
+++ b/docs/conf.py
@@ -16,6 +16,9 @@ from pathlib import Path
 
 import pkg_resources
 
+import os
+import sys
+sys.path.insert(0, os.path.abspath(".."))
 from changelogd import changelogd
 
 ROOT_PATH = Path(__file__).parents[1]
@@ -27,7 +30,8 @@ copyright = "2020, Andrzej Klajnert"
 author = "Andrzej Klajnert"
 
 # The full version, including alpha/beta/rc tags
-release = pkg_resources.get_distribution("pip").version
+from changelogd import __version__
+release = __version__
 
 
 # -- General configuration ---------------------------------------------------