Commits

frasertweedale  committed 75be31e

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.

  • Participants
  • Parent commits 60e26ac
  • Branches stable

Comments (0)

Files changed (1)

File sphinx/apidoc.py

 from os import path
 
 # automodule options
-OPTIONS = [
-    'members',
-    'undoc-members',
-    # 'inherited-members', # disabled because there's a bug in sphinx
-    'show-inheritance',
-]
+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'