When py2exe encounters a DLL file that the application requires, it decides whether the DLL file is included in the distribution directory using various criteria. Typically, it does not include DLLs if it considers them to belong to the "system" and not to the "application."
, py2exe DLL, . ,
from distutils.core import setup
import py2exe,sys,os
origIsSystemDLL = py2exe.build_exe.isSystemDLL
def isSystemDLL(pathname):
if os.path.basename(pathname).lower() in ("msvcp71.dll", "dwmapi.dll"):
return 0
return origIsSystemDLL(pathname)
py2exe.build_exe.isSystemDLL = isSystemDLL
py2exe. , , .