- Workaround missing WXWIN environ variable for Sphinx docs

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@70208 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Andrea Gavana
2011-12-30 21:14:57 +00:00
parent 78c1a61993
commit 07c4bfc91b

View File

@@ -107,7 +107,23 @@ WIDGETS_IMAGES_ROOT = os.path.join(SPHINXROOT, '_static', 'images', 'widgets',
SPHINX_IMAGES_ROOT = os.path.join(SPHINXROOT, '_static', 'images', 'sphinxdocs')
# The Doxygen root for the XML docstrings
DOXYROOT = os.path.join(os.environ['WXWIN'], 'docs', 'doxygen')
xmlsrcbase = 'docs/doxygen/out/xml'
WXWIN = os.environ.get('WXWIN')
if not WXWIN:
for rel in ['../wxWidgets', '..', '../../wxWidgets/trunk']:
path = os.path.join(PHOENIXROOT, rel, xmlsrcbase)
if path and os.path.exists(path):
WXWIN = os.path.abspath(os.path.join(PHOENIXROOT, rel))
break
if WXWIN:
XMLSRC = os.path.join(WXWIN, xmlsrcbase)
assert WXWIN and os.path.exists(XMLSRC), "Unable to locate Doxygen XML files"
DOXYROOT = os.path.join(WXWIN, 'docs', 'doxygen')
# Dictionary copied over from tweaker_tools
MAGIC_METHODS = {