aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRonan Amicel <ronan.amicel@gmail.com>2012-10-25 10:22:36 -0700
committerRonan Amicel <ronan.amicel@gmail.com>2012-10-25 10:22:36 -0700
commit3df3a37312fdcd4ae438fc17c11406e0f8906e42 (patch)
treefcd633e6f23fb5cdd6b8064d14d5e99b2085b6aa
parentFix potential issue with pip version parsing (diff)
parentDeduplicate the version for the doc (diff)
downloadfabtools-3df3a37312fdcd4ae438fc17c11406e0f8906e42.tar.xz
Merge pull request #41 from liZe/patch-1
Use the version number from setup.py in the documentation
-rw-r--r--docs/conf.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/docs/conf.py b/docs/conf.py
index 840d1ab..f56fa4e 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 sys, os, re
# 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
@@ -53,10 +53,14 @@ copyright = u'2012, Ronan Amicel'
# |version| and |release|, also used in various other places throughout the
# built documents.
#
-# The short X.Y version.
-version = '0.5.1'
# The full version, including alpha/beta/rc tags.
-release = '0.5.1'
+release = re.search("version='([^']+)'",
+ open(os.path.join(os.path.dirname(__file__), os.pardir,
+ 'setup.py')).read().strip()
+).group(1)
+
+# The short X.Y version.
+version = '.'.join(release.split('.')[:2])
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.