浏览代码

Find installdir from Python.exe instead of launcher script

Thomas Kluyver 4 年之前
父节点
当前提交
e7ab3112a0
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      nsist/commands.py

+ 1 - 1
nsist/commands.py

@@ -8,7 +8,7 @@ from zipfile import ZipFile
 SCRIPT_TEMPLATE = u"""# -*- coding: utf-8 -*-
 import sys, os
 import site
-installdir = os.path.dirname(os.path.dirname(__file__))
+installdir = os.path.dirname(os.path.dirname(sys.executable))
 pkgdir = os.path.join(installdir, 'pkgs')
 sys.path.insert(0, pkgdir)
 # Ensure .pth files in pkgdir are handled properly