Skip to content

Commit

Permalink
Read version string for docs from version_info.py
Browse files Browse the repository at this point in the history
  • Loading branch information
funkey committed May 30, 2019
1 parent 8628a07 commit a72e6ab
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions docs/build/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,20 @@
author = u'Jan Funke, Renate Krause, Julia Buhmann, Rodrigo Ceballos Lentini, William Grisaitis, Chris Barnes, Caroline Malin-Mayor, Larissa Heinrich, Philipp Hanslovsky, Sherry Ding, Andrew Champion, Arlo Sheridan, Constantin Pape'
copyright = u'2019, ' + author

here = os.path.abspath(os.path.dirname(__file__))
version_info = {}
with open(os.path.join(here, '..', '..', 'gunpowder', 'version_info.py')) as fp:
exec(fp.read(), version_info)
gp_version = version_info['_version']

# 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.
#
# The short X.Y version.
version = u'0.3'
version = u'{}.{}'.format(gp_version.major(), gp_version.minor())
# The full version, including alpha/beta/rc tags.
release = u'0.3'
release = str(gp_version)

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

0 comments on commit a72e6ab

Please sign in to comment.