From c769ff7bbe7e4ec1aa0d2251d80bb8fc532ef247 Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Mon, 13 Nov 2017 12:41:26 -0800 Subject: [PATCH] docs: get version from Versioneer, instead of hard-coding it --- docs/conf.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index cabec8d..c16d2b7 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -58,10 +58,20 @@ author = u'Brian Warner' # |version| and |release|, also used in various other places throughout the # built documents. # +def _get_versions(): + import os.path, sys, subprocess + here = os.path.dirname(os.path.abspath(__file__)) + parent = os.path.dirname(here) + v = subprocess.check_output([sys.executable, "setup.py", "--version"], + cwd=parent) + short = ".".join(v.split(".")[:2]) + long = v + return short, long +version, release = _get_versions() # The short X.Y version. -version = u'0.10' +#version = u'0.10' # The full version, including alpha/beta/rc tags. -release = u'0.10.3' +#release = u'0.10.3' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages.