From 3177772cc61c7b1acd884bd665e345ce6bdf6fdd Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 5 Jul 2014 17:19:01 +0530 Subject: [PATCH] Exclude unneeded ddls from the pythonwin package int he windows 32bit binary build --- setup/installer/windows/freeze.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/setup/installer/windows/freeze.py b/setup/installer/windows/freeze.py index 0202158aba..18ed1241cd 100644 --- a/setup/installer/windows/freeze.py +++ b/setup/installer/windows/freeze.py @@ -210,10 +210,12 @@ class Win32Freeze(Command, WixMixIn): shutil.copy2(os.path.join(QT_DIR, 'bin', x), self.dll_dir) shutil.copy2(r'C:\windows\system32\python%s.dll'%self.py_ver, self.dll_dir) - for x in os.walk(r'C:\Python%s\Lib'%self.py_ver): - for f in x[-1]: + for dirpath, dirnames, filenames in os.walk(r'C:\Python%s\Lib'%self.py_ver): + if os.path.basename(dirpath) == 'pythonwin': + continue + for f in filenames: if f.lower().endswith('.dll'): - f = self.j(x[0], f) + f = self.j(dirpath, f) shutil.copy2(f, self.dll_dir) shutil.copy2( r'C:\Python%(v)s\Lib\site-packages\pywin32_system32\pywintypes%(v)s.dll'