[Doc] Sphinx reads version info from config.h

This commit is contained in:
Ray Speth
2015-06-14 20:00:54 -04:00
parent 484eff996b
commit 6994d56587

View File

@@ -11,7 +11,7 @@
# All configuration values have a default; values that are commented out
# serve to show the default.
import sys, os
import sys, os, re
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
@@ -82,11 +82,12 @@ copyright = u'2012, Cantera Developers'
# 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.
#
configh = open('../../include/cantera/base/config.h').read()
# The short X.Y version.
version = '2.2'
version = re.search('CANTERA_SHORT_VERSION "(.*?)"', configh).group(1)
# The full version, including alpha/beta/rc tags.
release = '2.2.0'
release = re.search('CANTERA_VERSION "(.*?)"', configh).group(1)
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.