Skip to content

Commit

Permalink
remove sphinx-apidoc
Browse files Browse the repository at this point in the history
  • Loading branch information
carlomazzaferro committed Mar 15, 2018
1 parent 1efc6c4 commit 4bf744c
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,22 @@
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'

if on_rtd:
import inspect
from sphinx import apidoc
# If extensions (or modules to document with autodoc) are in another
# directory, add these directories to sys.path here. If the directory is
# relative to the documentation root, use os.path.abspath to make it
# absolute, like shown here.
#sys.path.insert(0, os.path.abspath('.'))

__location__ = os.path.join(os.getcwd(), os.path.dirname(
inspect.getfile(inspect.currentframe())))
# Get the project root dir, which is the parent dir of this
cwd = os.getcwd()
project_root = os.path.dirname(cwd)

# Insert the project root dir as the first element in the PYTHONPATH.
# This lets us ensure that the source package is imported, and that its
# version is used.
sys.path.insert(0, project_root)

output_dir = os.path.join(__location__, "../docs/api")
module_dir = os.path.join(__location__, "../VAPr")
cmd_line_template = "sphinx-apidoc -f -o {outputdir} {moduledir}"
cmd_line = cmd_line_template.format(outputdir=output_dir, moduledir=module_dir)
apidoc.main(cmd_line.split(" "))

# -- Project information -----------------------------------------------------

Expand Down Expand Up @@ -177,4 +179,4 @@
# -- Options for todo extension ----------------------------------------------

# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = True
todo_include_todos = True

0 comments on commit 4bf744c

Please sign in to comment.