Parcourir la source

Ensure pynsist can be imported when building docs

Thomas Kluyver il y a 8 ans
Parent
commit
99046750fc
1 fichiers modifiés avec 3 ajouts et 4 suppressions
  1. 3 4
      doc/conf.py

+ 3 - 4
doc/conf.py

@@ -14,11 +14,10 @@
 
 import sys
 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