
    q"hO                     (   S SK r S SKrS SKJrJrJrJrJrJrJ	r	J
r
  S SKJr  S SKJrJr  S SKJr  S SKJrJrJrJrJr  S SKJr  S SKJrJr  S S	KJr  S S
KJ r J!r!  S SK"J#r#  S SK$J%r%  S SK&J'r'  SSK(J)r)J*r*J+r+  \(       a  SSK,J-r-  \ R\                  " \/5      r0\	S   r1\
" \S5      r2S\)S\\1   4S jr3S\S\#S\#4S jr4S\S\#S\#4S jr5S\S\#S\#4S jr6 " S S\)5      r7 " S S\75      r8 " S  S!\75      r9 " S" S#\)5      r: " S$ S%\)5      r; " S& S'\)5      r<g)(    N)TYPE_CHECKINGAny	FrozenSetIterableOptionalTupleUnioncast)InvalidRequirement)NormalizedNamecanonicalize_name)Version)	HashErrorInstallationSubprocessErrorInvalidInstalledPackageMetadataInconsistentMetadataInvalid)BaseDistribution)Linklinks_equivalent)Wheel)install_req_from_editableinstall_req_from_line)InstallRequirement)direct_url_from_link)normalize_version_info   )	CandidateRequirementformat_name)Factory)AlreadyInstalledCandidateEditableCandidateLinkCandidatez<Python from Requires-Python>	candidatereturnc                 J    [         [        [        4n[        X5      (       a  U $ g)z%The runtime version of BaseCandidate.N)r"   r#   r$   
isinstance)r%   base_candidate_classess     `/var/www/html/env/lib/python3.13/site-packages/pip/_internal/resolution/resolvelib/candidates.pyas_base_candidater+   ,   s+     	"
 )44    linktemplatec                    UR                   (       a   S5       eUR                  (       a  [        UR                  5      nOU R                  n[	        UUR
                  UR                  UR                  UR                  UR                  UR                  UR                  UR                  S9	nUR                  Ul        Xl        UR                  Ul        U$ )Nztemplate is editableuser_supplied
comes_from
use_pep517isolated
constraintglobal_optionshash_optionsconfig_settings)editablereqstrurlr   r1   r2   r3   r4   r5   r6   r7   r8   original_linkr-   extras)r-   r.   lineireqs       r*   make_install_req_from_linkrA   8   s       8"88 ||8<< xx ,,&&&&""&&..** 00
D "//DI//DKKr,   c                 D   UR                   (       d   S5       e[        U R                  UR                  UR                  UR
                  UR                  UR                  UR                  UR                  UR                  UR                  S9
nUR                  Ul        U$ )Nztemplate not editable)	r1   r2   r3   r4   r5   permit_editable_wheelsr6   r7   r8   )r9   r   r<   r1   r2   r3   r4   r5   rC   r6   r7   r8   r>   )r-   r.   r@   s      r*   make_install_req_from_editablerD   Q   s     555$,,&&&&""&&'>>..** 00D //DKKr,   distc                    UR                   (       a  [        UR                   5      nORUR                  (       a&  U R                   SUR                  R                   3nOU R                   SU R
                   3n[        UUR                  UR                  UR                  UR                  UR                  UR                  UR                  UR                  S9	nXl        U$ )Nz @ z==r0   )r:   r;   r-   canonical_namer<   versionr   r1   r2   r3   r4   r5   r6   r7   r8   satisfied_by)rE   r.   r?   r@   s       r*   _make_install_req_from_distrJ   e   s     ||8<< 	%%&c(--*;*;)<=%%&b7 ,,&&&&""&&..** 00
D Kr,   c                   r   \ rS rSr% Sr\\S'   Sr  S S\S\S\	S	S
S\
\   S\
\   SS4S jjrS\4S jrS\4S jrS\4S jrS\S\4S jr\S\
\   4S j5       r\S\4S j5       r\S\4S j5       r\S\4S j5       rS\4S jrS\4S jrS\SS4S jrS\4S jrS\S\\
\       4S jr!S\
\	   4S jr"Sr#g)!"_InstallRequirementBackedCandidate}   a  A candidate backed by an ``InstallRequirement``.

This represents a package request with the target not being already
in the environment, and needs to be fetched and installed. The backing
``InstallRequirement`` is responsible for most of the leg work; this
class exposes appropriate information to the resolver.

:param link: The link passed to the ``InstallRequirement``. The backing
    ``InstallRequirement`` will use this link to fetch the distribution.
:param source_link: The link this candidate "originates" from. This is
    different from ``link`` when the link is found in the wheel cache.
    ``link`` would point to the wheel cache, while this points to the
    found remote link (e.g. from pypi.org).
rE   FNr-   source_linkr@   factoryr!   namerH   r&   c                     Xl         X l        X@l        X0l        XPl        X`l        U R                  5       U l        S U l        g N)	_link_source_link_factory_ireq_name_version_preparerE   _hash)selfr-   rN   r@   rO   rP   rH   s          r*   __init__+_InstallRequirementBackedCandidate.__init__   s7     
'

MMO	$(
r,   c                 8    U R                    SU R                   3$ )N rP   rH   r[   s    r*   __str__*_InstallRequirementBackedCandidate.__str__   s    ))Adll^,,r,   c                 b    U R                   R                   S[        U R                  5      < S3$ N())	__class____name__r;   rS   ra   s    r*   __repr__+_InstallRequirementBackedCandidate.__repr__   s)    ..))*!C

O+>a@@r,   c                     U R                   b  U R                   $ [        U R                  U R                  45      U l         U R                   $ rR   )rZ   hashrh   rS   ra   s    r*   __hash__+_InstallRequirementBackedCandidate.__hash__   s9    ::!::4>>4::67
zzr,   otherc                 x    [        XR                  5      (       a   [        U R                  UR                  5      $ gNF)r(   rh   r   rS   r[   rp   s     r*   __eq__)_InstallRequirementBackedCandidate.__eq__   s)    e^^,,#DJJ<<r,   c                     U R                   $ rR   )rT   ra   s    r*   rN   ._InstallRequirementBackedCandidate.source_link          r,   c                 j    U R                   c  U R                  R                  U l         U R                   $ z:The normalised name of the project the candidate refers to)rW   rE   rG   ra   s    r*   project_name/_InstallRequirementBackedCandidate.project_name   s)     ::11DJzzr,   c                     U R                   $ rR   r{   ra   s    r*   rP   '_InstallRequirementBackedCandidate.name   rx   r,   c                 j    U R                   c  U R                  R                  U l         U R                   $ rR   rX   rE   rH   ra   s    r*   rH   *_InstallRequirementBackedCandidate.version   '    ==  II--DM}}r,   c                     U R                    SU R                   SU R                  R                  (       a  U R                  R                  OU R                   S3$ )Nr_   z (from rg   )rP   rH   rS   is_file	file_pathra   s    r*   format_for_error3_InstallRequirementBackedCandidate.format_for_error   sJ    yyk4<<. )-1ZZ-?-?TZZ))TZZPPQS	
r,   c                     [        S5      e)NzOverride in subclass)NotImplementedErrorra   s    r*   _prepare_distribution8_InstallRequirementBackedCandidate._prepare_distribution   s    !"899r,   c                 :   U R                   bF  U R                   UR                  :w  a,  [        U R                  SU R                   UR                  5      eU R                  bX  U R                  UR
                  :w  a>  [        U R                  S[        U R                  5      [        UR
                  5      5      e [        UR                  [        UR                  5       5      5      5        g! [         a$  n[        U R                  [        U5      5      eSnAff = f)z:Check for consistency of project name and version of dist.NrP   rH   )rW   rG   r   rV   rX   rH   r;   listiter_dependenciesiter_provided_extrasr   r   )r[   rE   es      r*   _check_metadata_consistency>_InstallRequirementBackedCandidate._check_metadata_consistency   s    ::!djjD4G4G&G&



##	  ==$$,,)F&

DMM"DLL!	 	6''T-F-F-H(IJK! 	6!$**c!f55	6s   :1C, ,
D6DDc                      U R                  5       nU R                  U5        U$ ! [         a  nU R                  Ul        e S nAf[         a  nSUl        e S nAff = f)NzSee above for output.)r   r   rV   r:   r   contextr   )r[   rE   r   excs       r*   rY   +_InstallRequirementBackedCandidate._prepare   s_    	--/D 	((.  	 JJAE* 	1CK	s    % 
AAAAAwith_requiresc              #   8  #    U R                   R                  U R                  R                  5      v   U(       a  U R                  R	                  5       OSnU H:  nU R                   R                  [        U5      U R                  5       S h  vN   M<     g  N	7fN )rU    make_requires_python_requirementrE   requires_pythonr   make_requirements_from_specr;   rV   )r[   r   requiresrs       r*   r   4_InstallRequirementBackedCandidate.iter_dependencies   sk      mm<<TYY=V=VWW4A499..0rA}}@@QTTT Ts   BBB
Bc                     U R                   $ rR   )rV   ra   s    r*   get_install_requirement:_InstallRequirementBackedCandidate.get_install_requirement  s    zzr,   )rU   rZ   rV   rS   rW   rT   rX   rE   NN)$ri   
__module____qualname____firstlineno____doc__r   __annotations__is_installedr   r   r   r   r   r\   r;   rb   rj   intrn   r   boolrt   propertyrN   r{   rP   rH   r   r   r   rY   r   r   r   r   __static_attributes__r   r,   r*   rL   rL   }   s    L *.%))) ) !	)
 ) ~&) '") 
)$- -A# A# C D 
 !Xd^ ! ! n   !c ! !   

