瀏覽代碼

nsist: provide an "installdir" variable for consistency

The "commands" template calls the install directory
"installdir", but entry points call it "scriptdir".

Add an "installdir" variable to entry points for compatibility.  This
increases the chances of being able to reuse an "extra_preamble" script
across commands and entry points.
David Aguilar 7 年之前
父節點
當前提交
29abba387c
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      nsist/__init__.py

+ 1 - 0
nsist/__init__.py

@@ -231,6 +231,7 @@ class InstallerBuilder(object):
     SCRIPT_TEMPLATE = """#!python{qualifier}
 import sys, os
 scriptdir, script = os.path.split(__file__)
+installdir = scriptdir  # for compatibility with commands
 pkgdir = os.path.join(scriptdir, 'pkgs')
 sys.path.insert(0, pkgdir)
 os.environ['PYTHONPATH'] = pkgdir + os.pathsep + os.environ.get('PYTHONPATH', '')