def copy_dlls(self, dlls):
        # copy needed dlls where they belong.
        print "*** copy dlls ***"
        if self.bundle_files < 3:
            self.copy_dlls_bundle_files(dlls)
            return
        # dlls belong into the lib_dir, except those listed in dlls_in_exedir,
        # which have to go into exe_dir (pythonxy.dll, w9xpopen.exe).
        for dll in dlls:
            base = os.path.basename(dll)
            if base.lower() in self.dlls_in_exedir:
                # These special dlls cannot be in the lib directory,
                # they must go into the exe directory.
                dst = os.path.join(self.exe_dir, base)
            else:
                dst = os.path.join(self.lib_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.
                #
                # Previously, the code did it every time, but this
                # breaks if, for example, someone runs UPX over the
                # dist directory.  Patching an UPX'd dll seems to work
                # (no error is detected when patching), but the
                # resulting dll does not work anymore.
                #
                # The function restores the file times so
                # dependencies still work correctly.
                self.patch_python_dll_winver(dst)

            self.lib_files.append(dst)
dataset/ETHPy150Open fogleman/FeedNotifier/patch/build_exe.py/py2exe.copy_dlls/original