Fix sphinx-docs job for sphinx >1.7
Upper requirements recently bumped sphinx from 1.6.5 to 1.7.4 which breaks our docs job. This switches the apidocs build to use sphinxcontrib.apidoc. Change-Id: If6b9aa070d37f2799623a24a8e18666b13ef9044
This commit is contained in:
parent
d6c7e57835
commit
9c6e9e331b
@ -4,6 +4,7 @@
|
|||||||
# Docs
|
# Docs
|
||||||
os-api-ref>=1.4.0 # Apache-2.0
|
os-api-ref>=1.4.0 # Apache-2.0
|
||||||
sphinxcontrib-actdiag>=0.8.5 # BSD
|
sphinxcontrib-actdiag>=0.8.5 # BSD
|
||||||
|
sphinxcontrib-apidoc # BSD
|
||||||
sphinxcontrib-blockdiag>=1.5.4 # BSD
|
sphinxcontrib-blockdiag>=1.5.4 # BSD
|
||||||
sphinxcontrib-nwdiag>=0.9.5 # BSD
|
sphinxcontrib-nwdiag>=0.9.5 # BSD
|
||||||
sphinxcontrib-seqdiag>=0.8.4 # BSD
|
sphinxcontrib-seqdiag>=0.8.4 # BSD
|
||||||
|
@ -18,7 +18,6 @@ import sys
|
|||||||
import openstackdocstheme
|
import openstackdocstheme
|
||||||
from pydotplus import graphviz
|
from pydotplus import graphviz
|
||||||
import sadisplay
|
import sadisplay
|
||||||
from sphinx import apidoc
|
|
||||||
|
|
||||||
import octavia.db.models as models
|
import octavia.db.models as models
|
||||||
|
|
||||||
@ -65,7 +64,8 @@ extensions = [
|
|||||||
'sphinx.ext.graphviz',
|
'sphinx.ext.graphviz',
|
||||||
'openstackdocstheme',
|
'openstackdocstheme',
|
||||||
'oslo_config.sphinxext',
|
'oslo_config.sphinxext',
|
||||||
'oslo_policy.sphinxpolicygen'
|
'oslo_policy.sphinxpolicygen',
|
||||||
|
'sphinxcontrib.apidoc'
|
||||||
]
|
]
|
||||||
|
|
||||||
todo_include_todos = True
|
todo_include_todos = True
|
||||||
@ -335,25 +335,9 @@ repository_name = 'openstack/octavia'
|
|||||||
bug_project = '908'
|
bug_project = '908'
|
||||||
bug_tag = 'docs'
|
bug_tag = 'docs'
|
||||||
|
|
||||||
|
apidoc_output_dir = 'contributor/modules'
|
||||||
# TODO(mordred) We should extract this into a sphinx plugin
|
apidoc_module_dir = '../../octavia'
|
||||||
def run_apidoc(_):
|
apidoc_excluded_paths = [
|
||||||
cur_dir = os.path.abspath(os.path.dirname(__file__))
|
'tests',
|
||||||
out_dir = os.path.join(cur_dir, 'contributor', 'modules')
|
'db/migration'
|
||||||
module = os.path.join(cur_dir, '..', '..', 'octavia')
|
]
|
||||||
# Keep the order of arguments same as the sphinx-apidoc help, otherwise it
|
|
||||||
# would cause unexpected errors:
|
|
||||||
# sphinx-apidoc [options] -o <output_path> <module_path>
|
|
||||||
# [exclude_pattern, ...]
|
|
||||||
apidoc.main([
|
|
||||||
'--force',
|
|
||||||
'-o',
|
|
||||||
out_dir,
|
|
||||||
module,
|
|
||||||
'octavia/tests',
|
|
||||||
'octavia/db/migration'
|
|
||||||
])
|
|
||||||
|
|
||||||
|
|
||||||
def setup(app):
|
|
||||||
app.connect('builder-inited', run_apidoc)
|
|
||||||
|
Loading…
Reference in New Issue
Block a user