def copy_dlls_bundle_files(self, dlls):
        # If dlls have to be bundled, they are copied into the
        # collect_dir and will be added to the list of files to
        # include in the zip archive 'self.compiled_files'.
        #
        # dlls listed in dlls_in_exedir have to be treated differently:
        #
        for dll in dlls:
            base = os.path.basename(dll)
            if base.lower() in self.dlls_in_exedir:
                # pythonXY.dll must be bundled as resource.
                # w9xpopen.exe must be copied to self.exe_dir.
                if base.lower() == python_dll.lower() and self.bundle_files < 2:
                    dst = os.path.join(self.bundle_dir, base)
                else:
                    dst = os.path.join(self.exe_dir, base)
                _, copied = self.copy_file(dll, dst, preserve_mode=0)
                if not self.dry_run and copied and base.lower() == python_dll.lower():
                    # If we actually copied pythonxy.dll, we have to
                    # patch it.  Well, since it's impossible to load
                    # resources from the bundled dlls it probably
                    # doesn't matter.
                    self.patch_python_dll_winver(dst)
                self.lib_files.append(dst)
                continue

            dst = os.path.join(self.collect_dir, os.path.basename(dll))
            self.copy_file(dll, dst, preserve_mode=0)
            # Make sure they will be included into the zipfile.
            self.compiled_files.append(os.path.basename(dst))
dataset/ETHPy150Open fogleman/FeedNotifier/patch/build_exe.py/py2exe.copy_dlls_bundle_files/original