
    Uh5                        d dl mZmZmZmZmZ d dlmZ d dlm	Z	 d dl
mZmZ d dlmZmZ d dlmZ d dlmZ eed   ee   f   Zeeef   Zd	e	d
ee	   defdZ G d d      Z G d d      ZdedddefdZ G d d      Zy)    )	FrozenSetIterableOptionalTupleUnion)SpecifierSet)NormalizedName)LegacyVersionVersion)Linklinks_equivalent)InstallRequirement)Hashes	Candidateprojectextrasreturnc                 N    |s| S dj                  t        |            }|  d| dS )N,[])joinsorted)r   r   extras_exprs      b/var/www/html/IOPaint/env/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/base.pyformat_namer      s/    ((6&>*KYa}A&&    c                       e Zd Zdededee   ddfdZedd       Z	ede
dd fd	       Zdefd
Zde
dd fdZdddefdZy)
Constraint	specifierhasheslinksr   Nc                 .    || _         || _        || _        y N)r    r!   r"   )selfr    r!   r"   s       r   __init__zConstraint.__init__   s     #
r   c                 L    t        t               t               t                     S r$   )r   r   r   	frozenset)clss    r   emptyzConstraint.empty   s    ,.&(IK@@r   ireqc                     |j                   rt        |j                   g      n	t               }t        |j                  |j	                  d      |      S NF)trust_internet)linkr(   r   r    r!   )r)   r+   r"   s      r   	from_ireqzConstraint.from_ireq"   s:    *.))	499+&$..$++U+*KUSSr   c                     t        | j                        xs, t        | j                        xs t        | j                        S r$   )boolr    r!   r"   r%   s    r   __bool__zConstraint.__bool__'   s-    DNN#LtDKK'8LD<LLr   otherc                     t        |t              st        S | j                  |j                  z  }| j                  |j	                  d      z  }| j
                  }|j                  r|j                  |j                  g      }t        |||      S r-   )	
isinstancer   NotImplementedr    r!   r"   r/   unionr   )r%   r5   r    r!   r"   s        r   __and__zConstraint.__and__*   sq    %!34!!NNU__4	u||5|AA

::KK-E)VU33r   	candidater   c                     | j                   rt        fd| j                   D              sy| j                  j                  j                  d      S )Nc              3   6   K   | ]  }t        |        y wr$   )_match_link).0r/   r;   s     r   	<genexpr>z-Constraint.is_satisfied_by.<locals>.<genexpr>6   s     !V4+dI">!Vs   FT)prereleases)r"   allr    containsversionr%   r;   s    `r   is_satisfied_byzConstraint.is_satisfied_by4   s@    ::c!V4::!VV ~~&&y'8'8d&KKr   )r   r   )__name__
__module____qualname__r   r   r   r   r&   classmethodr*   r   r0   r2   r4   r:   rF    r   r   r   r      s    %/5>Go	 A A T/ TL T TM$ M4/ 4L 4L L Lr   r   c                   `    e Zd Zedefd       Zedefd       ZdddefdZ	de
fdZdefdZy	)
Requirementr   c                     t        d      )zThe "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 overrideNotImplementedErrorr3   s    r   project_namezRequirement.project_name?   s     ""<==r   c                     t        d      )zThe 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.
        rO   rP   r3   s    r   namezRequirement.nameI   s     ""<==r   r;   r   c                      yNFrK   rE   s     r   rF   zRequirement.is_satisfied_byR   s    r   c                     t        d      NrO   rP   r3   s    r   get_candidate_lookupz Requirement.get_candidate_lookupU       !"<==r   c                     t        d      rX   rP   r3   s    r   format_for_errorzRequirement.format_for_errorX   rZ   r   N)rG   rH   rI   propertyr	   rR   strrT   r2   rF   CandidateLookuprY   r\   rK   r   r   rM   rM   >   sa    >n > > >c > >  >o >># >r   rM   r/   r;   c                 H    |j                   rt        | |j                         S yrV   )source_linkr   )r/   r;   s     r   r>   r>   \   s!    i&;&;<<r   c                       e Zd Zedefd       Zedefd       Zedefd       Z	ede
fd       Zede
fd       Zedee   fd       Zde
deee      fd	Zdee   fd
ZdefdZy)r   r   c                     t        d      )zThe "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 subclassrP   r3   s    r   rR   zCandidate.project_namec   s     ""899r   c                     t        d      )zThe 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.
        rd   rP   r3   s    r   rT   zCandidate.namem   s     ""899r   c                     t        d      Nrd   rP   r3   s    r   rD   zCandidate.versionv       !"899r   c                     t        d      rg   rP   r3   s    r   is_installedzCandidate.is_installedz   rh   r   c                     t        d      rg   rP   r3   s    r   is_editablezCandidate.is_editable~   rh   r   c                     t        d      rg   rP   r3   s    r   ra   zCandidate.source_link   rh   r   with_requiresc                     t        d      rg   rP   )r%   rn   s     r   iter_dependencieszCandidate.iter_dependencies       !"899r   c                     t        d      rg   rP   r3   s    r   get_install_requirementz!Candidate.get_install_requirement   rq   r   c                     t        d      rX   rP   r3   s    r   r\   zCandidate.format_for_error   rZ   r   N)rG   rH   rI   r]   r	   rR   r^   rT   CandidateVersionrD   r2   rj   rl   r   r   ra   r   rM   rp   r   rs   r\   rK   r   r   r   r   b   s    :n : : :c : : :) : : :d : : :T : : :Xd^ : ::t :+AV8W ::2D)E :># >r   N)typingr   r   r   r   r    pip._vendor.packaging.specifiersr   pip._vendor.packaging.utilsr	   pip._vendor.packaging.versionr
   r   pip._internal.models.linkr   r   pip._internal.req.req_installr   pip._internal.utils.hashesr   r_   ru   r^   r   r   rM   r2   r>   r   rK   r   r   <module>r}      s    > > 9 6 @ < < --x8J/KKL/0 ' '>1J 's '%L %LP> ><d { t +> +>r   