Ver Fonte

Find installdir from Python.exe instead of launcher script

Thomas Kluyver há 4 anos atrás
pai
commit
e7ab3112a0
1 ficheiros alterados com 1 adições e 1 exclusões
  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 -*-
 SCRIPT_TEMPLATE = u"""# -*- coding: utf-8 -*-
 import sys, os
 import sys, os
 import site
 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')
 pkgdir = os.path.join(installdir, 'pkgs')
 sys.path.insert(0, pkgdir)
 sys.path.insert(0, pkgdir)
 # Ensure .pth files in pkgdir are handled properly
 # Ensure .pth files in pkgdir are handled properly