Sfoglia il codice sorgente

Find installdir from Python.exe instead of launcher script

Thomas Kluyver 4 anni fa
parent
commit
e7ab3112a0
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  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