apidoc: read options from SPHINX_APIDOC_OPTIONS envvar if set

If the SPHINX_APIDOC_OPTIONS environment variable exists, read
OPTIONS from there, otherwise use the existing default options.
This allows some configurability of sphinx-apidoc.
This commit is contained in:
Fraser Tweedale
2011-12-21 15:22:46 +10:00
parent 1e44ab00e3
commit 1d188e778f

View File

@@ -20,12 +20,15 @@ import optparse
from os import path
# automodule options
OPTIONS = [
if 'SPHINX_APIDOC_OPTIONS' in os.environ:
OPTIONS = os.environ['SPHINX_APIDOC_OPTIONS'].split(',')
else:
OPTIONS = [
'members',
'undoc-members',
# 'inherited-members', # disabled because there's a bug in sphinx
'show-inheritance',
]
]
INITPY = '__init__.py'