Explorar o código

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 %!s(int64=7) %!d(string=hai) anos
pai
achega
29abba387c
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  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', '')