From 8fabbae86cbddc6d4a256787e4592e426fddf68e Mon Sep 17 00:00:00 2001 From: Matthew Tretter Date: Wed, 6 Feb 2013 22:21:20 -0500 Subject: [PATCH] Extract version from pkgmeta --- docs/conf.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index e0913b9..35f184d 100644 --- a/docs/conf.py +++ b/docs/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 re, sys, os # 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 @@ -45,14 +45,18 @@ master_doc = 'index' project = u'ImageKit' copyright = u'2011, Justin Driscoll, Bryan Veloso, Greg Newman, Chris Drackett & Matthew Tretter' +pkgmeta = {} +execfile(os.path.join(os.path.dirname(__file__), '..', 'imagekit', + 'pkgmeta.py'), pkgmeta) + # 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. # # The short X.Y version. -version = '2.0.2' +version = re.match('\d+\.\d+', pkgmeta['__version__']).group() # The full version, including alpha/beta/rc tags. -release = '2.0.2' +release = pkgmeta['__version__'] # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages.