Browse Source

Ensure pynsist can be imported when building docs

Thomas Kluyver 8 years ago
parent
commit
99046750fc
1 changed files with 3 additions and 4 deletions
  1. 3 4
      doc/conf.py

+ 3 - 4
doc/conf.py

@@ -14,11 +14,10 @@
 
 
 import sys
 import sys
 import os
 import os
+from os.path import dirname, abspath
 
 
-# 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('..'))
+project_dir = dirname(dirname(abspath(__file__)))
+sys.path.insert(0, project_dir)
 
 
 import pynsist
 import pynsist