def copy_extensions(self, extensions):
        print "*** copy extensions ***"
        # copy the extensions to the target directory
        for item in extensions:
            src = item.__file__
            if self.bundle_files > 2: # don't bundle pyds and dlls
                dst = os.path.join(self.lib_dir, (item.__pydfile__))
                self.copy_file(src, dst, preserve_mode=0)
                self.lib_files.append(dst)
            else:
                # we have to preserve the packages
                package = "\\".join(item.__name__.split(".")[:-1])
                if package:
                    dst = os.path.join(package, os.path.basename(src))
                else:
                    dst = os.path.basename(src)
                self.copy_file(src, os.path.join(self.collect_dir, dst), preserve_mode=0)
                self.compiled_files.append(dst)
dataset/ETHPy150Open fogleman/FeedNotifier/patch/build_exe.py/py2exe.copy_extensions/original