aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorTim Harder <radhermit@gmail.com>2015-12-16 02:08:46 -0500
committerTim Harder <radhermit@gmail.com>2015-12-16 02:10:45 -0500
commit7f6e17ba33bc5afe6f2f6f2f32b0a622c9a2af70 (patch)
tree7d16cfe9e09139251e8d9622701af73cff4c7ad6 /doc
parentebuild/profiles: simplify ProfileError message (diff)
downloadpkgcore-7f6e17ba33bc5afe6f2f6f2f32b0a622c9a2af70.tar.gz
pkgcore-7f6e17ba33bc5afe6f2f6f2f32b0a622c9a2af70.tar.bz2
pkgcore-7f6e17ba33bc5afe6f2f6f2f32b0a622c9a2af70.zip
doc: insert generated module dir into sys.path if it exists
Fixes generating docs using python3.
Diffstat (limited to 'doc')
-rw-r--r--doc/conf.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/doc/conf.py b/doc/conf.py
index 40ed2391..9aa41578 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -18,6 +18,9 @@ import sys
# 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.
+lib_dir = os.path.abspath(os.path.join('..', 'build', 'lib'))
+if os.path.exists(lib_dir):
+ sys.path.insert(0, lib_dir)
sys.path.insert(1, os.path.abspath('.'))
sys.path.insert(2, os.path.abspath('..'))