HEX
Server: Microsoft-IIS/10.0
System: Windows NT ITPWINWEBSVR22 10.0 build 20348 (Windows Server 2022) AMD64
User: www.conferencesearch.co.uk (0)
PHP: 8.3.30
Disabled: NONE
Upload Files
File: D:/Python311/Lib/site-packages/pip/_internal/utils/__pycache__/wheel.cpython-311.pyc
�

�mit���dZddlZddlmZddlmZddlmZmZddl	m
Z
ddlmZdZ
eje��Zd	ed
edeeeffd�Zd
ed
edefd�Zd
ededefd�Zd
ededefd�Zdedeedffd�Zdeedfd
eddfd�ZdS)z/Support functions for working with wheel files.�N)�Message)�Parser)�
BadZipFile�ZipFile)�canonicalize_name)�UnsupportedWheel)�r�	wheel_zip�name�returnc���	t||��}t||��}t|��}n&#t$r}t|�d|�����d}~wwxYwt	||��||fS)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�check_compatibility)r
r�info_dir�metadata�version�es      �;D:\Python311\Lib\site-packages\pip/_internal/utils/wheel.py�parse_wheelrs���D�&�y�$�7�7��!�)�X�6�6����)�)�����D�D�D��$�B�B�q�B�B�C�C�C�����D�������&�&�&��X��s�/2�
A�A�A�sourcec��d�|���D��}d�|D��}|std���t|��dkr5td�d�|�������|d}t|��}t|��}|�|��std|�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|]}|�dd��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, rz.dist-info directory z does not start with )�namelistr�len�format�joinr�
startswith)rr�subdirs�	info_dirsr�
info_dir_name�canonical_names       rrr$s���>�=�6�?�?�+<�+<�=�=�=�G�@�@�G�@�@�@�I��A��?�@�@�@�
�9�~�~���
��7�>�>�t�y�y��?S�?S�T�T�
�
�	
���|�H�%�h�/�/�M�&�t�,�,�N��#�#�N�3�3�
��W�H�W�W�^�W�W�
�
�	
��Or �pathc��	|�|��S#tttf$r}t	d|�d|�����d}~wwxYw)Nzcould not read z file: )�readr�KeyError�RuntimeErrorr)rr.rs   r�read_wheel_metadata_filer3Cse��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}td|�d|�����d}~wwxYwt	���|��S)ziReturn the WHEEL metadata of an extracted wheel, if possible.
    Otherwise, raise UnsupportedWheel.
    z/WHEELzerror decoding z: N)r3�decode�UnicodeDecodeErrorrr�parsestr)rr4r.�wheel_contents�
wheel_textrs      rrrLs����#�#�#�D�-�f�d�;�;�N�B�#�*�*�,�,�
�
���B�B�B��@��@�@�1�@�@�A�A�A�����B�����8�8���Z�(�(�(s�,�
A�A�A�
wheel_data.c��|d}|�td���|���}	ttt|�d������S#t$rtd|�����wxYw)zbGiven WHEEL metadata, return the parsed Wheel-Version.
    Otherwise, raise UnsupportedWheel.
    z
Wheel-VersionNzWHEEL is missing Wheel-Version�.zinvalid Wheel-Version: )r�strip�tuple�map�intr�
ValueError)r;�version_textrs   rrr_s����o�.�L��A��?�@�@�@�� � �"�"�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$�$Brc�b�|dtdkrItd�|d�t	t
|���������|tkrCt�dd�t	t
|������dSdS)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
    rzB{}'s Wheel-Version ({}) is not compatible with this version of pipr=z*Installing from a newer Wheel-Version (%s)N)�VERSION_COMPATIBLErr'r(r@�str�logger�warning)rrs  rrros����q�z�&�q�)�)�	
��
��V�D�#�(�(�3�s�G�+<�+<�"=�"=�>�>�
�
�	
�
�%�	%�
����8��H�H�S��g�&�&�'�'�	
�	
�	
�	
�	
�
�
r )�__doc__�logging�
email.messager�email.parserr�zipfilerr�pip._vendor.packaging.utilsr�pip._internal.exceptionsrrE�	getLogger�__name__rGrFr?rr�bytesr3rrArr�r r�<module>rTs���5�5�����!�!�!�!�!�!�������'�'�'�'�'�'�'�'�9�9�9�9�9�9�5�5�5�5�5�5���
��	�8�	$�	$���7��#��%��W��2E�����$���s��s�����>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