Skip to content

Commit

Permalink
hack to get sphinx-apidoc to run in readthedocs build
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel Altay committed Mar 21, 2019
1 parent a924884 commit 4f7b663
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,3 +152,32 @@

# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {"https://docs.python.org/": None}


def run_apidoc(_):
ignore_paths = [
...
]

argv = [
"-f",
"-T",
"-e",
"-M",
"-o", ".",
".."
] + ignore_paths

try:
# Sphinx 1.7+
from sphinx.ext import apidoc
except ImportError:
# Sphinx 1.6 (and earlier)
from sphinx import apidoc
argv.insert(0, apidoc.__file__)

apidoc.main(argv)


def setup(app):
app.connect('builder-inited', run_apidoc)

0 comments on commit 4f7b663

Please sign in to comment.