1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
Description: Fix version import in docs
The script can not import mptt module because it is not in python path during
the documentation build, so we append sub directory to sys.path
Author: Janos Guljas <janos@resenje.org>
Last-Update: 2011-01-25
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -48,6 +48,7 @@ copyright = u'2007 - 2010, Jonathan Buch
# built documents.
#
# The short X.Y version.
+sys.path.append(os.path.realpath(os.sep.join(os.path.dirname(__file__).split(os.sep)[:-1])))
version_tuple = __import__('mptt').VERSION
version = ".".join([str(v) for v in version_tuple])
|