§
    
Á³gÅ  ã                   ó&  — d Z ddlZ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	Z ej        e¦  «        Zd
e
dedeeef         fd„Zde
dedefd„Zde
dedefd„Zde
dedefd„Zdedeedf         fd„Zdeedf         deddfd„ZdS )z0Support functions for working with wheel files.
é    N)ÚMessage)ÚParser)ÚTuple)Ú
BadZipFileÚZipFile)Úcanonicalize_name)ÚUnsupportedWheel)é   r   Ú	wheel_zipÚnameÚreturnc           	      ó  — 	 t          | |¦  «        }t          | |¦  «        }t          |¦  «        }nB# t          $ r5}t          d                     |t          |¦  «        ¦  «        ¦  «        ‚d}~ww xY wt          ||¦  «         ||fS )z©Extract 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	   ÚformatÚstrÚcheck_compatibility)r   r   Úinfo_dirÚmetadataÚversionÚes         úW/var/www/html/mpstechhub/venv/lib/python3.11/site-packages/pip/_internal/utils/wheel.pyÚparse_wheelr      sš   € ðSÝ& y°$Ñ7Ô7ˆÝ! )¨XÑ6Ô6ˆÝ Ñ)Ô)ˆˆøÝð Sð Sð SÝÐ<×CÒCÀDÍ#ÈaÉ&Ì&ÑQÔQÑRÔRÐRøøøøðSøøøõ ˜ Ñ&Ô&Ð&à�XÐÐs   ‚/2 ²
A1¼0A,Á,A1Úsourcec                 óÈ  — d„ |                       ¦   «         D ¦   «         }d„ |D ¦   «         }|st          d¦  «        ‚t          |¦  «        dk    r5t          d                     d                     |¦  «        ¦  «        ¦  «        ‚|d         }t          |¦  «        }t          |¦  «        }|                     |¦  «        s#t          d                     ||¦  «        ¦  «        ‚|S )	z®Returns 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.
    c                 óF   — h | ]}|                      d d¦  «        d         ’ŒS )ú/r
   r   )Úsplit)Ú.0Úps     r   ú	<setcomp>z&wheel_dist_info_dir.<locals>.<setcomp>-   s)   € Ð=Ð=Ð= aˆq�wŠw�s˜A‰Œ˜qÔ!Ð=Ð=Ð=ó    c                 ó<   — g | ]}|                      d ¦  «        ¯|‘ŒS )z
.dist-info)Úendswith)r    Úss     r   ú
<listcomp>z'wheel_dist_info_dir.<locals>.<listcomp>/   s)   € Ð@Ð@Ð@�q q§z¢z°,Ñ'?Ô'?Ð@�Ð@Ð@Ð@r#   z.dist-info directory not foundr
   z)multiple .dist-info directories found: {}z, r   z2.dist-info directory {!r} does not start with {!r})Únamelistr	   Úlenr   Újoinr   Ú
startswith)r   r   ÚsubdirsÚ	info_dirsr   Úinfo_dir_nameÚcanonical_names          r   r   r   &   sø   € ð >Ð=¨6¯?ª?Ñ+<Ô+<Ð=Ñ=Ô=€Gà@Ð@˜GÐ@Ñ@Ô@€Iàð AÝÐ?Ñ@Ô@Ð@å
ˆ9�~„~˜ÒÐÝØ7×>Ò>¸t¿yºyÈÑ?SÔ?SÑTÔTñ
ô 
ð 	
ð ˜Œ|€Hå% hÑ/Ô/€MÝ& tÑ,Ô,€NØ×#Ò# NÑ3Ô3ð 
ÝØ@×GÒGØ˜.ñô ñ
ô 
ð 	
ð €Or#   Úpathc                 ó–   — 	 |                       |¦  «        S # t          t          t          f$ r}t	          d|›d|›�¦  «        ‚d }~ww xY w)Nzcould not read z file: )Úreadr   ÚKeyErrorÚRuntimeErrorr	   )r   r0   r   s      r   Úread_wheel_metadata_filer5   G   se   € ðGØ�{Š{˜4Ñ Ô Ð øõ �¥,Ð/ð Gð Gð GÝÐE°ÐEÐEÀÐEÐEÑFÔFÐFøøøøðGøøøs   ‚ —A®AÁAÚdist_info_dirc                 óè   — |› d�}t          | |¦  «        }	 |                     ¦   «         }n'# t          $ r}t          d|›d|›�¦  «        ‚d}~ww xY wt	          ¦   «                              |¦  «        S )ziReturn the WHEEL metadata of an extracted wheel, if possible.
    Otherwise, raise UnsupportedWheel.
    z/WHEELzerror decoding z: N)r5   ÚdecodeÚUnicodeDecodeErrorr	   r   Úparsestr)r   r6   r0   Úwheel_contentsÚ
