summaryrefslogtreecommitdiffstats
path: root/docs/source/conf.py
diff options
context:
space:
mode:
authorAndrew Resch <andrewresch@gmail.com>2010-03-24 15:36:28 -0700
committerAndrew Resch <andrewresch@gmail.com>2010-03-24 15:36:28 -0700
commitc8f2173a04795d5807d909bd548683849c87a854 (patch)
tree1bd86b092245e9466fa8625bf2773781a3b67658 /docs/source/conf.py
parent256ae0745c473130f0d9440feed9c7a401e4c97d (diff)
downloaddeluge-c8f2173a04795d5807d909bd548683849c87a854.tar.gz
deluge-c8f2173a04795d5807d909bd548683849c87a854.tar.bz2
deluge-c8f2173a04795d5807d909bd548683849c87a854.zip
Use a hack to get the version instead of relying on pkg_resources. This allows the docs to be built without having to install deluge.
Diffstat (limited to 'docs/source/conf.py')
-rw-r--r--docs/source/conf.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/docs/source/conf.py b/docs/source/conf.py
index 1eb10e220..392cee1a5 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -42,10 +42,17 @@ copyright = '2008-2010, Deluge Team'
# The default replacements for |version| and |release|, also used in various
# other places throughout the built documents.
#
+
+def find_version():
+ f = open("../../setup.py", "r")
+ for line in f:
+ if " version = " in line:
+ return line.strip().replace("\"", "").replace(" ", "").replace(",", "").split("=")[1]
+
# The short X.Y version.
-version = deluge.common.get_version()
+version = find_version()
# The full version, including alpha/beta/rc tags.
-release = deluge.common.get_version()
+release = version
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used: