Skip to content

Commit 1094abe

Browse files
committed
Use auto-generated version number for sphinx documentation
Signed-off-by: Sebastian Ramacher <[email protected]>
1 parent 717206c commit 1094abe

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

doc/sphinx/source/conf.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# All configuration values have a default; values that are commented out
1212
# serve to show the default.
1313

14-
import sys, os
14+
import os
1515

1616
# If extensions (or modules to document with autodoc) are in another directory,
1717
# add these directories to sys.path here. If the directory is relative to the
@@ -45,9 +45,15 @@
4545
# built documents.
4646
#
4747
# The short X.Y version.
48-
version = 'git'
48+
49+
version_file = os.path.join(os.path.dirname(os.path.abspath(__file__)),
50+
'../../../bpython/_version.py')
51+
52+
with open(version_file) as vf:
53+
version = vf.read().strip().split('=')[-1].replace('\'', '')
54+
4955
# The full version, including alpha/beta/rc tags.
50-
release = 'git'
56+
release = version
5157

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

0 commit comments

Comments
 (0)