From 5dba22b8e791a9fdc34d1ad7efa6c27bb1099be2 Mon Sep 17 00:00:00 2001 From: Radovan Bast Date: Mon, 18 Jul 2016 14:58:52 +0200 Subject: [PATCH] sphinx doc version automatically follows __version__ --- doc/conf.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index ef2d51e..45ebae7 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -19,6 +19,9 @@ sys.path.append(os.path.relpath(os.path.abspath('.'))) import extract_rst +sys.path.append(os.path.relpath(os.path.abspath('..'))) +from autocmake import __version__ as _version + # 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 # documentation root, use os.path.abspath to make it absolute, like shown here. @@ -59,10 +62,10 @@ # |version| and |release|, also used in various other places throughout the # built documents. # -# The short X.Y version. -version = '1.0' # The full version, including alpha/beta/rc tags. -release = '1.0.0-alpha-x' +release = _version +# The short X.Y version. +version = '.'.join(release.split('.')[0:2]) # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages.