浏览代码

Ensure pynsist can be imported when building docs

Thomas Kluyver 8 年之前
父节点
当前提交
99046750fc
共有 1 个文件被更改,包括 3 次插入4 次删除
  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