def make_abstract_dist(req):
    # type: (InstallRequirement) -> DistAbstraction
    """Factory to make an abstract dist object.

    Preconditions: Either an editable req with a source_dir, or satisfied_by or
    a wheel link, or a non-editable req with a source_dir.

    :return: A concrete DistAbstraction.
    """
    if req.editable:
        return IsSDist(req)
    elif req.link and req.link.is_wheel:
        return IsWheel(req)
    else:
        return IsSDist(req)
def make_abstract_dist ( req ) : if req . editable : return IsSDist ( req ) elif req . link and req . link . is_wheel : return IsWheel ( req ) else : return IsSDist ( req )
Factory to make an abstract dist object.

    Preconditions: Either an editable req with a source_dir, or satisfied_by or
    a wheel link, or a non-editable req with a source_dir.

    :return: A concrete DistAbstraction.