Skip to content

Commit

Permalink
Merge pull request #175 from DGalt/master
Browse files Browse the repository at this point in the history
updated __init__ SCRIPT_TEMPLATE to add pkg dir as python site dir
  • Loading branch information
takluyver authored Feb 1, 2019
2 parents 60d487b + b1fdc78 commit ca4c2ce
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions nsist/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,13 @@ def prepare_msvcrt(self):

SCRIPT_TEMPLATE = """#!python{qualifier}
import sys, os
import site
scriptdir, script = os.path.split(__file__)
installdir = scriptdir # for compatibility with commands
pkgdir = os.path.join(scriptdir, 'pkgs')
sys.path.insert(0, pkgdir)
# Ensure .pth files in pkgdir are handled properly
site.addsitedir(pkgdir)
os.environ['PYTHONPATH'] = pkgdir + os.pathsep + os.environ.get('PYTHONPATH', '')
# APPDATA should always be set, but in case it isn't, try user home
Expand Down

0 comments on commit ca4c2ce

Please sign in to comment.