From 31e7a5dce9cc202f2e013f018d668022d469032f Mon Sep 17 00:00:00 2001 From: Andrea Gavana Date: Fri, 30 Dec 2011 21:36:17 +0000 Subject: [PATCH] Another try at the phoenix root doxy root stuff (BTW, thanks for NOT setting the WXWIN environ variable) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@70209 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- sphinxtools/constants.py | 15 +++++---------- sphinxtools/postprocess.py | 1 + 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/sphinxtools/constants.py b/sphinxtools/constants.py index f30fe20b..719eafed 100644 --- a/sphinxtools/constants.py +++ b/sphinxtools/constants.py @@ -17,6 +17,7 @@ import datetime # Phoenix-specific imports import buildtools.version as version +from buildtools.config import phoenixDir, wxDir # List of strings that should be ignored when creating inline literals # such as ``ID_ANY`` or ``HORIZONtAL``, with double backticks @@ -77,7 +78,7 @@ CPP_ITEMS = ['*', '&', 'const', 'unsigned', '(size_t)', 'size_t', 'void'] # building the ReST docs: # The location of the Phoenix main folder -PHOENIXROOT = os.path.abspath(os.path.split(__file__)[0] + '/..') +PHOENIXROOT = phoenixDir() # The location of the Sphinx main folder SPHINXROOT = os.path.join(PHOENIXROOT, 'docs', 'sphinx') @@ -106,18 +107,12 @@ WIDGETS_IMAGES_ROOT = os.path.join(SPHINXROOT, '_static', 'images', 'widgets', # Folder for the icons used for titles, sub-titles and so on for the Sphinx documentation SPHINX_IMAGES_ROOT = os.path.join(SPHINXROOT, '_static', 'images', 'sphinxdocs') + # The Doxygen root for the XML docstrings xmlsrcbase = 'docs/doxygen/out/xml' +WXWIN = wxDir() -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 - +XMLSRC = '' if WXWIN: XMLSRC = os.path.join(WXWIN, xmlsrcbase) diff --git a/sphinxtools/postprocess.py b/sphinxtools/postprocess.py index b7ce2a86..be75efd8 100644 --- a/sphinxtools/postprocess.py +++ b/sphinxtools/postprocess.py @@ -138,6 +138,7 @@ def BuildEnumsAndMethods(sphinxDir): text = text.replace('non-NULL', 'not ``None``') text = text.replace(',,', ',').replace(', ,', ',') text = text.replace(':note:', '.. note::') + text = text.replace(':see:', '.. seealso::') fid = open(input, 'wt') fid.write(text)