Grab version number from setup.py for docs.

This commit is contained in:
Stefan van der Walt
2009-10-09 08:48:14 +02:00
parent edc0d55a41
commit 64c23ae460
+9 -2
View File
@@ -49,9 +49,16 @@ copyright = u'2009, SciPy Developers'
# built documents.
#
# The short X.Y version.
version = '0.1'
setup_lines = open('../../setup.py').readlines()
version = 'vUndefined'
for l in setup_lines:
if l.startswith('VERSION'):
version = l.split("'")[1]
break
# The full version, including alpha/beta/rc tags.
release = '0.1'
release = version
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.