From a3b6e0f358871dc41516c33d237a0a61735ff84c Mon Sep 17 00:00:00 2001 From: Todd Willey Date: Sun, 7 Nov 2010 17:53:39 -0500 Subject: [PATCH] Use the autodoc tools in the setup.py build_sphinx toolchain. --- doc/ext/nova_autodoc.py | 9 +++++++++ doc/source/conf.py | 3 +-- 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 doc/ext/nova_autodoc.py diff --git a/doc/ext/nova_autodoc.py b/doc/ext/nova_autodoc.py new file mode 100644 index 000000000000..39aa2c2cfadd --- /dev/null +++ b/doc/ext/nova_autodoc.py @@ -0,0 +1,9 @@ +import os + +from nova import utils + +def setup(app): + rootdir = os.path.abspath(app.srcdir + '/..') + print "**Autodocumenting from %s" % rootdir + rv = utils.execute('cd %s && ./generate_autodoc_index.sh' % rootdir) + print rv[0] diff --git a/doc/source/conf.py b/doc/source/conf.py index f59a58cdc37e..10a9b2317450 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -24,8 +24,7 @@ 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.intersphinx', 'ext.nova_todo', 'sphinx.ext.coverage', 'sphinx.ext.pngmath', 'sphinx.ext.ifconfig'] -#extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx', 'sphinx.ext.coverage', 'sphinx.ext.pngmath', 'sphinx.ext.ifconfig'] +extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx', 'ext.nova_todo', 'sphinx.ext.coverage', 'sphinx.ext.pngmath', 'sphinx.ext.ifconfig', 'ext.nova_autodoc'] todo_include_todos = True # Add any paths that contain templates here, relative to this directory.