# 
:'7 :60@ 6T 60* "Ut U+AV8W U2D)E r,   rL   c                   j   ^  \ rS rSrSr  SS\S\SSS\\   S	\\	   S
S4U 4S jjjr
S
\4S jrSrU =r$ )r$   i  FNr-   r.   rO   r!   rP   rH   r&   c           	        > UnUR                  Xd5      nUb,  [        R                  SUR                  5        UR                  n[	        X5      nUR                  U:X  d   eUR                  R
                  (       a  UR                  R                  (       dv  [        UR                  R                  5      n	[        U	R                  5      n
XJ:X  d   U< SU
< S35       eUb+  [        U	R                  5      nX[:X  d   U< SU< SU 35       eUb  UR                  R
                  (       d   eUR                  R                  (       d   eUR                  (       a  UR                  UR                  L a  Xhl        UR                   b  UR                   Ul        O[%        XgR                  S9Ul        [&        TU ]Q  UUUUUUS9  g )NzUsing cached wheel link: %sz != z
 for wheelz for wheel )link_is_in_wheel_cacher-   rN   r@   rO   rP   rH   )get_wheel_cache_entryloggerdebugr-   rA   is_wheelr   r   filenamer   rP   r   rH   
persistentr=   cached_wheel_source_linkorigindownload_infor   superr\   )r[   r-   r.   rO   rP   rH   rN   cache_entryr@   wheel
wheel_namewheel_versionrh   s               r*   r\   LinkCandidate.__init__
  s    33KF"LL68H8HI##D)$9yyD   99dii&7&7$)),,-E*5::6J%N$j^:'NN%" ' 6,H[]$5[GH, "99%%%%99$$$$%%(--8;Q;Q*Q0;-!!-%0%7%7" &:8N8N&" 	# 	 	
r,   c                 b    U R                   R                  nUR                  U R                  SS9$ )NT)parallel_builds)rU   preparerprepare_linked_requirementrV   )r[   r   s     r*   r   #LinkCandidate._prepare_distribution;  s+    ==))224::t2TTr,   r   r   ri   r   r   r   is_editabler   r   r   r   r   r\   r   r   r   __classcell__rh   s   @r*   r$   r$     st    K *.%)/
/
 %/
 	/

 ~&/
 '"/
 
/
 /
bU'7 U Ur,   r$   c                   j   ^  \ rS rSrSr  SS\S\SSS\\   S	\\	   S
S4U 4S jjjr
S
\4S jrSrU =r$ )r#   i@  TNr-   r.   rO   r!   rP   rH   r&   c           	      <   > [         TU ]  UU[        X5      UUUS9  g )Nr   )r   r\   rD   )r[   r-   r.   rO   rP   rH   rh   s         r*   r\   EditableCandidate.__init__C  s.     	/? 	 	
r,   c                 `    U R                   R                  R                  U R                  5      $ rR   )rU   r   prepare_editable_requirementrV   ra   s    r*   r   'EditableCandidate._prepare_distributionT  s!    }}%%BB4::NNr,   r   r   r   r   s   @r*   r#   r#   @  ss    K *.%)

 %
 	

 ~&
 '"
 

 
"O'7 O Or,   r#   c                      \ rS rSrSrSrS\S\SSSS4S	 jrS\	4S
 jr
S\	4S jrS\S\4S jrS\4S jr\S\4S j5       r\S\	4S j5       r\S\4S j5       r\S\4S j5       rS\	4S jrS\S\\\      4S jrS\\   4S jrSrg)r"   iX  TNrE   r.   rO   r!   r&   c                     Xl         [        X5      U l        X0l        S U l        SnUR
                  R                  U R                  U5        g )Nzalready satisfied)rE   rJ   rV   rU   rX   r   prepare_installed_requirement)r[   rE   r.   rO   skip_reasons        r*   r\   "AlreadyInstalledCandidate.__init__\  sB     	0@
 *66tzz;Or,   c                 ,    [        U R                  5      $ rR   )r;   rE   ra   s    r*   rb   !AlreadyInstalledCandidate.__str__n  s    499~r,   c                 P    U R                   R                   SU R                  < S3$ re   )rh   ri   rE   ra   s    r*   rj   "AlreadyInstalledCandidate.__repr__q  s$    ..))*!DII=::r,   rp   c                     [        U[        5      (       d  [        $ U R                  UR                  :H  =(       a    U R                  UR                  :H  $ rR   )r(   r"   NotImplementedrP   rH   rs   s     r*   rt    AlreadyInstalledCandidate.__eq__t  s;    %!:;;!!yyEJJ&H4<<5==+HHr,   c                 D    [        U R                  U R                  45      $ rR   )rm   rP   rH   ra   s    r*   rn   "AlreadyInstalledCandidate.__hash__y  s    TYY-..r,   c                 .    U R                   R                  $ rR   )rE   rG   ra   s    r*   r{   &AlreadyInstalledCandidate.project_name|  s    yy'''r,   c                     U R                   $ rR   r~   ra   s    r*   rP   AlreadyInstalledCandidate.name  rx   r,   c                 j    U R                   c  U R                  R                  U l         U R                   $ rR   r   ra   s    r*   rH   !AlreadyInstalledCandidate.version  r   r,   c                 .    U R                   R                  $ rR   )rE   r9   ra   s    r*   r   %AlreadyInstalledCandidate.is_editable  s    yy!!!r,   c                 :    U R                    SU R                   S3$ )Nr_   z (Installed)r`   ra   s    r*   r   *AlreadyInstalledCandidate.format_for_error  s    ))Adll^<88r,   r   c              #      #    U(       d  g  U R                   R                  5        H:  nU R                  R                  [	        U5      U R
                  5       S h  vN   M<     g  N	! [         a  n[        U R                   US9S eS nAff = f7f)N)rE   invalid_exc)rE   r   rU   r   r;   rV   r   r   )r[   r   r   r   s       r*   r   +AlreadyInstalledCandidate.iter_dependencies  sr     	UYY002==DDSVTZZXXX 3X! 	U)tyycJPTT	Us;   	BAA' A%A' $B%A' '
B1BBBc                     g rR   r   ra   s    r*   r   1AlreadyInstalledCandidate.get_install_requirement      r,   )rU   rV   rX   rE   )ri   r   r   r   r   rN   r   r   r\   r;   rb   rj   objectr   rt   r   rn   r   r   r{   rP   r   rH   r   r   r   r   r   r   r   r   r   r,   r*   r"   r"   X  s    LKPP %P 	P
 
P$ ;# ;IF It I
/# / (n ( ( !c ! !   
 "T " "9# 9Ut U+AV8W U2D)E r,   r"   c            	       X   \ rS rSrSrSS.S\S\\   S\\	   SS4S	 jjr
S\4S
 jrS\4S jrS\4S jrS\S\4S jr\S\4S j5       r\S\4S j5       r\S\4S j5       rS\4S jr\S\4S j5       r\S\4S j5       r\S\\   4S j5       rS\S\\\      4S jrS\\	   4S jr Sr!g)ExtrasCandidatei  a  A candidate that has 'extras', indicating additional dependencies.

