From 6789080a9e50fdaa8c4df47512d4c4e7a92280ec Mon Sep 17 00:00:00 2001
From: Nikos Skalkotos <skalkoto@grnet.gr>
Date: Tue, 10 Jun 2014 13:50:22 +0300
Subject: [PATCH] docs: get the version from version.py

Automatically load the version from the version.py file
---
 docs/conf.py | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/docs/conf.py b/docs/conf.py
index 75b97f8..cade830 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -14,6 +14,10 @@
 
 import sys
 import os
+import imp
+
+VERSION = getattr(imp.load_source(
+        'image_creator.version', '../image_creator/version.py'), '__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
@@ -43,16 +47,16 @@ master_doc = 'index'
 
 # General information about the project.
 project = u'snf-image-creator'
-copyright = u'2012, 2013 GRNET S.A. All rights reserved'
+copyright = u'2012-2014 GRNET S.A. All rights reserved'
 
 # 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 = '0.6.1'
+version = VERSION
 # The full version, including alpha/beta/rc tags.
-release = '0.6.1'
+release = VERSION
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
-- 
GitLab