mirror of
https://github.com/Cantera/cantera.git
synced 2025-02-25 18:55:29 -06:00
[Doc] Sphinx reads version info from config.h
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user