Skip to content

Commit 8092b6d

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

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

res/pyinstaller/create_application.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import os
55
import platform
66
import site
7-
from pathlib import Path
7+
from pathlib import Path, PureWindowsPath
88

99
import PySide6 as RefMod
1010

@@ -29,10 +29,7 @@ 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
32+
safe_path = PureWindowsPath(plugin_dir).as_posix()
3633
with open(pth_file, 'w') as fh:
3734
fh.write(NS_IMPORT_INFRASTRUCTURE.format(plugin_path=safe_path))
3835

0 commit comments

Comments
 (0)