From 702a4743f05370c16c92094fc43de14168031e96 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Sat, 25 Feb 2012 12:44:28 -0800 Subject: [PATCH] Get rid of all of the autodoc import errors. This hasn't worked right in a bazillion years. Change-Id: I4db20ce97f920cdb7254d51e18a0630b0283b39d --- doc/ext/nova_autodoc.py | 6 ++---- doc/find_autodoc_modules.sh | 4 ++-- doc/generate_autodoc_index.sh | 4 ++-- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/doc/ext/nova_autodoc.py b/doc/ext/nova_autodoc.py index 704c590f0b95..6c5376fe1661 100644 --- a/doc/ext/nova_autodoc.py +++ b/doc/ext/nova_autodoc.py @@ -7,8 +7,6 @@ from nova import utils def setup(app): - rootdir = os.path.abspath(app.srcdir + '/..') - print "**Autodocumenting from %s" % rootdir - os.chdir(rootdir) - rv = utils.execute('./generate_autodoc_index.sh') + print "**Autodocumenting from %s" % os.path.abspath(os.curdir) + rv = utils.execute('./doc/generate_autodoc_index.sh') print rv[0] diff --git a/doc/find_autodoc_modules.sh b/doc/find_autodoc_modules.sh index c612b0084068..0aff36f7d060 100755 --- a/doc/find_autodoc_modules.sh +++ b/doc/find_autodoc_modules.sh @@ -1,10 +1,10 @@ #!/bin/bash -NOVA_DIR='../nova/' # include trailing slash +NOVA_DIR='nova/' # include trailing slash DOCS_DIR='source' modules='' -for x in `find ${NOVA_DIR} -name '*.py'`; do +for x in `find ${NOVA_DIR} -name '*.py' | grep -v nova/tests`; do if [ `basename ${x} .py` == "__init__" ] ; then continue fi diff --git a/doc/generate_autodoc_index.sh b/doc/generate_autodoc_index.sh index 5d9cdd315be9..55c55d5145f9 100755 --- a/doc/generate_autodoc_index.sh +++ b/doc/generate_autodoc_index.sh @@ -1,12 +1,12 @@ #!/bin/sh -SOURCEDIR=source/api +SOURCEDIR=doc/source/api if [ ! -d ${SOURCEDIR} ] ; then mkdir -p ${SOURCEDIR} fi -for x in `./find_autodoc_modules.sh`; +for x in `./doc/find_autodoc_modules.sh`; do echo "Generating ${SOURCEDIR}/${x}.rst" echo "${SOURCEDIR}/${x}.rst" >> .autogenerated