From d69b84a705819ddacc8c019cb7293e98d59fff1c Mon Sep 17 00:00:00 2001 From: Benoit Bryon Date: Wed, 29 Aug 2012 10:19:51 +0200 Subject: [PATCH] Modified the way documentation version is retrieved, so that readthedocs.org can get it. --- docs/conf.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index b4728c0..5009ff2 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -13,7 +13,11 @@ import sys, os -import django_downloadview + +doc_dir = os.path.dirname(os.path.abspath(__file__)) +project_dir = os.path.dirname(doc_dir) +version_filename = os.path.join(project_dir, '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 @@ -51,9 +55,9 @@ copyright = u'2012, BenoƮt Bryon' # built documents. # # The short X.Y version. -version = django_downloadview.__version__ +version = open(version_filename).read().strip() # The full version, including alpha/beta/rc tags. -release = django_downloadview.__version__ +release = version # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages.