From 9abc056a1be5ee5e06f6313d61e639e851797502 Mon Sep 17 00:00:00 2001 From: Todd Leonhardt Date: Sun, 12 Feb 2017 12:11:49 -0500 Subject: Fixed doc conf.py so it correctly sets PYTHONPATH for autodoc feature. --- docs/conf.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'docs/conf.py') diff --git a/docs/conf.py b/docs/conf.py index fdd6db8c..d1e20119 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -17,9 +17,9 @@ # 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. # -# import os -# import sys -# sys.path.insert(0, os.path.abspath('.')) +import os +import sys +sys.path.insert(0, os.path.abspath('..')) # Import for custom theme from Read the Docs import sphinx_rtd_theme @@ -32,7 +32,10 @@ import sphinx_rtd_theme # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. -extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.intersphinx', 'sphinx.ext.todo'] +extensions = ['sphinx.ext.autodoc', + 'sphinx.ext.intersphinx', + 'sphinx.ext.doctest', + 'sphinx.ext.todo'] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -160,3 +163,6 @@ texinfo_documents = [ # -- Options for Extensions ------------------------------------------- # Example configuration for intersphinx: refer to the Python standard library. intersphinx_mapping = {'http://docs.python.org/': None} + +# Mock 3rd-party dependencies so they don't need to be installed for building docs +autodoc_mock_imports = ['six'] -- cgit v1.2.1