Requirements can be for a project with dependencies, something like
foo[extra].  The extras don't affect the project/version being installed
directly, but indicate that we need additional dependencies. We model that
by having an artificial ExtrasCandidate that wraps the "base" candidate.

The ExtrasCandidate differs from the base in the following ways:

1. It has a unique name, of the form foo[extra]. This causes the resolver
   to treat it as a separate node in the dependency graph.
2. When we're getting the candidate's dependencies,
   a) We specify that we want the extra dependencies as well.
   b) We add a dependency on the base candidate.
      See below for why this is needed.
3. We return None for the underlying InstallRequirement, as the base
   candidate will provide it, and we don't want to end up with duplicates.

The dependency on the base candidate is needed so that the resolver can't
decide that it should recommend foo[extra1] version 1.0 and foo[extra2]
version 2.0. Having those candidates depend on foo=1.0 and foo=2.0
respectively forces the resolver to recognise that this is a conflict.
N)r2   baser>   r2   r&   c                    Xl         [        S U 5       5      U l        Ub  X0l        gU R                   R                  U l        g)a  
:param comes_from: the InstallRequirement that led to this candidate if it
    differs from the base's InstallRequirement. This will often be the
    case in the sense that this candidate's requirement has the extras
    while the base's does not. Unlike the InstallRequirement backed
    candidates, this requirement is used solely for reporting purposes,
    it does not do any leg work.
