Skip to content

Commit f8da7c5

Browse files
committed
Read version and release for generated documentation from roundup/__init__.py
Release 1.5.0 contains documentation with version number 1.4, and the release number never included the third part.
1 parent 82a26c6 commit f8da7c5

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

CHANGES.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ Fixed:
2020
- If documentation 'sphinx-build' tool is not found in system PATH,
2121
'setup.py build_doc' command now tries to detect it from PYTHONPATH
2222
(anatoly techtonik)
23+
- Read version and release for generated documentation from
24+
roundup/__init__.py. (Thomas Arendsen Hein)
2325

2426

2527
2013-07-06: 1.5.0

doc/conf.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@
1313

1414
import sys, os
1515

16+
try:
17+
sys.path.insert(0, os.pardir)
18+
from roundup import __version__ as roundupversion
19+
sys.path.pop(0)
20+
except ImportError:
21+
roundupversion = '(unknown version)'
22+
1623
# If your extensions are in another directory, add it here. If the directory
1724
# is relative to the documentation root, use os.path.abspath to make it
1825
# absolute, like shown here.
@@ -46,9 +53,9 @@
4653
# built documents.
4754
#
4855
# The short X.Y version.
49-
version = '1.4'
56+
version = '.'.join(roundupversion.split('.', 2)[:2])
5057
# The full version, including alpha/beta/rc tags.
51-
release = '1.4'
58+
release = roundupversion
5259

5360
# The language for content autogenerated by Sphinx. Refer to documentation
5461
# for a list of supported languages.

0 commit comments

Comments
 (0)