From a72e6ab4a6ad04e3c8647b1245e07a11131f4965 Mon Sep 17 00:00:00 2001 From: Jan Funke Date: Thu, 30 May 2019 12:15:56 -0400 Subject: [PATCH] Read version string for docs from version_info.py --- docs/build/conf.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/build/conf.py b/docs/build/conf.py index 5b1523cb..c10d7263 100644 --- a/docs/build/conf.py +++ b/docs/build/conf.py @@ -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.