c              3   8   #    U  H  n[        U5      v   M     g 7frR   )r   ).0r   s     r*   	<genexpr>+ExtrasCandidate.__init__.<locals>.<genexpr>  s     Ef 1! 4 4f   N)r   	frozensetr>   rV   _comes_from)r[   r   r>   r2   s       r*   r\   ExtrasCandidate.__init__  s5     	EfEE)3)?:TYY__r,   c                     [        U R                  5      R                  SS5      u  pSR                  USR	                  U R
                  5      U5      $ )Nr_   r   z	{}[{}] {},)r;   r   splitformatjoinr>   )r[   rP   rests      r*   rb   ExtrasCandidate.__str__  s@    ^))#q1
!!$(=tDDr,   c                 l    U R                   R                   SU R                  < SU R                  < S3$ )Nz(base=z	, extras=rg   )rh   ri   r   r>   ra   s    r*   rj   ExtrasCandidate.__repr__  s/    ..))*&Yt{{oUVWWr,   c                 D    [        U R                  U R                  45      $ rR   )rm   r   r>   ra   s    r*   rn   ExtrasCandidate.__hash__  s    TYY,--r,   rp   c                     [        XR                  5      (       a9  U R                  UR                  :H  =(       a    U R                  UR                  :H  $ grr   )r(   rh   r   r>   rs   s     r*   rt   ExtrasCandidate.__eq__  s9    e^^,,99

*Jt{{ell/JJr,   c                 .    U R                   R                  $ rR   )r   r{   ra   s    r*   r{   ExtrasCandidate.project_name      yy%%%r,   c                 V    [        U R                  R                  U R                  5      $ rz   )r    r   r{   r>   ra   s    r*   rP   ExtrasCandidate.name  s     499114;;??r,   c                 .    U R                   R                  $ rR   )r   rH   ra   s    r*   rH   ExtrasCandidate.version  s    yy   r,   c                     SR                  U R                  R                  5       SR                  [	        U R
                  5      5      5      $ )Nz{} [{}]z, )r   r   r   r  sortedr>   ra   s    r*   r    ExtrasCandidate.format_for_error  s9    II&&($))F4;;4G*H
 	
r,   c                 .    U R                   R                  $ rR   )r   r   ra   s    r*   r   ExtrasCandidate.is_installed  r  r,   c                 .    U R                   R                  $ rR   )r   r   ra   s    r*   r   ExtrasCandidate.is_editable      yy$$$r,   c                 .    U R                   R                  $ rR   )r   rN   ra   s    r*   rN   ExtrasCandidate.source_link  r  r,   r   c              #     #    U R                   R                  nUR                  U R                   5      v   U(       d  g U R                  R	                  U R                   R
                  R                  5       5      nU R                  R                  U R                   R
                  R                  5       5      n[        U5       H9  n[        R                  SU R                   R                  U R                  U5        M;     U R                   R
                  R                  U5       H1  nUR                  [        U5      U R                   U5       S h  vN   M3     g  N	7f)Nz%%s %s does not provide the extra '%s')r   rU   make_requirement_from_candidater>   intersectionrE   r   
differencer  r   warningrP   rH   r   r   r;   r   )r[   r   rO   valid_extrasinvalid_extrasextrar   s          r*   r   !ExtrasCandidate.iter_dependencies  s     ))$$ 55dii@@ {{//		0S0S0UV//		0S0S0UVN+ENN7			 , 11,?A::A     @s   EEE
Ec                     g rR   r   ra   s    r*   r   'ExtrasCandidate.get_install_requirement  s     r,   )r   r   r>   )"ri   r   r   r   r   BaseCandidater   r;   r   r   r\   rb   rj   r   rn   r   r   rt   r   r   r{   rP   r   rH   r   r   r   r   rN   r   r   r   r   r   r   r,   r*   r   r     se   : 48UU #U
 /0U 
U&E EX# X.# .C D 
 &n & & @c @ @ ! ! !
# 

 &d & & %T % % %Xd^ % %t +AV8W 82D)E r,   r   c                       \ rS rSrSrSrS\\\S4      SS4S jr	S\
4S jrS\
4S	 jr\S\4S
 j5       r\S\
4S j5       r\S\4S j5       rS\
4S jrS\S\\\      4S jrS\\   4S jrSrg)RequiresPythonCandidatei  FNpy_version_info.r&   c                     Ub  [        U5      nO[        R                  S S n[        SR	                  S U 5       5      5      U l        g )N   .c              3   8   #    U  H  n[        U5      v   M     g 7frR   )r;   )r   cs     r*   r   3RequiresPythonCandidate.__init__.<locals>.<genexpr>$  s     (FAQr   )r   sysversion_infor   r  rX   )r[   r)  r1  s      r*   r\    RequiresPythonCandidate.__init__  s?    &1/BL++BQ/L(F(F FGr,   c                      SU R                    3$ NzPython rX   ra   s    r*   rb   RequiresPythonCandidate.__str__*  s    ((r,   c                 P    U R                   R                   SU R                  < S3$ re   )rh   ri   rX   ra   s    r*   rj    RequiresPythonCandidate.__repr__-  s%    ..))*!DMM+<A>>r,   c                     [         $ rR   REQUIRES_PYTHON_IDENTIFIERra   s    r*   r{   $RequiresPythonCandidate.project_name0      ))r,   c                     [         $ rR   r:  ra   s    r*   rP   RequiresPythonCandidate.name4  r=  r,   c                     U R                   $ rR   r5  ra   s    r*   rH   RequiresPythonCandidate.version8  s    }}r,   c                      SU R                    3$ r4  )rH   ra   s    r*   r   (RequiresPythonCandidate.format_for_error<  s    ''r,   r   c                     gr   r   )r[   r   s     r*   r   )RequiresPythonCandidate.iter_dependencies?  s    r,   c                     g rR   r   ra   s    r*   r   /RequiresPythonCandidate.get_install_requirementB  r   r,   r5  )ri   r   r   r   r   rN   r   r   r   r\   r;   rb   rj   r   r   r{   rP   r   rH   r   r   r   r   r   r   r   r   r   r,   r*   r(  r(    s    LKHsCx(A Hd H) )?# ? *n * * *c * *   (# (t +AV8W 2D)E r,   r(  )=loggingr0  typingr   r   r   r   r   r   r	   r
   "pip._vendor.packaging.requirementsr   pip._vendor.packaging.utilsr   r   pip._vendor.packaging.versionr   pip._internal.exceptionsr   r   r   r   r   pip._internal.metadatar   pip._internal.models.linkr   r   pip._internal.models.wheelr   pip._internal.req.constructorsr   r   pip._internal.req.req_installr   &pip._internal.utils.direct_url_helpersr   pip._internal.utils.miscr   r   r   r   r    rO   r!   	getLoggerri   r   r&  r;  r+   rA   rD   rJ   rL   r$   r#   r"   r   r(  r   r,   r*   <module>rV     sD    
 X X X A I 1  4 < , = G ; 5 5 			8	$ ".2QR 	 	x/F 	
,2
,(
&80G GT6U6 6UrO: O0D	 DNyi yx(i (r,   