浏览代码

Add Python directory to 'PATH' environment variable

Cody Scott 8 年之前
父节点
当前提交
aea8231005
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      nsist/commands.py

+ 3 - 0
nsist/commands.py

@@ -11,6 +11,9 @@ pkgdir = os.path.join(installdir, 'pkgs')
 sys.path.insert(0, pkgdir)
 os.environ['PYTHONPATH'] = pkgdir + os.pathsep + os.environ.get('PYTHONPATH', '')
 
+# Allowing .dll files in Python directory to be found
+os.environ['PATH'] += ';' + os.path.dirname(sys.executable)
+
 {extra_preamble}
 
 if __name__ == '__main__':