From 7f6e17ba33bc5afe6f2f6f2f32b0a622c9a2af70 Mon Sep 17 00:00:00 2001 From: Tim Harder Date: Wed, 16 Dec 2015 02:08:46 -0500 Subject: doc: insert generated module dir into sys.path if it exists Fixes generating docs using python3. --- doc/conf.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/conf.py b/doc/conf.py index 40ed23910..9aa41578a 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('..')) -- cgit v1.2.3-65-gdbad