Browse Source

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 năm trước cách đây
mục cha
commit
29abba387c
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  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', '')