'Prepare process. Create temp directories, download and/or unpack files.'

def prepare_files(self, finder):

    if self.wheel_download_dir:
        ensure_dir(self.wheel_download_dir)
    root_reqs = (self.unnamed_requirements + self.requirements.values())
    require_hashes = (self.require_hashes or any((req.has_hash_options for req in root_reqs)))
    if (require_hashes and self.as_egg):
        raise InstallationError('--egg    is    not    allowed    with    --require-hashes    mode,    since    it    delegates    dependency    resolution    to    setuptools    and    could    thus    result    in    installation    of    unhashed    packages.')
    discovered_reqs = []
    hash_errors = HashErrors()
    for req in chain(root_reqs, discovered_reqs):
        try:
            discovered_reqs.extend(self._prepare_file(finder, req, require_hashes=require_hashes, ignore_dependencies=self.ignore_dependencies))
        except HashError as exc:
            exc.req = req
            hash_errors.append(exc)
    if hash_errors:
        raise hash_errors
