def matchDLLArch(filename):
 if (not is_win):
  return True
 from ..lib import pefile
 global _exe_machine_type
 if (_exe_machine_type is None):
  exe_pe = pefile.PE(sys.executable, fast_load=True)
  _exe_machine_type = exe_pe.FILE_HEADER.Machine
  exe_pe.close()
 pe = pefile.PE(filename, fast_load=True)
 match_arch = (pe.FILE_HEADER.Machine == _exe_machine_type)
 pe.close()
 return match_arch

def matchDLLArch ( filename ) : if ( not is_win ) : return True from . . lib import pefile global _exe_machine_type if ( _exe_machine_type is None ) : exe_pe = pefile . PE ( sys . executable , fast_load = True ) _exe_machine_type = exe_pe . FILE_HEADER . Machine exe_pe . close ( ) pe = pefile . PE ( filename , fast_load = True ) match_arch = ( pe . FILE_HEADER . Machine == _exe_machine_type ) pe . close ( ) return match_arch
return true if the dll given by filename matches the cpu type/architecture of the python process running pyinstaller .