summaryrefslogtreecommitdiff
path: root/docs/conf.py
diff options
context:
space:
mode:
authorJannis Leidel <jannis@leidel.info>2012-06-22 18:30:44 +0200
committerJannis Leidel <jannis@leidel.info>2012-06-22 18:30:44 +0200
commit0403303822c0c594d461ec70fc34b9d13333b922 (patch)
tree437ab6056a74f0d4a7167b44ffd0c8a05f5e9446 /docs/conf.py
parentae016e5ec540016c462162b75653382824051494 (diff)
downloadvirtualenv-0403303822c0c594d461ec70fc34b9d13333b922.tar.gz
Stopped hardcoding the version all over the place.
Diffstat (limited to 'docs/conf.py')
-rw-r--r--docs/conf.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/docs/conf.py b/docs/conf.py
index 9ea3fac..45a8226 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -39,11 +39,14 @@ copyright = '2007-2012, Ian Bicking, The Open Planning Project, The virtualenv d
# The default replacements for |version| and |release|, also used in various
# other places throughout the built documents.
-#
-# The short X.Y version.
-
-release = "1.7.1.2.post1"
-version = ".".join(release.split(".")[:2])
+try:
+ from virtualenv import __version__
+ # The short X.Y version.
+ version = '.'.join(__version__.split('.')[:2])
+ # The full version, including alpha/beta/rc tags.
+ release = __version__
+except ImportError:
+ version = release = 'dev'
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used: