Skip to content

Commit

Permalink
Merge pull request #226 from takluyver/abspath-file
Browse files Browse the repository at this point in the history
Ensure an absolute path is added to sys.path
  • Loading branch information
takluyver committed Mar 24, 2021
2 parents 699a87b + 16d047a commit 7206be8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion doc/cfgfile.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Application section
import sys, os
import site

scriptdir, script = os.path.split(__file__)
scriptdir, script = os.path.split(os.path.abspath(__file__))
pkgdir = os.path.join(scriptdir, 'pkgs')
# Ensure .pth files in pkgdir are handled properly
site.addsitedir(pkgdir)
Expand Down
2 changes: 1 addition & 1 deletion nsist/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def prepare_msvcrt(self):
SCRIPT_TEMPLATE = """#!python{qualifier}
import sys, os
import site
scriptdir, script = os.path.split(__file__)
scriptdir, script = os.path.split(os.path.abspath(__file__))
installdir = scriptdir # for compatibility with commands
pkgdir = os.path.join(scriptdir, 'pkgs')
sys.path.insert(0, pkgdir)
Expand Down

0 comments on commit 7206be8

Please sign in to comment.