(to_install, package_set)
return installed
Computes the version of packages after installing to_install.
Computes the version of packages after installing to_install.
Computes the version of packages after installing to_install .
def _simulate_installation_of(to_install, package_set):
    # type: (List[InstallRequirement], PackageSet) -> Set[str]
    """Computes the version of packages after installing to_install.
    """

    # Keep track of packages that were installed
    installed = set()

    # Modify it as installing requirement_set would (assuming no errors)
    for inst_req in to_install:
        abstract_dist = make_distribution_for_install_requirement(inst_req)
        dist = abstract_dist.get_pkg_resources_distribution()

        name = canonicalize_name(dist.key)
        package_set[name] = PackageDetails(dist.version, dist.requires())

        installed.add(name)

    return installed
def _simulate_installation_of ( to_install , package_set ) : # type: (List[InstallRequirement], PackageSet) -> Set[str] # Keep track of packages that were installed installed = set ( ) # Modify it as installing requirement_set would (assuming no errors) for inst_req in to_install : abstract_dist = make_distribution_for_install_requirement ( inst_req ) dist = abstract_dist . get_pkg_resources_distribution ( ) name = canonicalize_name ( dist . key ) package_set [ name ] = PackageDetails ( dist . version , dist . requires ( ) ) installed . add ( name ) return installed