mirror of
https://github.com/iluvcapra/pycmx.git
synced 2025-12-31 08:50:54 +00:00
Update conf.py
Experiment
This commit is contained in:
@@ -175,3 +175,34 @@ epub_exclude_files = ['search.html']
|
||||
|
||||
|
||||
# -- Extension configuration -------------------------------------------------
|
||||
|
||||
autodoc_member_order = 'bysource'
|
||||
autodoc_default_flags = ['show-inheritance']
|
||||
|
||||
def run_apidoc(_):
|
||||
"""This method is required by the setup method below."""
|
||||
import os
|
||||
dirname = os.path.dirname(__file__)
|
||||
ignore_paths = [os.path.join(dirname, '../../aaf2/model'),]
|
||||
# https://github.com/sphinx-doc/sphinx/blob/master/sphinx/ext/apidoc.py
|
||||
argv = [
|
||||
'--force',
|
||||
'--no-toc',
|
||||
'--separate',
|
||||
'--module-first',
|
||||
'--output-dir',
|
||||
os.path.join(dirname, 'api'),
|
||||
os.path.join(dirname, '../../aaf2'),
|
||||
] + ignore_paths
|
||||
|
||||
from sphinx.ext import apidoc
|
||||
apidoc.main(argv)
|
||||
|
||||
|
||||
def setup(app):
|
||||
"""This method is a hook into the Sphinx builder system and injects the
|
||||
apidoc module into it so it runs autodoc before running build.
|
||||
If you mess with this, you may not see any effect in a local build, this
|
||||
was added to get api documentation building on the ReadTheDocs server.
|
||||
"""
|
||||
app.connect('builder-inited', run_apidoc)
|
||||
|
||||
Reference in New Issue
Block a user