+
    Îit                         R t ^ RIt^ RIHt ^ RIHt ^ RIHtHt ^ RI	H
t
 ^ RIHt Rt]P                  ! ]4      tR R ltR	 R
 ltR R ltR R ltR R ltR R ltR# )z/Support functions for working with wheel files.N)Message)Parser)
BadZipFileZipFile)canonicalize_name)UnsupportedWheelc                ^    V ^8  d   QhR\         R\        R\        \        \        3,          /# )   	wheel_zipnamereturn)r   strtupler   )formats   "h/Users/ahmad/.openclaw/workspace/scripts/.venv/lib/python3.14/site-packages/pip/_internal/utils/wheel.py__annotate__r      s*      7 # %W2E     c                     \        W4      p\        W4      p\        V4      p\	        YA4       Y#3#   \         d   p\        T RT 24      hRp?ii ; i)zExtract information from the provided wheel, ensuring it meets basic
standards.

Returns the name of the .dist-info directory and the parsed WHEEL metadata.
z has an invalid wheel, N)wheel_dist_info_dirwheel_metadatawheel_versionr   check_compatibility)r
   r   info_dirmetadataversiones   &&    r   parse_wheelr      sd    D&y7!)6) &  D$'>qcBCCDs   !1 AAAc                <    V ^8  d   QhR\         R\        R\        /# )r	   sourcer   r   )r   r   )r   s   "r   r   r   $   s!       s s r   c                    V P                  4        Uu0 uF  q"P                  R^4      ^ ,          kK  	  ppV Uu. uF  qDP                  R4      '       g   K  VNK  	  ppV'       g   \        R4      h\	        V4      ^8  d*   \        RP                  RP                  V4      4      4      hV^ ,          p\        V4      p\        V4      pVP                  V4      '       g   \        RV: RV: 24      hV# u upi u upi )zReturns the name of the contained .dist-info directory.

Raises AssertionError or UnsupportedWheel if not found, >1 found, or
it doesn't match the provided name.
/z
.dist-infoz.dist-info directory not foundz)multiple .dist-info directories found: {}z, z.dist-info directory z does not start with )	namelistsplitendswithr   lenr   joinr   
startswith)	r   r   psubdirss	info_dirsr   info_dir_namecanonical_names	   &&       r   r   r   $   s     ,2??+<=+<awwsAq!!+<G=#@Gqzz,'?GI@?@@
9~7>>tyy?ST
 	
 |H%h/M&t,N##N33#H</D^DVW
 	
 O+ >@s   !C6C;C;c                <    V ^8  d   QhR\         R\        R\        /# )r	   r   pathr   )r   r   bytes)r   s   "r   r   r   C   s&     G GW GC GE Gr   c                      V P                  V4      #   \        \        \        3 d   p\	        R T: RT: 24      hRp?ii ; i)zcould not read z file: N)readr   KeyErrorRuntimeErrorr   )r   r.   r   s   && r   read_wheel_metadata_filer4   C   sJ    G{{4   ,/ GuEFFGs    A<Ac                <    V ^8  d   QhR\         R\        R\        /# )r	   r   dist_info_dirr   )r   r   r   )r   s   "r   r   r   L   s!     ) )7 )3 )7 )r   c                    V R2p\        W4      p VP                  4       p\	        4       P                  T4      #   \         d   p\        RT: RT: 24      hRp?ii ; i)zaReturn the WHEEL metadata of an extracted wheel, if possible.
Otherwise, raise UnsupportedWheel.
z/WHEELzerror decoding z: N)r4   decodeUnicodeDecodeErrorr   r   parsestr)r   r6   r.   wheel_contents
wheel_textr   s   &&    r   r   r   L   so     _F#D-f;NB#**,
 8Z((  B1%@AABs   ; AAAc                J    V ^8  d   QhR\         R\        \        R3,          /# )r	   
wheel_datar   .)r   r   int)r   s   "r   r   r   _   s&     F Fg F%S/ Fr   c                    V R,          pVf   \        R4      hVP                  4       p \        \        \        VP                  R4      4      4      #   \         d    \        RT: 24      hi ; i)zZGiven WHEEL metadata, return the parsed Wheel-Version.
Otherwise, raise UnsupportedWheel.
zWheel-VersionzWHEEL is missing Wheel-Version.zinvalid Wheel-Version: )r   stripr   mapr?   r"   
ValueError)r>   version_textr   s   &  r   r   r   _   ss     o.L?@@  "GFSgmmC0122 F!8DEEFs   'A A-c                N    V ^8  d   QhR\         \        R3,          R\        RR/# )r	   r   .r   r   N)r   r?   r   )r   s   "r   r   r   o   s)     
 
sCx 
 
 
r   c                (   V ^ ,          \         ^ ,          8  d9   \        RP                  VRP                  \	        \
        V 4      4      4      4      hV \         8  d6   \        P                  RRP                  \	        \
        V 4      4      4       R# R# )a  Raises errors or warns if called with an incompatible Wheel-Version.

pip should refuse to install a Wheel-Version that's a major series
ahead of what it's compatible with (e.g 2.0 > 1.1); and warn when
installing a version only minor version ahead (e.g 1.2 > 1.1).

version: a 2-tuple representing a Wheel-Version (Major, Minor)
name: name of wheel or package to raise exception about

:raises UnsupportedWheel: when an incompatible Wheel-Version is given
zB{}'s Wheel-Version ({}) is not compatible with this version of piprA   z*Installing from a newer Wheel-Version (%s)N)VERSION_COMPATIBLEr   r   r%   rC   r   loggerwarning)r   r   s   &&r   r   r   o   sv     qz&q))VD#((3sG+<"=>
 	
 
%	%8HHSg&'	
 
&r   )       )__doc__loggingemail.messager   email.parserr   zipfiler   r   pip._vendor.packaging.utilsr   pip._internal.exceptionsr   rH   	getLogger__name__rI   r   r   r4   r   r   r    r   r   <module>rW      sR    5  !  ' 9 5  
		8	$$>G)&F 
r   