Current File : //lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/__pycache__/base.cpython-39.pyc
a

[��fd�@s�ddlmZmZmZmZmZddlmZddlm	Z	m
Z
ddlmZm
Z
ddlmZmZddlmZddlmZeedeefZeee
fZeeeed	�d
d�ZGdd
�d
�ZGdd�d�Zeded�dd�ZGdd�d�ZdS)�)�	FrozenSet�Iterable�Optional�Tuple�Union)�SpecifierSet)�NormalizedName�canonicalize_name)�
LegacyVersion�Version)�Link�links_equivalent)�InstallRequirement)�Hashes�	Candidate)�project�extras�returncCs,|s|Stdd�|D��}d�|d�|��S)Ncss|]}t|�VqdS�N)r	)�.0�e�r�L/usr/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/base.py�	<genexpr>�zformat_name.<locals>.<genexpr>z{}[{}]�,)�sorted�format�join)rrZcanonical_extrasrrr�format_namesrc@sxeZdZeeeedd�dd�Zedd�dd��Z	ee
dd�d	d
��Zed�dd�Z
e
dd
�dd�Zded�dd�ZdS)�
ConstraintN)�	specifier�hashes�linksrcCs||_||_||_dSr)r!r"r#)�selfr!r"r#rrr�__init__szConstraint.__init__�rcCstt�t�t��Sr)r rr�	frozenset)�clsrrr�emptyszConstraint.empty)�ireqrcCs.|jrt|jg�nt�}t|j|jdd�|�S�NF)Ztrust_internet)�linkr'r r!r")r(r*r#rrr�	from_ireq"szConstraint.from_ireqcCst|j�pt|j�pt|j�Sr)�boolr!r"r#�r$rrr�__bool__'szConstraint.__bool__)�otherrcCsRt|t�stS|j|j@}|j|jdd�@}|j}|jrF|�|jg�}t|||�Sr+)	�
isinstancer�NotImplementedr!r"r#r,�unionr )r$r1r!r"r#rrr�__and__*s
zConstraint.__and__r��	candidatercs4|jr"t�fdd�|jD��s"dS|jj�jdd�S)Nc3s|]}t|��VqdSr)�_match_link)rr,�r7rrr6rz-Constraint.is_satisfied_by.<locals>.<genexpr>FT)Zprereleases)r#�allr!�contains�version�r$r7rr9r�is_satisfied_by4szConstraint.is_satisfied_by)�__name__�
__module__�__qualname__rrrrr%�classmethodr)rr-r.r0r5r>rrrrr s
�
r c@s\eZdZeed�dd��Zeed�dd��Zded�dd	�Z	e
d�d
d�Zed�dd
�ZdS)�Requirementr&cCstd��dS)z�The "project name" of a requirement.

        This is different from ``name`` if this requirement contains extras,
        in which case ``name`` would contain the ``[...]`` part, while this
        refers to the name of the project.
        �Subclass should overrideN��NotImplementedErrorr/rrr�project_name?szRequirement.project_namecCstd��dS)z�The name identifying this requirement in the resolver.

        This is different from ``project_name`` if this requirement contains
        extras, where ``project_name`` would not contain the ``[...]`` part.
        rDNrEr/rrr�nameIszRequirement.namerr6cCsdS�NFrr=rrrr>RszRequirement.is_satisfied_bycCstd��dS�NrDrEr/rrr�get_candidate_lookupUsz Requirement.get_candidate_lookupcCstd��dSrJrEr/rrr�format_for_errorXszRequirement.format_for_errorN)
r?r@rA�propertyrrG�strrHr.r>�CandidateLookuprKrLrrrrrC>s	rC)r,r7rcCs|jrt||j�SdSrI)�source_linkr
)r,r7rrrr8\sr8c@s�eZdZeed�dd��Zeed�dd��Zeed�dd��Z	ee
d�dd	��Zee
d�d
d��Zee
ed�dd
��Ze
ee
ed�dd�Ze
ed�dd�Zed�dd�ZdS)rr&cCstd��dS)z�The "project name" of the candidate.

        This is different from ``name`` if this candidate contains extras,
        in which case ``name`` would contain the ``[...]`` part, while this
        refers to the name of the project.
        �Override in subclassNrEr/rrrrGcszCandidate.project_namecCstd��dS)z�The name identifying this candidate in the resolver.

        This is different from ``project_name`` if this candidate contains
        extras, where ``project_name`` would not contain the ``[...]`` part.
        rQNrEr/rrrrHmszCandidate.namecCstd��dS�NrQrEr/rrrr<vszCandidate.versioncCstd��dSrRrEr/rrr�is_installedzszCandidate.is_installedcCstd��dSrRrEr/rrr�is_editable~szCandidate.is_editablecCstd��dSrRrEr/rrrrP�szCandidate.source_link)�
with_requiresrcCstd��dSrRrE)r$rUrrr�iter_dependencies�szCandidate.iter_dependenciescCstd��dSrRrEr/rrr�get_install_requirement�sz!Candidate.get_install_requirementcCstd��dSrJrEr/rrrrL�szCandidate.format_for_errorN)r?r@rArMrrGrNrH�CandidateVersionr<r.rSrTrrrPrrCrVrrWrLrrrrrbs	N)�typingrrrrrZ pip._vendor.packaging.specifiersrZpip._vendor.packaging.utilsrr	Zpip._vendor.packaging.versionr
rZpip._internal.models.linkrr
Zpip._internal.req.req_installrZpip._internal.utils.hashesrrOrXrNrr rCr.r8rrrrr�<module>s(