+
     hW   c                   sV   ^ RI t^ RIt^ RIt^ RIt^ RIHt ^ RIH	t	H
t
HtHtHtHtHtHtHt ^ RIHt ^ RIHtHt ^ RIHt ^ RIHt ^ RIHtHt ^ R	IHtH t H!t!H"t" ^ R
I#H$t$ ^ RI%H&t& ^ RI'H(t( ^ RI)H*t*H+t+ ^RI,H-t-H.t.H/t/  ! R R]P`                  Pb                  4      t2 ! R R]4      t1R# )i    N)PathLike)	
CollectionDictIterableIteratorMappingOptionalSequenceUnioncast)Requirement)NormalizedNamecanonicalize_nameVersion)parse)InvalidWheelUnsupportedWheel)BaseDistributionBaseEntryPointInfoPathWheel)normalize_path)get_requirement)TempDirectory)parse_wheelread_wheel_metadata_file)BasePathget_dist_canonical_name*parse_name_and_version_from_info_directoryc                   s   a  ] tR t^*t o RtV 3R lR lt]V 3R lR l4       tV 3R lR ltV 3R lR	 lt	V 3R
 lR lt
RtV tR# )WheelDistributiona  An ``importlib.metadata.Distribution`` read from a wheel.

Although ``importlib.metadata.PathDistribution`` accepts ``zipfile.Path``,
its implementation is too "lazy" for pip's needs (we can't keep the ZipFile
handle open for the entire lifetime of the distribution object).

This implementation eagerly reads the entire metadata directory into the
memory instead, and operates from that.
c                sh   < V ^8  d   QhRS[ S[P                  S[3,          RS[P                  RR/# )   filesinfo_locationreturnN)r   pathlibPurePosixPathbytesZformat__classdict__   "L/usr/lib/python3.14/site-packages/pip/_internal/metadata/importlib/_dists.py__annotate__WheelDistribution.__annotate__5   s?     + +w,,e34+ ,,+ 
	+    c                s    Wn         W n        R # N_filesr!   )selfr    r!   s   &&&r)   __init__ZWheelDistribution.__init__5   s    
 *r,   c                sD   < V ^8  d   QhRS[ P                  RS[RS[RR/# )r   zfnamelocationr"   r   )zipfileZZipFilestrr&   r(   r)   r*   r+   >   s7     ) )OO) ) 	)
 
)r,   c           	     s   a
 \        W4      w  o
pV
3R  lVP                  4        4       pV UUu/ uF  w  rgV\        W4      bK  	  ppp\        P                  ! VS
4      p	V ! W4      # u uppi )c              3   s   <"   T FP  pVP                  S R 24      '       g   K  V\        P                  ! VP                  R ^4      R,          4      3x  KR  	  R# 5i)Z/Ni)Z
startswithr#   r$   Zsplit).0r3   info_dir   & r)   	<genexpr>Z1WheelDistribution.from_zipfile.<locals>.<genexpr>E   sM      
%(1~. BT7((C);B)?@A%s
   A7A)r   Znamelistr   r#   r$   )clsr2   r3   r4   Z_ZpathsZfullpathZrelpathr    r!   r8   s   &&&&      @r)   from_zipfileZWheelDistribution.from_zipfile=   s|     ""+!

 &+
%*! -b;;%* 	 
  --hA5((
s   A(c                sJ   < V ^8  d   QhRS[ RS[S[P                  ,          /# r   pathr"   )r   r   r#   r$   r&   r(   r)   r*   r+   Q   s&     & &H &'2G2G)H &r,   c                s    \         P                  ! \        V4      4      V P                  9   d   \	        V P                  4      # \        V4      hr-   )r#   r$   r6   r/   ZiterFileNotFoundErrorr0   r>      &&r)   iterdirZWheelDistribution.iterdirQ   s7      T+t{{:$$%%r,   c                s6   < V ^8  d   QhRS[ RS[S[ ,          /# )r   filenamer"   )r6   r   r&   r(   r)   r*   r+   W   s      # (3- r,   c                s    V P                   \        P                  ! V4      ,          p TP	                  R4      pT#   \         d     R # i ; i  \
         d3   pT P                  P                  pRT RT RT R2p\        T4      hR p?ii ; i)Nzutf-8zError decoding metadata for z: z in z file)	r/   r#   r$   ZKeyErrorZdecodeZUnicodeDecodeErrorr!   parentr   )r0   rC   ZdataZtextewheelZerrors   &&     r)   	read_textZWheelDistribution.read_textW   s    	;;w44X>?D	*;;w'D
   		 " 	*&&--E25'A3d8*ERE"5))	*s&   '= A AAB-BBc                sN   < V ^8  d   QhRS[ S[R3,          RS[P                  /# )r   r>   zPathLike[str]r"   )r   r6   r#   Pathr&   r(   r)   r*   r+   d   s)     " "c?&: ; " "r,   c                s    \         hr-   )ZNotImplementedErrorr@   rA   r)   locate_fileZWheelDistribution.locate_filed   s
     "!r,   r.   N)__name__
__module____qualname____firstlineno__Z__doc__r1   classmethodr<   rB   rG   rI   __static_attributes____classdictcell__r'      @r)   r   r   *   sF     + + ) )&& & " "r,   r   c                   s  a  ] tR t^jt o V 3R lR lt]V 3R lR l4       t]V 3R lR l4       t]V 3R lR l4       t]	V 3R	 lR
 l4       t
]	V 3R lR l4       t]	V 3R lR l4       t]	V 3R lR l4       t]	V 3R lR l4       t]	V 3R lR l4       tV 3R lR ltV 3R lR ltV 3R lR ltV 3R lR ltV 3R lR ltV 3R lR  ltR%V 3R! lR" lltR#tV tR$# )&Distributionc                sx   < V ^8  d   QhRS[ P                  P                  RS[S[,          RS[S[,          RR/# )r   distr!   installed_locationr"   N)	importlibmetadatarS   r   r   r&   r(   r)   r*   Distribution.__annotate__k   sI     6 6  --6  )6 %X.	6
 
6r,   c                s*    Wn         W n        W0n        R # r-   _dist_info_location_installed_location)r0   rT   r!   rU   s   &&&&r)   r1   ZDistribution.__init__k   s     
+#5 r,   c                &   < V ^8  d   QhRS[ RS[/# )r   	directoryr"   )r6   r   r&   r(   r)   r*   rX   v   s     > >s >/? >r,   c                s    \         P                  ! V4      p\        P                  P                  P                  V4      pV ! W2VP                  4      # r-   )r#   rH   rV   rW   rS   atrD   )r;   r^   r!   rT   s   &&  r)   from_directoryZDistribution.from_directoryu   s?    Y/!!..11-@4(<(<==r,   c                s2   < V ^8  d   QhRS[ RS[RS[RS[/# )r   metadata_contentsrC   project_namer"   )r%   r6   r   r&   r(   r)   r*   rX   |   s3     5 5 5 5 	5
 
5r,   c                s   \         P                  ! \        R RR7      P                  4      pVR,          pVP	                  V4       \
        P                  P                  P                  VP                  4      pV ! WeP                  R4      # )rW   T)ZkindZglobally_managedZMETADATAN)
r#   rH   r   r>   Zwrite_bytesrV   rW   rS   r_   rD   )r;   ra   rC   rb   Ztemp_dirZmetadata_pathrT   s   &&&&   r)   from_metadata_file_contentsZ(Distribution.from_metadata_file_contents{   sr     <<zDAFF
 !:-!!"34!!..11-2F2FG4--t44r,   c                s,   < V ^8  d   QhRS[ RS[RS[/# )r   rF   r3   r"   )r   r6   r   r&   r(   r)   r*   rX      s(     T Tu TC T4D Tr,   c                sx    VP                  4       ;_uu_ 4       p\        P                  W2VP                  4      pR R R 4       T ! XTP                  \        P                  ! TP                  4      4      #   + '       g   i     LB; i  \        P
                   d   p\        TP                  T4      ThR p?ii ; ir-   )
Z
as_zipfiler   r<   r4   r5   Z
BadZipFiler   r!   r#   r$   )r;   rF   r3   r2   rT   rE   s   &&&   r)   
from_wheelZDistribution.from_wheel   s    	<!!##r(55bO $ 4++W-B-B5>>-RSS	 $#!! 	<u~~t4!;	<s3   B !A5B 5B	 B B B9B44B9c                0   < V ^8  d   QhRS[ S[,          /# r   r"   r   r6   r&   r(   r)   r*   rX      s     / /(3- /r,   c                s`    V P                   f   R # \        V P                   P                  4      # r-   )r[   r6   rD   r0      &r)   r4   ZDistribution.location   s(    &4&&--..r,   c                re   rf   rg   r&   r(   r)   r*   rX      s     ( (x} (r,   c                sL    V P                   f   R # \        V P                   4      # r-   )r[   r6   rh   ri   r)   r!   ZDistribution.info_location   s"    &4&&''r,   c                re   rf   rg   r&   r(   r)   r*   rX      s     = =HSM =r,   c                s^    V P                   f   R # \        \        V P                   4      4      # r-   )r\   r   r6   rh   ri   r)   rU   ZDistribution.installed_location   s'    ##+c$":":;<<r,   c                    < V ^8  d   QhRS[ /# rf   )r   r&   r(   r)   r*   rX      s     3 3 3r,   c                s,    \        V P                  4      # r-   )r   rZ   rh   ri   r)   canonical_nameZDistribution.canonical_name   s    &tzz22r,   c                rj   rf   r   r&   r(   r)   r*   rX      s     1 1 1r,   c                s    \        V P                  4      ^,          ;p'       d   \        V4      # \        V P                  P                  4      # )i   )r   rZ   parse_versionversion)r0   rm      & r)   rm   ZDistribution.version   s;    @LQOO7O ))TZZ//00r,   c                rj   rf   )r6   r&   r(   r)   r*   rX      s     " "S "r,   c                .    V P                   P                  # r-   )rZ   rm   rh   ri   r)   raw_versionZDistribution.raw_version   s    zz!!!r,   c                r]   r=   )r   Zboolr&   r(   r)   r*   rX      s     ; ;H ; ;r,   c                sN    V P                   P                  \        V4      4      R J# r-   )rZ   rG   r6   r@   rA   r)   is_fileZDistribution.is_file   s     zz##CI.d::r,   c                re   rf   )r   r6   r&   r(   r)   r*   rX      s      Xc] r,   c              #  s   "   \        V P                  \        P                  4      '       g   R # V P                  P	                  R4      P                  4        F  pVP                  x  K  	  R # 5i)NZscripts)Z
isinstancer[   r#   rH   ZjoinpathrB   r3   )r0   Zchildrn   r)   iter_distutils_script_namesZ(Distribution.iter_distutils_script_names   sP      $--w||<<((11)<DDFE** Gs   A-A/c                r]   r=   )r   r6   r&   r(   r)   r*   rX      s      h 3 r,   c                sl    V P                   P                  \        V4      4      pVf   \        V4      hV# r-   )rZ   rG   r6   r?   )r0   r>   Zcontents   && r)   rG   ZDistribution.read_text   s/    **&&s4y1?#D))r,   c                re   rf   )r   r   r&   r(   r)   r*   rX      s     ' '8N#; 'r,   c                ro   r-   )rZ   Zentry_pointsrh   ri   r)   iter_entry_pointsZDistribution.iter_entry_points   s    zz&&&r,   c                sH   < V ^8  d   QhRS[ P                  P                  /# rf   )emailmessageMessager&   r(   r)   r*   rX      s!     @ @ 5 5 @r,   c                sr    \        \        P                  P                  V P                  P
                  4      # r-   )r	   rt   ru   rv   rZ   rW   rh   ri   r)   _metadata_implZDistribution._metadata_impl   s%     EMM))4::+>+>??r,   c                re   rf   )r   r   r&   r(   r)   r*   rX      s     
 
h~&> 
r,   c                sv    V P                   P                  R . 4       Uu. uF  p\        V4      NK  	  up# u upi )zProvides-Extra)rW   get_allr   )r0   extrarn   r)   iter_provided_extrasZ!Distribution.iter_provided_extras   s@     ../?D
D e$D
 	
 
s   6c                sF   < V ^8  d   QhRS[ S[,          RS[S[,          /# )r   extrasr"   )r   r6   r   r
   r&   r(   r)   r*   rX      s$      
3 +AV r,   c              #  s  a"   V Uu. uF  pR V/NK	  	  ppV P                   P                  R. 4       F  p\        VP                  4       4      oSP                  '       g   Sx  K4  V'       g*   SP                  P                  R R/4      '       d   Sx  Ke  \        ;QJ d    V3R lV 4       F  '       g   K   RM	  RM! V3R lV 4       4      '       g   K  Sx  K  	  R# u upi 5i)ry   zRequires-DistZ c              3   sZ   <"   T F   pSP                   P                  V4      x  K"  	  R # 5ir-   )markerevaluate)r7   Zcontextreqr9   r)   r:   Z1Distribution.iter_dependencies.<locals>.<genexpr>   s#     JgSZZ((11s   (+TFN)rW   rx   r   Zstripr|   r}   Zany)r0   r{   rE   ZcontextsZ
req_stringr~   s   &&   @r)   iter_dependenciesZDistribution.iter_dependencies   s     DJ-KFqwlF-K--//DJ "*"2"2"45C:::	

 3 3WbM B B	JJJJJJ	 E .Ls.   C)C$AC)/"C)C)#C):C)C)rY   N) )rJ   rK   rL   rM   r1   rN   r`   rc   rd   Zpropertyr4   r!   rU   rk   rm   rp   rq   rr   rG   rs   rw   rz   r   rO   rP   rQ   rR   r)   rS   rS   j   s    6 6 > >
 5 5  T T / /
 ( (
 = =
 3 3 1 1
 " "; ;  ' '@ @
 
  r,   rS   )3Zemail.messagert   Zimportlib.metadatarV   r#   r5   Zosr    Ztypingr   r   r   r   r   r   r   r   r	   Z"pip._vendor.packaging.requirementsr
   Zpip._vendor.packaging.utilsr   r   Zpip._vendor.packaging.versionr   r   rl   Zpip._internal.exceptionsr   r   Zpip._internal.metadata.baser   r   r   r   Zpip._internal.utils.miscr   Zpip._internal.utils.packagingr   Zpip._internal.utils.temp_dirr   Zpip._internal.utils.wheelr   r   Z_compatr   r   r   rW   rS   r   r   r,   r)   <module>r      s~        
 
 
 ; I 1 @ C  4 9 6 K ="	**77 ="@z# zr,   