diff --git a/doc/sphinx/conf.py b/doc/sphinx/conf.py index 63e5b9c16..3e2e14174 100644 --- a/doc/sphinx/conf.py +++ b/doc/sphinx/conf.py @@ -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.