Skip to content

Commit 8813d51

Browse files
author
stonebig
committed
bug fix in case of build issue
1 parent 7ced0ba commit 8813d51

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

winpython/wppm.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -414,11 +414,12 @@ def patch_standard_packages(self, package_name=''):
414414
if package_name.lower() == "pywin32" or package_name == '':
415415
origin = self.target + (r"\Lib\site-packages\pywin32_system32")
416416
destin = self.target
417-
for name in os.listdir(origin):
418-
here, there = osp.join(origin, name), osp.join(destin, name)
419-
if (not os.path.exists(there) or
420-
not filecmp.cmp(here, there)):
421-
shutil.copyfile(here, there)
417+
if osp.isdir(origin):
418+
for name in os.listdir(origin):
419+
here, there = osp.join(origin, name), osp.join(destin, name)
420+
if (not os.path.exists(there) or
421+
not filecmp.cmp(here, there)):
422+
shutil.copyfile(here, there)
422423
# 'pip' to do movable launchers (around line 100) !!!!
423424
# rational: https://github.com/pypa/pip/issues/2328
424425
if package_name.lower() == "pip" or package_name == '':

0 commit comments

Comments
 (0)