summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorNeil Williams <neil@reddit.com>2013-08-25 21:47:54 -0700
committerNeil Williams <neil@reddit.com>2013-08-25 21:52:53 -0700
commit4dd5f7fb8b89268af042212950e98b072b586905 (patch)
tree5bf2298ba9eb41eac6b89789bedcb25024c79f27 /docs
parent5be2d7c4a2617009d117b07f3b26ed1dba3f3a7b (diff)
downloadkazoo-4dd5f7fb8b89268af042212950e98b072b586905.tar.gz
sphinx: Configure sys.path to allow autodoc to find Kazoo.
Previously, if Kazoo wasn't already in sys.path otherwise (e.g. if not installed) sphinx autodoc wouldn't be able to find the module for documenting purposes because sphinx-build happens in an adjacent subdirectory. This adds the docs folder's parent to the path so that autodoc can find the Kazoo module properly and do its stuff.
Diffstat (limited to 'docs')
-rw-r--r--docs/conf.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/docs/conf.py b/docs/conf.py
index 9517492..b8b9738 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -10,6 +10,7 @@
#
# All configuration values have a default; values that are commented out
# serve to show the default.
+import os
import sys
@@ -27,7 +28,7 @@ for mod_name in MOCK_MODULES:
# 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('.'))
+sys.path.insert(0, os.path.abspath('..'))
# -- General configuration -----------------------------------------------------