20 lines
755 B
Diff
20 lines
755 B
Diff
|
diff --git a/docs/conf.py b/docs/conf.py
|
||
|
index 96746bf..fed362e 100644
|
||
|
--- a/docs/conf.py
|
||
|
+++ b/docs/conf.py
|
||
|
@@ -59,9 +59,11 @@ copyright = '2012-%s, Ian Bicking' % thisyear
|
||
|
# The version info for the project you're documenting, acts as replacement for
|
||
|
# |version| and |release|, also used in various other places throughout the
|
||
|
# built documents.
|
||
|
-import pkg_resources
|
||
|
-version = pkg_resources.get_distribution(project).version
|
||
|
-release = version
|
||
|
+import pathlib
|
||
|
+lines = (pathlib.Path(__file__).parent.parent / 'PKG-INFO').open().readlines()
|
||
|
+line = lines[2]
|
||
|
+assert line.startswith('Version: ')
|
||
|
+release = line.split(':')[1].strip()
|
||
|
|
||
|
# The language for content autogenerated by Sphinx. Refer to documentation
|
||
|
# for a list of supported languages.
|