wheel_textr   s         r   r   r   P   s–   € ð Ð#Ð#Ð#€Då-¨f°dÑ;Ô;€NðBØ#×*Ò*Ñ,Ô,ˆ
ˆ
øÝð Bð Bð BÝÐ@°Ð@Ð@¸1Ð@Ð@ÑAÔAÐAøøøøðBøøøõ ‰8Œ8×Ò˜ZÑ(Ô(Ð(s   —, ¬
A¶AÁAÚ
wheel_data.c                 ó  — | d         }|€t          d¦  «        ‚|                     ¦   «         }	 t          t          t          |                     d¦  «        ¦  «        ¦  «        S # t          $ r t          d|›�¦  «        ‚w xY w)zbGiven WHEEL metadata, return the parsed Wheel-Version.
    Otherwise, raise UnsupportedWheel.
    zWheel-VersionNzWHEEL is missing Wheel-Versionú.zinvalid Wheel-Version: )r	   ÚstripÚtupleÚmapÚintr   Ú
ValueError)r=   Úversion_textr   s      r   r   r   c   s”   € ð ˜oÔ.€LØÐÝÐ?Ñ@Ô@Ð@à× Ò Ñ"Ô"€GðFÝ•S�˜gŸmšm¨CÑ0Ô0Ñ1Ô1Ñ2Ô2Ð2øÝð Fð Fð FÝÐD¸ÐDÐDÑEÔEÐEðFøøøs   ¯4A$ Á$Br   c                 ób  — | d         t           d         k    rIt          d                     |d                     t	          t
          | ¦  «        ¦  «        ¦  «        ¦  «        ‚| t           k    rCt                               dd                     t	          t
          | ¦  «        ¦  «        ¦  «         dS dS )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
    r   zB{}'s Wheel-Version ({}) is not compatible with this version of pipr?   z*Installing from a newer Wheel-Version (%s)N)ÚVERSION_COMPATIBLEr	   r   r*   rB   r   ÚloggerÚwarning)r   r   s     r   r   r   s   s§   € ð ˆq„zÕ& qÔ)Ò)Ð)Ýðß’V˜D #§(¢(­3­s°GÑ+<Ô+<Ñ"=Ô"=Ñ>Ô>ñ
ô 
ð 	
ð 
Õ%Ò	%Ð	%Ý�ŠØ8Ø�HŠH•S�˜gÑ&Ô&Ñ'Ô'ñ	
ô 	
ð 	
ð 	
ð 	
ð 
&Ð	%r#   )Ú__doc__ÚloggingÚemail.messager   Úemail.parserr   Útypingr   Úzipfiler   r   Úpip._vendor.packaging.utilsr   Úpip._internal.exceptionsr	   rG   Ú	getLoggerÚ__name__rH   r   r   r   Úbytesr5   r   rC   r   r   © r#   r   ú<module>rV      sÆ  ððð ð €€€Ø !Ð !Ð !Ð !Ð !Ð !Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø 'Ð 'Ð 'Ð 'Ð 'Ð 'Ð 'Ð 'à 9Ð 9Ð 9Ð 9Ð 9Ð 9à 5Ð 5Ð 5Ð 5Ð 5Ð 5àÐ ð 
ˆÔ	˜8Ñ	$Ô	$€ð˜7ð ¨#ð °%¸¸W¸Ô2Eð ð ð ð ð$ ð ¨sð °sð ð ð ð ðBG Wð G°Cð G¸Eð Gð Gð Gð Gð)˜7ð )°3ð )¸7ð )ð )ð )ð )ð&F˜gð F¨%°°S°¬/ð Fð Fð Fð Fð 
  s¨C x¤ð 
¸ð 
Àð 
ð 
ð 
ð 
ð 
ð 
r#   