[book] don't rely on importable cubicweb to extract cubicweb version number stable
authorPierre-Yves David <pierre-yves.david@logilab.fr>
Fri, 15 Oct 2010 16:12:47 +0200
branchstable
changeset 6511 2bf506737008
parent 6508 38c2ff52cfca
child 6512 1f8b902f3143
[book] don't rely on importable cubicweb to extract cubicweb version number
doc/book/en/conf.py
--- a/doc/book/en/conf.py	Fri Oct 15 11:48:43 2010 +0200
+++ b/doc/book/en/conf.py	Fri Oct 15 16:12:47 2010 +0200
@@ -32,8 +32,16 @@
 # serve to show the default value.
 
 import sys, os
+from os import path as osp
 
-from cubicweb import __pkginfo__ as cw
+path = __file__
+path = osp.dirname(path) #./doc/book/en
+path = osp.dirname(path) #./doc/book/
+path = osp.dirname(path) #./doc/
+path = osp.dirname(path) #./
+path = osp.join(path,'__pkginfo__.py') #./__pkginfo__.py
+cw = {}
+execfile(path,{},cw)
 
 # If your extensions are in another directory, add it here. If the directory
 # is relative to the documentation root, use os.path.abspath to make it
@@ -64,9 +72,9 @@
 # other places throughout the built documents.
 #
 # The short X.Y version.
-version = '.'.join(str(n) for n in cw.numversion[:2])
+version = '.'.join(str(n) for n in cw['numversion'][:2])
 # The full version, including alpha/beta/rc tags.
-release = cw.version
+release = cw['version']
 
 # There are two options for replacing |today|: either, you set today to some
 # non-false value, then it is used: