From: <mha...@us...> - 2012-02-04 07:08:57
|
Revision: 691 http://py2exe.svn.sourceforge.net/py2exe/?rev=691&view=rev Author: mhammond Date: 2012-02-04 07:08:51 +0000 (Sat, 04 Feb 2012) Log Message: ----------- allow dll_excludes to contain patterns Modified Paths: -------------- trunk/py2exe/py2exe/build_exe.py Modified: trunk/py2exe/py2exe/build_exe.py =================================================================== --- trunk/py2exe/py2exe/build_exe.py 2012-01-22 04:06:46 UTC (rev 690) +++ trunk/py2exe/py2exe/build_exe.py 2012-02-04 07:08:51 UTC (rev 691) @@ -20,6 +20,7 @@ import tempfile import struct import re +import fnmatch is_win64 = struct.calcsize("P") == 8 @@ -305,12 +306,16 @@ mf.create_xref() print "*** finding dlls needed ***" - dlls = self.find_dlls(extensions) + alldlls = self.find_dlls(extensions) + dlls = set() + for dll in alldlls: + for filter in self.dll_excludes: + if fnmatch.fnmatch(os.path.basename(dll), filter): + break + else: + dlls.add(dll) + # should we filter self.other_depends in the same way? self.plat_finalize(mf.modules, py_files, extensions, dlls) - dlls = [item for item in dlls - if os.path.basename(item).lower() not in self.dll_excludes] - # should we filter self.other_depends in the same way? - print "*** create binaries ***" self.create_binaries(py_files, extensions, dlls) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |