
    4ՔhN                    "   S SK Jr  S SKrS SKrS SKJr  S SK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 jr3      S&S jr4      S&S jr5      S'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)(    )annotationsN)Iterable)TYPE_CHECKINGAny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>c                J    [         [        [        4n[        X5      (       a  U $ g)z%The runtime version of BaseCandidate.N)r    r!   r"   
isinstance)	candidatebase_candidate_classess     f/var/www/auris/envauris/lib/python3.13/site-packages/pip/_internal/resolution/resolvelib/candidates.pyas_base_candidater(   /   s+     	"
 )44    c                   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   r,   r-   r.   r/   r0   r1   r2   r3   original_linklinkextras)r9   templatelineireqs       r'   make_install_req_from_linkr>   ;   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)	r,   r-   r.   r/   r0   permit_editable_wheelsr1   r2   r3   )r4   r   r7   r,   r-   r.   r/   r0   r@   r1   r2   r3   r:   )r9   r;   r=   s      r'   make_install_req_from_editablerA   T   s     555$,,&&&&""&&'>>..** 00D //DKKr)   c                   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==r+   )r5   r6   r9   canonical_namer7   versionr   r,   r-   r.   r/   r0   r1   r2   r3   satisfied_by)distr;   r<   r=   s       r'   _make_install_req_from_distrG   h   s     ||8<< 	%%&c(--*;*;)<=%%&b7 ,,&&&&""&&..** 00
D Kr)   c                     \ rS rSr% SrS\S'   Sr  S             SS jjrSS jrSS	 jr	SS
 jr
SS jr\SS j5       r\SS j5       r\SS j5       r\SS j5       rSS jrSS jrS S jrSS jrS!S jrS"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).
r   rF   FNc                    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_preparerF   _hash)selfr9   source_linkr=   factorynamerD   s          r'   __init__+_InstallRequirementBackedCandidate.__init__   s7     
'

MMO	!%
r)   c                8    U R                    SU R                   3$ )N rX   rD   rU   s    r'   __str__*_InstallRequirementBackedCandidate.__str__   s    ))Adll^,,r)   c                b    U R                   R                   S[        U R                  5      < S3$ N())	__class____name__r6   rM   r^   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                   $ rL   )rT   hashre   rM   r^   s    r'   __hash__+_InstallRequirementBackedCandidate.__hash__   s9    ::!::4>>4::67
zzr)   c                x    [        XR                  5      (       a   [        U R                  UR                  5      $ gNF)r$   re   r   rM   rU   others     r'   __eq__)_InstallRequirementBackedCandidate.__eq__   s)    e^^,,#DJJ<<r)   c                    U R                   $ rL   )rN   r^   s    r'   rV   ._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)rQ   rF   rC   r^   s    r'   project_name/_InstallRequirementBackedCandidate.project_name   s)     ::11DJzzr)   c                    U R                   $ rL   rx   r^   s    r'   rX   '_InstallRequirementBackedCandidate.name   ru   r)   c                j    U R                   c  U R                  R                  U l         U R                   $ rL   rR   rF   rD   r^   s    r'   rD   *_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 rd   )rX   rD   rM   is_file	file_pathr^   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)NotImplementedErrorr^   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.NrX   rD   )rQ   rC   r   rP   rR   rD   r6   listiter_dependenciesiter_provided_extrasr	   r   )rU   rF   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   rP   r5   r   contextr   )rU   rF   r   excs       r'   rS   +_InstallRequirementBackedCandidate._prepare   s_    	--/D 	((.  	 JJAE* 	1CK	s    % 
AAAAAc              #  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 )rO    make_requires_python_requirementrF   requires_pythonr   make_requirements_from_specr6   rP   )rU   with_requires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                   $ rL   )rP   r^   s    r'   get_install_requirement:_InstallRequirementBackedCandidate.get_install_requirement  s    zzr)   )rO   rT   rP   rM   rQ   rN   rR   rF   NN)r9   r   rV   r   r=   r   rW   r   rX   NormalizedName | NonerD   Version | NonereturnNoner   r6   r   intrp   r   r   boolr   zLink | Noner   r
   r   r   r   r   )rF   r   r   r   r   r   r   zIterable[Requirement | None]r   InstallRequirement | None)rf   
__module____qualname____firstlineno____doc____annotations__is_installedrY   r_   rg   rk   rq   propertyrV   rx   rX   rD   r   r   r   rS   r   r   __static_attributes__r   r)   r'   rI   rI      s     L '+"&&& & !	&
 & $&  & 
&$-A
 ! !   ! !  

:60"Ur)   rI   c                  X   ^  \ rS rSrSr  S           SU 4S jjjrSS jrSrU =r$ )	r"   i
  Fc           	       > 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r9   rV   r=   rW   rX   rD   )get_wheel_cache_entryloggerdebugr9   r>   is_wheelr   r   filenamer   rX   r   rD   
persistentr8   cached_wheel_source_linkorigindownload_infor   superrY   )rU   r9   r;   rW   rX   rD   rV   cache_entryr=   wheel
wheel_namewheel_versionre   s               r'   rY   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)rO   preparerprepare_linked_requirementrP   )rU   r   s     r'   r   #LinkCandidate._prepare_distribution>  s+    ==))224::t2TTr)   r   r   r9   r   r;   r   rW   r   rX   r   rD   r   r   r   r   	rf   r   r   r   is_editablerY   r   r   __classcell__re   s   @r'   r"   r"   
  sa    K '+"&/
/
 %/
 	/

 $/
  /
 
/
 /
bU Ur)   r"   c                  X   ^  \ rS rSrSr  S           SU 4S jjjrSS jrSrU =r$ )	r!   iC  Tc           	     <   > [         TU ]  UU[        X5      UUUS9  g )Nr   )r   rY   rA   )rU   r9   r;   rW   rX   rD   re   s         r'   rY   EditableCandidate.__init__F  s.     	/? 	 	
r)   c                `    U R                   R                  R                  U R                  5      $ rL   )rO   r   prepare_editable_requirementrP   r^   s    r'   r   'EditableCandidate._prepare_distributionW  s!    }}%%BB4::NNr)   r   r   r   r   r   r   s   @r'   r!   r!   C  s`    K '+"&

 %
 	

 $
  
 

 
"O Or)   r!   c                      \ rS rSrSrSr        SS jrSS jrSS jrSS jr	SS jr
\SS	 j5       r\SS
 j5       r\SS j5       r\SS j5       rSS jrSS jrSS jrSrg)r    i[  TNc                    Xl         [        X5      U l        X0l        S U l        SnUR
                  R                  U R                  U5        g )Nzalready satisfied)rF   rG   rP   rO   rR   r   prepare_installed_requirement)rU   rF   r;   rW   skip_reasons        r'   rY   "AlreadyInstalledCandidate.__init___  sB     	0@
 *66tzz;Or)   c                ,    [        U R                  5      $ rL   )r6   rF   r^   s    r'   r_   !AlreadyInstalledCandidate.__str__q  s    499~r)   c                P    U R                   R                   SU R                  < S3$ rb   )re   rf   rF   r^   s    r'   rg   "AlreadyInstalledCandidate.__repr__t  s$    ..))*!DII=::r)   c                    [        U[        5      (       d  [        $ U R                  UR                  :H  =(       a    U R                  UR                  :H  $ rL   )r$   r    NotImplementedrX   rD   ro   s     r'   rq    AlreadyInstalledCandidate.__eq__w  s;    %!:;;!!yyEJJ&H4<<5==+HHr)   c                D    [        U R                  U R                  45      $ rL   )rj   rX   rD   r^   s    r'   rk   "AlreadyInstalledCandidate.__hash__|  s    TYY-..r)   c                .    U R                   R                  $ rL   )rF   rC   r^   s    r'   rx   &AlreadyInstalledCandidate.project_name  s    yy'''r)   c                    U R                   $ rL   r{   r^   s    r'   rX   AlreadyInstalledCandidate.name  ru   r)   c                j    U R                   c  U R                  R                  U l         U R                   $ rL   r~   r^   s    r'   rD   !AlreadyInstalledCandidate.version  r   r)   c                .    U R                   R                  $ rL   )rF   r4   r^   s    r'   r   %AlreadyInstalledCandidate.is_editable  s    yy!!!r)   c                :    U R                    SU R                   S3$ )Nr\   z (Installed)r]   r^   s    r'   r   *AlreadyInstalledCandidate.format_for_error  s    ))Adll^<88r)   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)rF   invalid_exc)rF   r   rO   r   r6   rP   r	   r   )rU   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 rL   r   r^   s    r'   r   1AlreadyInstalledCandidate.get_install_requirement      r)   )rO   rP   rR   rF   )rF   r   r;   r   rW   r   r   r   r   )rp   objectr   r   r   r   r   r   r   r   r   )rf   r   r   r   r   rV   rY   r_   rg   rq   rk   r   rx   rX   rD   r   r   r   r   r   r   r)   r'   r    r    [  s    LKPP %P 	P
 
P$;I
/ ( ( ! !  
 " "9Ur)   r    c                      \ rS rSrSrSS.       SS jjrSS jrSS jrSS jrSS	 jr	\
SS
 j5       r\
SS j5       r\
SS j5       rSS jr\
SS j5       r\
SS j5       r\
SS j5       rSS jrS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)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rL   )r   ).0r   s     r'   	<genexpr>+ExtrasCandidate.__init__.<locals>.<genexpr>  s     Ef 1! 4 4f   N)base	frozensetr:   rP   _comes_from)rU   r  r:   r-   s       r'   rY   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	{}[{}] {},)r6   r  splitformatjoinr:   )rU   rX   rests      r'   r_   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=rd   )re   rf   r  r:   r^   s    r'   rg   ExtrasCandidate.__repr__  s/    ..))*&Yt{{oUVWWr)   c                D    [        U R                  U R                  45      $ rL   )rj   r  r:   r^   s    r'   rk   ExtrasCandidate.__hash__  s    TYY,--r)   c                    [        XR                  5      (       a9  U R                  UR                  :H  =(       a    U R                  UR                  :H  $ grn   )r$   re   r  r:   ro   s     r'   rq   ExtrasCandidate.__eq__  s9    e^^,,99

*Jt{{ell/JJr)   c                .    U R                   R                  $ rL   )r  rx   r^   s    r'   rx   ExtrasCandidate.project_name      yy%%%r)   c                V    [        U R                  R                  U R                  5      $ rw   )r   r  rx   r:   r^   s    r'   rX   ExtrasCandidate.name  s     499114;;??r)   c                .    U R                   R                  $ rL   )r  rD   r^   s    r'   rD   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:   r^   s    r'   r    ExtrasCandidate.format_for_error  s9    II&&($))F4;;4G*H
 	
r)   c                .    U R                   R                  $ rL   )r  r   r^   s    r'   r   ExtrasCandidate.is_installed  r  r)   c                .    U R                   R                  $ rL   )r  r   r^   s    r'   r   ExtrasCandidate.is_editable      yy$$$r)   c                .    U R                   R                  $ rL   )r  rV   r^   s    r'   rV   ExtrasCandidate.source_link  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  rO   make_requirement_from_candidater:   intersectionrF   r   
differencer  r   warningrX   rD   r   r   r6   r  )rU   r   rW   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 rL   r   r^   s    r'   r   'ExtrasCandidate.get_install_requirement  s     r)   )r  r  r:   )r  BaseCandidater:   zfrozenset[str]r-   r   r   r   r   r   r   r   r   r   r   r   r   )rf   r   r   r   r   rY   r_   rg   rk   rq   r   rx   rX   rD   r   r   r   rV   r   r   r   r   r)   r'   r   r     s    : 15UU U
 .U 
U&EX.
 & & @ @ ! !

 & & % % % %8r)   r   c                      \ rS rSrSrSrSS jrSS jrSS jr\	SS j5       r
\	SS j5       r\	SS	 j5       rSS
 jrSS jrSS jrSrg)RequiresPythonCandidatei  FNc                    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rL   )r6   )r  cs     r'   r  3RequiresPythonCandidate.__init__.<locals>.<genexpr>'  s     (FAQr  )r   sysversion_infor   r  rR   )rU   py_version_infor=  s      r'   rY    RequiresPythonCandidate.__init__"  s?    &1/BL++BQ/L(F(F FGr)   c                     SU R                    3$ NzPython rR   r^   s    r'   r_   RequiresPythonCandidate.__str__-  s    ((r)   c                P    U R                   R                   SU R                  < S3$ rb   )re   rf   rR   r^   s    r'   rg    RequiresPythonCandidate.__repr__0  s%    ..))*!DMM+<A>>r)   c                    [         $ rL   REQUIRES_PYTHON_IDENTIFIERr^   s    r'   rx   $RequiresPythonCandidate.project_name3      ))r)   c                    [         $ rL   rG  r^   s    r'   rX   RequiresPythonCandidate.name7  rJ  r)   c                    U R                   $ rL   rB  r^   s    r'   rD   RequiresPythonCandidate.version;  s    }}r)   c                     SU R                    3$ rA  )rD   r^   s    r'   r   (RequiresPythonCandidate.format_for_error?  s    ''r)   c                    gr   r   )rU   r   s     r'   r   )RequiresPythonCandidate.iter_dependenciesB  s    r)   c                    g rL   r   r^   s    r'   r   /RequiresPythonCandidate.get_install_requirementE  r   r)   rB  )r>  ztuple[int, ...] | Noner   r   r   r   r   r   r   )rf   r   r   r   r   rV   rY   r_   rg   r   rx   rX   rD   r   r   r   r   r   r)   r'   r5  r5    sg    LKH)? * * * *  (r)   r5  )r%   r   r   zBaseCandidate | None)r9   r   r;   r   r   r   )rF   r   r;   r   r   r   )=
__future__r   loggingr<  collections.abcr   typingr   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   rW   r   	getLoggerrf   r   r3  rH  r(   r>   rA   rG   rI   r"   r!   r    r   r5  r   r)   r'   <module>re     s4   "  
 $ 2 2 A I 1  4 < , = G ; 5 5 			8	$ ".2QR 	
,2
,(
&80G GT6U6 6UrO: O0D	 DNyi yx(i (r)   