summaryrefslogtreecommitdiffstats
path: root/doc/conf.py
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2012-12-10 17:19:54 -0600
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2012-12-10 17:22:38 -0600
commit9d6e6241954d001a5b49e4ea9a48c10e2a792958 (patch)
tree270309c0e04eacf2ce1e0d6cc6d61f1485899c0a /doc/conf.py
parent7dcb468f09781bacf79823748ef12bfbd1faeb21 (diff)
downloadbcfg2-9d6e6241954d001a5b49e4ea9a48c10e2a792958.tar.gz
bcfg2-9d6e6241954d001a5b49e4ea9a48c10e2a792958.tar.bz2
bcfg2-9d6e6241954d001a5b49e4ea9a48c10e2a792958.zip
generate XML schema docs from XML schemas themselves
Diffstat (limited to 'doc/conf.py')
-rw-r--r--doc/conf.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/doc/conf.py b/doc/conf.py
index ab011b2a5..0b88ddf2f 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -21,6 +21,7 @@ import time
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.insert(0, os.path.abspath('../src/lib'))
sys.path.insert(0, os.path.abspath('..'))
+sys.path.insert(0, os.path.abspath('exts'))
# -- General configuration -----------------------------------------------------
@@ -30,11 +31,15 @@ sys.path.insert(0, os.path.abspath('..'))
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest',
- 'sphinx.ext.intersphinx', 'sphinx.ext.viewcode']
+ 'sphinx.ext.intersphinx', 'sphinx.ext.viewcode',
+ 'xmlschema']
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
+# Path to XML schemas
+xmlschema_path = "../schemas"
+
# The suffix of source filenames.
source_suffix = '.txt'
@@ -288,6 +293,7 @@ private_re = re.compile(r'^\s*\.\.\s*private-include:\s*(.+)$')
private_include = []
+
def skip_member_from_docstring(app, what, name, obj, skip, options):
""" since sphinx 1.0 autodoc doesn't support the :private-members:
directive, this function allows you to specify
@@ -308,7 +314,7 @@ def skip_member_from_docstring(app, what, name, obj, skip, options):
if match:
private_include.extend(re.split(r',\s*', match.group(1)))
return None
-
+
if not skip:
return None
@@ -316,6 +322,7 @@ def skip_member_from_docstring(app, what, name, obj, skip, options):
return False
return None
+
def setup(app):
app.connect('autodoc-skip-member', skip_member_from_docstring)