From 9454f6c85675f6d8fc0345bdfbb7f83180a9c15d Mon Sep 17 00:00:00 2001 From: Will Kahn-Greene Date: Wed, 22 Aug 2012 18:04:50 -0400 Subject: Fix docs so they pull version from _version.py --- docs/source/conf.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'docs/source/conf.py') diff --git a/docs/source/conf.py b/docs/source/conf.py index 41cf2529..4209acc8 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -17,6 +17,7 @@ import sys, os # 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. sys.path.insert(0, os.path.abspath('.')) +sys.path.insert(0, os.path.abspath(os.path.join('..', '..'))) # -- General configuration ----------------------------------------------------- @@ -47,10 +48,15 @@ copyright = u'2011, 2012 GNU MediaGoblin contributors' # |version| and |release|, also used in various other places throughout the # built documents. # -# The short X.Y version. -version = '0.3.1' -# The full version, including alpha/beta/rc tags. -release = '0.3.1.dev' +try: + from mediagoblin._version import __version__ + # The short X.Y version. + version = '.'.join(__version__.split('.')[0:2]) + # The full version, including alpha/beta/rc tags. + release = __version__ +except ImportError: + version = 'unknown' + release = 'unknown' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. -- cgit v1.2.3