def is_pinned_requirement(ireq):
    """
    Returns whether an InstallRequirement is a "pinned" requirement.

    An InstallRequirement is considered pinned if:

    - Is not editable
    - It has exactly one specifier
    - That specifier is "=="
    - The version does not contain a wildcard

    Examples:
        django==1.8   # pinned
        django>1.8    # NOT pinned
        django~=1.8   # NOT pinned
        django==1.*   # NOT pinned
    """
    if ireq.editable:
        return False
    if ireq.req is None or len(ireq.specifier._specs) != 1:
        return False
    op, version = next(iter(ireq.specifier._specs))._spec
    return (op == '==' or op == '===') and not version.endswith('.*')
