get package version for docs

so we don't need to manually update version strings
This commit is contained in:
Min RK 2015-12-22 14:05:25 +01:00
parent 2a31d65a58
commit d1d81f8015

View File

@ -91,10 +91,13 @@ author = 'The Jupyter Team'
# |version| and |release|, also used in various other places throughout the
# built documents.
#
_version_py = '../../notebook/_version.py'
version_ns = {}
exec(compile(open(_version_py).read(), _version_py, 'exec'), version_ns)
# The short X.Y version.
version = '4.1'
version = '%i.%i' % version_ns['version_info'][:2]
# The full version, including alpha/beta/rc tags.
release = '4.1.0rc1'
release = version_ns['__version__']
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.