Skip to content

Commit 9a602b3

Browse files
committed
Debug print content of namespace pth file.
1 parent 14ea8ca commit 9a602b3

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

res/pyinstaller/create_application.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,17 @@ def _create_plugin_ns_pth_file(plugin_dir, site_packages_dir):
2929
matching_files = glob.glob(existing_pth_file)
3030
if not matching_files:
3131
pth_file = os.path.join(site_packages_dir, f'{dir_name}-nspkg.pth')
32+
if os.name == 'nt':
33+
safe_path = r'{}'.format(plugin_dir)
34+
else:
35+
safe_path = plugin_dir
3236
with open(pth_file, 'w') as fh:
33-
fh.write(NS_IMPORT_INFRASTRUCTURE.format(plugin_path=plugin_dir))
37+
fh.write(NS_IMPORT_INFRASTRUCTURE.format(plugin_path=safe_path))
3438

3539
print(f'========= {dir_name} ========')
40+
print(os.name)
41+
print(plugin_dir)
42+
print(safe_path)
3643
with open(pth_file, 'r') as fh:
3744
print(fh.read())
3845

0 commit comments

Comments
 (0)