Skip to content

Commit 31af145

Browse files
committed
fix(launcher): add local used by some pth files
some generated pth files from python 3.5 and newer access the local variable 'sitedir' of the caller... this fix adds a variable with that name and the required contents. fixes #7
1 parent 79faca9 commit 31af145

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

launcher_tool/launcher.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ def process_pth_file(root, filename):
3636
3737
Usually called by patch_sys_path().
3838
"""
39+
# the following is a fix for namespace packages where python accesses the
40+
# local 'sitedir' of the caller... see also issue #7
41+
sitedir = root
3942
with open(filename, 'rU') as pth_file:
4043
for line in pth_file:
4144
line = line.rstrip()

0 commit comments

Comments
 (0)