From ad31a67d8fc95692b4a4dbd20dd0915b8811bda4 Mon Sep 17 00:00:00 2001 From: Martin Zimmermann Date: Wed, 19 Mar 2014 14:00:16 +0100 Subject: [PATCH] get doc version via installed distribution --- docs/conf.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 1699786..b114fe3 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -12,6 +12,9 @@ # All configuration values have a default; values that are commented out # serve to show the default. +import pkg_resources +dist = pkg_resources.get_distribution("isso") + import sys import os @@ -54,11 +57,14 @@ copyright = u'2013, Martin Zimmermann' # 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. + +from distutils.version import LooseVersion + # -# The short X.Y version. -version = '0.5' # The full version, including alpha/beta/rc tags. -release = '0.5.1' +release = dist.version +# The short X.Y version. +version = "{0}.{1}".format(*LooseVersion(dist.version).version) # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages.