def create_binaries(self, py_files, extensions, dlls):
        dist = self.distribution

        # byte compile the python modules into the target directory
        print "*** byte compile python files ***"
        self.compiled_files = byte_compile(py_files,
                                           target_dir=self.collect_dir,
                                           optimize=self.optimize,
                                           force=0,
                                           verbose=self.verbose,
                                           dry_run=self.dry_run)

        self.lib_files = []
        self.console_exe_files = []
        self.windows_exe_files = []
        self.service_exe_files = []
        self.comserver_files = []

        self.copy_extensions(extensions)
        self.copy_dlls(dlls)

        # create the shared zipfile containing all Python modules
        if dist.zipfile is None:
            fd, archive_name = tempfile.mkstemp()
            os.close(fd)
        else:
            archive_name = os.path.join(self.lib_dir,
                                        os.path.basename(dist.zipfile))

        arcname = self.make_lib_archive(archive_name,
                                        base_dir=self.collect_dir,
                                        files=self.compiled_files,
                                        verbose=self.verbose,
                                        dry_run=self.dry_run)
        if dist.zipfile is not None:
            self.lib_files.append(arcname)

        for target in self.distribution.isapi:
            print "*** copy isapi support DLL ***"
            # Locate the support DLL, and copy as "_script.dll", just like
            # isapi itself
            import isapi
            src_name = is_debug_build and "PyISAPI_loader_d.dll" or \
                                          "PyISAPI_loader.dll"
            src = os.path.join(isapi.__path__[0], src_name)
            # destination name is "_{module_name}.dll" just like pyisapi does.
            script_base = os.path.splitext(os.path.basename(target.script))[0]
            dst = os.path.join(self.exe_dir, "_" + script_base + ".dll")
            self.copy_file(src, dst, preserve_mode=0)

        if self.distribution.has_data_files():
            print "*** copy data files ***"
            install_data = self.reinitialize_command('install_data')
            install_data.install_dir = self.dist_dir
            install_data.ensure_finalized()
            install_data.run()

            self.lib_files.extend(install_data.get_outputs())

        # build the executables
        for target in dist.console:
            dst = self.build_executable(target, self.get_console_template(),
                                        arcname, target.script)
            self.console_exe_files.append(dst)
        for target in dist.windows:
            dst = self.build_executable(target, self.get_windows_template(),
                                        arcname, target.script)
            self.windows_exe_files.append(dst)
        for target in dist.service:
            dst = self.build_service(target, self.get_service_template(),
                                     arcname)
            self.service_exe_files.append(dst)

        for target in dist.isapi:
            dst = self.build_isapi(target, self.get_isapi_template(), arcname)

        for target in dist.com_server:
            if getattr(target, "create_exe", True):
                dst = self.build_comserver(target, self.get_comexe_template(),
                                           arcname)
                self.comserver_files.append(dst)
            if getattr(target, "create_dll", True):
                dst = self.build_comserver(target, self.get_comdll_template(),
                                           arcname)
                self.comserver_files.append(dst)

        for target in dist.ctypes_com_server:
                dst = self.build_comserver(target, self.get_ctypes_comdll_template(),
                                           arcname, boot_script="ctypes_com_server")
                self.comserver_files.append(dst)

        if dist.zipfile is None:
            os.unlink(arcname)
        else:
            if self.bundle_files < 3 or self.compressed:
                arcbytes = open(arcname, "rb").read()
                arcfile = open(arcname, "wb")

                if self.bundle_files < 2: # bundle pythonxy.dll also
                    print "Adding %s to %s" % (python_dll, arcname)
                    arcfile.write("<pythondll>")
                    bytes = open(os.path.join(self.bundle_dir, python_dll), "rb").read()
                    arcfile.write(struct.pack("i", len(bytes)))
                    arcfile.write(bytes) # python dll

                if self.compressed:
                    # prepend zlib.pyd also
                    zlib_file = imp.find_module("zlib")[0]
                    if zlib_file:
                        print "Adding zlib%s.pyd to %s" % (is_debug_build and "_d" or "", arcname)
                        arcfile.write("<zlib.pyd>")
                        bytes = zlib_file.read()
                        arcfile.write(struct.pack("i", len(bytes)))
                        arcfile.write(bytes) # zlib.pyd

                arcfile.write(arcbytes)

####        if self.bundle_files < 2:
####            # remove python dll from the exe_dir, since it is now bundled.
####            os.remove(os.path.join(self.exe_dir, python_dll))


    # for user convenience, let subclasses override the templates to use
dataset/ETHPy150Open fogleman/FeedNotifier/patch/build_exe.py/py2exe.create_binaries/original