'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.'

def build(self, autobuilding=False):

    assert (self._wheel_dir or (autobuilding and self._cache_root))
    self.requirement_set.prepare_files(self.finder)
    reqset = self.requirement_set.requirements.values()
    buildset = []
    for req in reqset:
        if req.constraint:
            continue
        if req.is_wheel:
            if (not autobuilding):
                logger.info('Skipping    %s,    due    to    already    being    wheel.', req.name)
        elif req.editable:
            if (not autobuilding):
                logger.info('Skipping    bdist_wheel    for    %s,    due    to    being    editable', req.name)
        elif (autobuilding and req.link and (not req.link.is_artifact)):
            pass
        elif (autobuilding and (not req.source_dir)):
            pass
        else:
            if autobuilding:
                link = req.link
                (base, ext) = link.splitext()
                if (pip.index.egg_info_matches(base, None, link) is None):
                    continue
                if ('binary' not in pip.index.fmt_ctl_formats(self.finder.format_control, canonicalize_name(req.name))):
                    logger.info('Skipping    bdist_wheel    for    %s,    due    to    binaries    being    disabled    for    it.', req.name)
                    continue
            buildset.append(req)
    if (not buildset):
        return True
    logger.info('Building    wheels    for    collected    packages:    %s', ',    '.join([req.name for req in buildset]))
    with indent_log():
        (build_success, build_failure) = ([], [])
        for req in buildset:
            python_tag = None
            if autobuilding:
                python_tag = pep425tags.implementation_tag
                output_dir = _cache_for_link(self._cache_root, req.link)
                try:
                    ensure_dir(output_dir)
                except OSError as e:
                    logger.warn('Building    wheel    for    %s    failed:    %s', req.name, e)
                    build_failure.append(req)
                    continue
            else:
                output_dir = self._wheel_dir
            wheel_file = self._build_one(req, output_dir, python_tag=python_tag)
            if wheel_file:
                build_success.append(req)
                if autobuilding:
                    if (req.source_dir and (not os.path.exists(os.path.join(req.source_dir, PIP_DELETE_MARKER_FILENAME)))):
                        raise AssertionError('bad    source    dir    -    missing    marker')
                    req.remove_temporary_source()
                    req.source_dir = req.build_location(self.requirement_set.build_dir)
                    req.link = pip.index.Link(path_to_url(wheel_file))
                    assert req.link.is_wheel
                    unpack_url(req.link, req.source_dir, None, False, session=self.requirement_set.session)
            else:
                build_failure.append(req)
    if build_success:
        logger.info('Successfully    built    %s', '    '.join([req.name for req in build_success]))
    if build_failure:
        logger.info('Failed    to    build    %s', '    '.join([req.name for req in build_failure]))
    return (len(build_failure) == 0)
