def build(<EOL>self,<EOL>requirements,  <EOL>session,  <EOL>autobuilding=False  <EOL>):<EOL>
buildset = []<EOL>format_control = self.finder.format_control<EOL>cache_available = bool(self._wheel_dir or self.wheel_cache.cache_dir)<EOL>for req in requirements:<EOL><INDENT>ephem_cache = should_use_ephemeral_cache(<EOL>req, format_control=format_control, autobuilding=autobuilding,<EOL>cache_available=cache_available,<EOL>)<EOL>if ephem_cache is None:<EOL><INDENT>continue<EOL><DEDENT>buildset.append((req, ephem_cache))<EOL><DEDENT>if not buildset:<EOL><INDENT>return []<EOL><DEDENT>if any(not ephem_cache for _, ephem_cache in buildset):<EOL><INDENT>have_directory_for_build = self._wheel_dir or (<EOL>autobuilding and self.wheel_cache.cache_dir<EOL>)<EOL>assert have_directory_for_build<EOL><DEDENT>logger.info(<EOL>'<STR_LIT>',<EOL>'<STR_LIT:U+002CU+0020>'.join([req.name for (req, _) in buildset]),<EOL>)<EOL>_cache = self.wheel_cache  <EOL>with indent_log():<EOL><INDENT>build_success, build_failure = [], []<EOL>for req, ephem in buildset:<EOL><INDENT>python_tag = None<EOL>if autobuilding:<EOL><INDENT>python_tag = pep425tags.implementation_tag<EOL>if ephem:<EOL><INDENT>output_dir = _cache.get_ephem_path_for_link(req.link)<EOL><DEDENT>else:<EOL><INDENT>output_dir = _cache.get_path_for_link(req.link)<EOL><DEDENT>try:<EOL><INDENT>ensure_dir(output_dir)<EOL><DEDENT>except OSError as e:<EOL><INDENT>logger.warning("<STR_LIT>",<EOL>req.name, e)<EOL>build_failure.append(req)<EOL>continue<EOL><DEDENT><DEDENT>else:<EOL><INDENT>output_dir = self._wheel_dir<EOL><DEDENT>wheel_file = self._build_one(<EOL>req, output_dir,<EOL>python_tag=python_tag,<EOL>)<EOL>if wheel_file:<EOL><INDENT>build_success.append(req)<EOL>if autobuilding:<EOL><INDENT>if req.source_dir and not os.path.exists(os.path.join(<EOL>req.source_dir, PIP_DELETE_MARKER_FILENAME)):<EOL><INDENT>raise AssertionError(<EOL>"<STR_LIT>")<EOL><DEDENT>req.remove_temporary_source()<EOL>req.source_dir = req.build_location(<EOL>self.preparer.build_dir<EOL>)<EOL>req.link = Link(path_to_url(wheel_file))<EOL>assert req.link.is_wheel<EOL>unpack_url(<EOL>req.link, req.source_dir, None, False,<EOL>session=session,<EOL>)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>build_failure.append(req)<EOL><DEDENT><DEDENT><DEDENT>if build_success:<EOL><INDENT>logger.info(<EOL>'<STR_LIT>',<EOL>'<STR_LIT:U+0020>'.join([req.name for req in build_success]),<EOL>)<EOL><DEDENT>if build_failure:<EOL><INDENT>logger.info(<EOL>'<STR_LIT>',<EOL>'<STR_LIT:U+0020>'.join([req.name for req in build_failure]),<EOL>)<EOL><DEDENT>return build_failure<EOL>
Build wheels.

        :param unpack: If True, replace the sdist we built from with the
            newly built wheel, in preparation for installation.
        :return: True if all the wheels built correctly.