Module: deluge
Branch: master
Commit: c8f2173a04795d5807d909bd548683849c87a854

Author: Andrew Resch <[email protected]>
Date:   Wed Mar 24 15:36:28 2010 -0700

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.

---

 docs/source/conf.py |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/docs/source/conf.py b/docs/source/conf.py
index 1eb10e2..392cee1 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:

-- 
You received this message because you are subscribed to the Google Groups 
"deluge-commit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/deluge-commit?hl=en.

Reply via email to