Updates for readthedocs.org compatibility in docs building.

Change-Id: I1101d7eee78a8e215a2bb076872423fc86ef1b48
This commit is contained in:
Gabriel Hurley
2011-11-07 14:54:48 -08:00
parent 9742842795
commit 74c07b0455
2 changed files with 13 additions and 2 deletions

View File

@@ -12,7 +12,6 @@
# serve to show the default.
import sys, os
import horizon.version
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
HORIZON_DIR = os.path.abspath(os.path.join(BASE_DIR, "..", "..", "horizon"))
@@ -21,6 +20,12 @@ DASHBOARD_DIR = os.path.abspath(os.path.join(BASE_DIR, "..", "..", "openstack-da
sys.path.insert(0, HORIZON_DIR)
sys.path.insert(0, DASHBOARD_DIR)
# This is required for ReadTheDocs.org, but isn't a bad idea anyway.
os.environ['DJANGO_SETTINGS_MODULE'] = 'dashboard.settings'
import horizon.version
def write_autodoc_index():
def find_autodoc_modules(module_name, sourcedir):
@@ -50,6 +55,8 @@ def write_autodoc_index():
SRCS = {'horizon': HORIZON_DIR,
'dashboard': DASHBOARD_DIR}
EXCLUDED_MODULES = ('horizon.tests', 'dashboard.tests',)
if not(os.path.exists(RSTDIR)):
os.mkdir(RSTDIR)
@@ -68,6 +75,9 @@ def write_autodoc_index():
if not(os.path.exists(os.path.join(RSTDIR, modulename))):
os.mkdir(os.path.join(RSTDIR, modulename))
for module in find_autodoc_modules(modulename, path):
if any([module.startswith(exclude) for exclude in EXCLUDED_MODULES]):
print "Excluded module %s." % module
continue
mod_path = os.path.join(path, *module.split("."))
generated_file = os.path.join(RSTDIR, modulename, "%s.rst" % module)

View File

@@ -6,11 +6,13 @@ django-registration==0.7
eventlet
glance
kombu
mox
nose==1.0.0
paste
PasteDeploy
python-cloudfiles
python-dateutil
quantum
routes
sqlalchemy
sqlalchemy-migrate
@@ -22,6 +24,5 @@ xattr
-e git+https://github.com/cloudbuilders/openstackx.git#egg=openstackx
-e git+https://github.com/jacobian/openstack.compute.git#egg=openstack
-e git+https://github.com/openstack/quantum.git#egg=quantum
-e git+https://github.com/rackspace/python-novaclient.git#egg=python-novaclient
-e git+https://github.com/4P/python-keystoneclient.git#egg=python-keystoneclient