
    !2i                        d dl mZ d dlmZ d dlmZ d dlmZmZ d dl	m
Z
 d dlmZ ddlmZmZmZmZ  G d	 d
e          Z G d de          Z G d de          Z G d de          Z G d de          ZdS )    )annotations)Any)SpecifierSet)NormalizedNamecanonicalize_name)install_req_drop_extras)InstallRequirement   )	CandidateCandidateLookupRequirementformat_namec                  ~    e Zd ZddZddZddZdd
ZddZedd            Z	edd            Z
ddZddZddZdS )ExplicitRequirement	candidater   returnNonec                    || _         d S Nr   selfr   s     o/var/www/html/pixcura-vrs/venv/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/requirements.py__init__zExplicitRequirement.__init__   s    "    strc                *    t          | j                  S r   )r   r   r   s    r   __str__zExplicitRequirement.__str__   s    4>"""r   c                0    | j         j         d| j        dS N())	__class____name__r   r   s    r   __repr__zExplicitRequirement.__repr__   s     .)??DN????r   intc                *    t          | j                  S r   )hashr   r   s    r   __hash__zExplicitRequirement.__hash__   s    DN###r   otherr   boolc                P    t          |t                    sdS | j        |j        k    S NF)
isinstancer   r   r   r+   s     r   __eq__zExplicitRequirement.__eq__   s)    %!455 	5~00r   r   c                    | j         j        S r   )r   project_namer   s    r   r3   z ExplicitRequirement.project_name    s     ~**r   c                    | j         j        S r   )r   namer   s    r   r5   zExplicitRequirement.name%   s     ~""r   c                4    | j                                         S r   )r   format_for_errorr   s    r   r7   z$ExplicitRequirement.format_for_error*   s    ~..000r   r   c                    | j         d fS r   r   r   s    r   get_candidate_lookupz(ExplicitRequirement.get_candidate_lookup-   s    ~t##r   c                    || j         k    S r   r   r   s     r   is_satisfied_byz#ExplicitRequirement.is_satisfied_by0   s    DN**r   N)r   r   r   r   r   r   r   r'   r+   r   r   r,   r   r   r   r   r   r   r   r,   )r%   
__module____qualname__r   r   r&   r*   r1   propertyr3   r5   r7   r9   r;    r   r   r   r      s        # # # ## # # #@ @ @ @$ $ $ $1 1 1 1
 + + + X+ # # # X#1 1 1 1$ $ $ $+ + + + + +r   r   c                      e Zd ZddZedd            ZddZdd	ZddZddZ	edd            Z
edd            ZddZddZd dZdS )!SpecifierRequirementireqr	   r   r   c                    |j         
J d            || _        d | _        d | _        t	          d | j        j        D                       | _        d S )NThis is a link, not a specifierc              3  4   K   | ]}t          |          V  d S r   r   .0es     r   	<genexpr>z0SpecifierRequirement.__init__.<locals>.<genexpr>:   +       Q Q!!21!5!5 Q Q Q Q Q Qr   )link_ireq_equal_cache_hash	frozensetextras_extrasr   rH   s     r   r   zSpecifierRequirement.__init__5   sV    y  "C   
(,!%
  Q Qtz?P Q Q QQQr   r   c                ^    | j         | j         S t          | j                  | _         | j         S r   rT   r   rS   r   s    r   _equalzSpecifierRequirement._equal<   -    ($$
OO  r   c                4    t          | j        j                  S r   )r   rS   reqr   s    r   r   zSpecifierRequirement.__str__D   s    4:>"""r   c                T    | j         j         dt          | j        j                  dS r!   )r$   r%   r   rS   r_   r   s    r   r&   zSpecifierRequirement.__repr__G   s*    .)DDC
,?,?DDDDr   r+   objectr,   c                Z    t          |t                    st          S | j        |j        k    S r   )r/   rG   NotImplementedr\   r0   s     r   r1   zSpecifierRequirement.__eq__J   s*    %!566 	"!!{el**r   r'   c                ^    | j         | j         S t          | j                  | _         | j         S r   rU   r)   r\   r   s    r   r*   zSpecifierRequirement.__hash__O   +    :!:$+&&
zr   r   c                j    | j         j        s
J d            t          | j         j        j                  S )N'Specifier-backed ireq is always PEP 508)rS   r_   r   r5   r   s    r   r3   z!SpecifierRequirement.project_nameV   s0    z~HHHHHH !4555r   c                6    t          | j        | j                  S r   )r   r3   rX   r   s    r   r5   zSpecifierRequirement.name[   s    4,dl;;;r   c                   d t          |                               d          D             }t          |          dk    rdS t          |          dk    r|d         S d                    |d d                   dz   |d         z   S )	Nc                6    g | ]}|                                 S rE   )strip)rN   ss     r   
<listcomp>z9SpecifierRequirement.format_for_error.<locals>.<listcomp>d   s     999q999r   ,r    r
   z, z and )r   splitlenjoin)r   partss     r   r7   z%SpecifierRequirement.format_for_error_   s}    
 :9CIIOOC$8$8999u::??2ZZ1__8Oyyss$$w.r::r   r   c                    d | j         fS r   )rS   r   s    r   r9   z)SpecifierRequirement.get_candidate_lookupl   s    TZr   r   r   c                    |j         | j         k    sJ d|j          d| j                      | j        j        s
J d            | j        j        j        }|                    |j        d          S )Nz6Internal issue: Candidate is not for this requirement z vs rh   Tprereleases)r5   rS   r_   	specifiercontainsversion)r   r   specs      r   r;   z$SpecifierRequirement.is_satisfied_byo   s    ~***/~/ /#'9/ / +** z~HHHHHHz~'}}Y.D}AAAr   NrH   r	   r   r   r<   r+   ra   r   r,   r=   r?   r@   rA   )r%   rB   rC   r   rD   r\   r   r&   r1   r*   r3   r5   r7   r9   r;   rE   r   r   rG   rG   4   s"       R R R R ! ! ! X!# # # #E E E E+ + + +
    6 6 6 X6 < < < X<; ; ; ;       
B 
B 
B 
B 
B 
Br   rG   c                  B    e Zd ZdZddZedd            ZddZddZdS )!SpecifierWithoutExtrasRequirementz
    Requirement backed by an install requirement on a base package.
    Trims extras from its install requirement if there are any.
    rH   r	   r   r   c                    |j         
J d            t          |          | _        d | _        d | _        t          d | j        j        D                       | _        d S )NrJ   c              3  4   K   | ]}t          |          V  d S r   rL   rM   s     r   rP   z=SpecifierWithoutExtrasRequirement.__init__.<locals>.<genexpr>   rQ   r   )rR   r   rS   rT   rU   rV   rW   rX   rY   s     r   r   z*SpecifierWithoutExtrasRequirement.__init__   s^    y  "C   ,T22
(,!%
  Q Qtz?P Q Q QQQr   r   c                ^    | j         | j         S t          | j                  | _         | j         S r   r[   r   s    r   r\   z(SpecifierWithoutExtrasRequirement._equal   r]   r   r+   ra   r,   c                Z    t          |t                    st          S | j        |j        k    S r   )r/   r   rc   r\   r0   s     r   r1   z(SpecifierWithoutExtrasRequirement.__eq__   s*    %!BCC 	"!!{el**r   r'   c                ^    | j         | j         S t          | j                  | _         | j         S r   re   r   s    r   r*   z*SpecifierWithoutExtrasRequirement.__hash__   rf   r   Nr~   r<   r   r=   )	r%   rB   rC   __doc__r   rD   r\   r1   r*   rE   r   r   r   r   |   s~         
R R R R ! ! ! X!+ + + +
     r   r   c                      e Zd ZdZddZdd
ZddZddZddZe	dd            Z
e	dd            ZddZd dZd!dZdS )"RequiresPythonRequirementz4A requirement representing Requires-Python metadata.rz   r   matchr   r   r   c                X    || _         t          |          | _        d | _        || _        d S r   )rz   r   _specifier_stringrU   
_candidate)r   rz   r   s      r   r   z"RequiresPythonRequirement.__init__   s)    "!$Y!%
r   r   c                    d| j          S )NzPython )rz   r   s    r   r   z!RequiresPythonRequirement.__str__   s    ))))r   c                J    | j         j         dt          | j                  dS r!   )r$   r%   r   rz   r   s    r   r&   z"RequiresPythonRequirement.__repr__   s(    .)DDC,?,?DDDDr   r'   c                l    | j         | j         S t          | j        | j        f          | _         | j         S r   )rU   r)   r   r   r   s    r   r*   z"RequiresPythonRequirement.__hash__   s3    :!:414?CDD
zr   r+   r   r,   c                p    t          |t                    sdS | j        |j        k    o| j        |j        k    S r.   )r/   r   r   r   r0   s     r   r1   z RequiresPythonRequirement.__eq__   s?    %!:;; 	5"e&== 45#33	
r   r   c                    | j         j        S r   )r   r3   r   s    r   r3   z&RequiresPythonRequirement.project_name   s    ++r   c                    | j         j        S r   )r   r5   r   s    r   r5   zRequiresPythonRequirement.name   s    ##r   c                     t          |           S r   r   r   s    r   r7   z*RequiresPythonRequirement.format_for_error       4yyr   r   c                d    | j                             | j        j        d          r	| j        d fS dS )NTrx   NN)rz   r{   r   r|   r   s    r   r9   z.RequiresPythonRequirement.get_candidate_lookup   s6    >""4?#:"MM 	)?D((zr   r   c                    |j         | j        j         k    s
J d            | j                            |j        d          S )NzNot Python candidateTrx   )r5   r   rz   r{   r|   r   s     r   r;   z)RequiresPythonRequirement.is_satisfied_by   sC    ~!55557M555 ~&&y'8d&KKKr   N)rz   r   r   r   r   r   r<   r=   r>   r?   r@   rA   )r%   rB   rC   r   r   r   r&   r*   r1   rD   r3   r5   r7   r9   r;   rE   r   r   r   r      s       >>       * * * *E E E E   
 
 
 
 , , , X, $ $ $ X$      
L L L L L Lr   r   c                      e Zd ZdZddZddZdd	ZddZddZe	dd            Z
e	dd            ZddZddZddZdS ) UnsatisfiableRequirementz'A requirement that cannot be satisfied.r5   r   r   r   c                    || _         d S r   _name)r   r5   s     r   r   z!UnsatisfiableRequirement.__init__   s    


r   r   c                    | j          dS )Nz (unavailable)r   r   s    r   r   z UnsatisfiableRequirement.__str__   s    *,,,,r   c                J    | j         j         dt          | j                  dS r!   )r$   r%   r   r   r   s    r   r&   z!UnsatisfiableRequirement.__repr__   s&    .)@@C
OO@@@@r   r+   ra   r,   c                Z    t          |t                    st          S | j        |j        k    S r   )r/   r   rc   r   r0   s     r   r1   zUnsatisfiableRequirement.__eq__   s*    %!9:: 	"!!zU[((r   r'   c                *    t          | j                  S r   )r)   r   r   s    r   r*   z!UnsatisfiableRequirement.__hash__   s    DJr   c                    | j         S r   r   r   s    r   r3   z%UnsatisfiableRequirement.project_name   
    zr   c                    | j         S r   r   r   s    r   r5   zUnsatisfiableRequirement.name   r   r   c                     t          |           S r   r   r   s    r   r7   z)UnsatisfiableRequirement.format_for_error   r   r   r   c                    dS )Nr   rE   r   s    r   r9   z-UnsatisfiableRequirement.get_candidate_lookup   s    zr   r   r   c                    dS r.   rE   r   s     r   r;   z(UnsatisfiableRequirement.is_satisfied_by   s    ur   N)r5   r   r   r   r<   r   r=   r?   r@   rA   )r%   rB   rC   r   r   r   r&   r1   r*   rD   r3   r5   r7   r9   r;   rE   r   r   r   r      s        11   - - - -A A A A) ) ) )
           X    X           r   r   N)
__future__r   typingr    pip._vendor.packaging.specifiersr   pip._vendor.packaging.utilsr   r   pip._internal.req.constructorsr   pip._internal.req.req_installr	   baser   r   r   r   r   rG   r   r   r   rE   r   r   <module>r      s   " " " " " "       9 9 9 9 9 9 I I I I I I I I B B B B B B < < < < < < F F F F F F F F F F F F#+ #+ #+ #+ #++ #+ #+ #+LEB EB EB EB EB; EB EB EBP    (<   D3L 3L 3L 3L 3L 3L 3L 3Ll# # # # #{ # # # # #r   