1
0
Эх сурвалжийг харах

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 жил өмнө
parent
commit
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', '')