File: D:/Python311/Lib/site-packages/pip/_internal/utils/__pycache__/wheel.cpython-311.pyc
�
�mit � � � d Z ddlZddlmZ ddlmZ ddlmZmZ ddl m
Z
ddlmZ dZ
ej e� � Zd ed
edeeef fd�Zd
ed
edefd�Zd
ededefd�Zd
ededefd�Zdedeedf fd�Zdeedf d
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}~ww xY wt ||� � ||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_wheelr s� � �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 � � }|st d� � �t |� � dk r5t d� d� |� � � � � � �|d }t |� � }t |� � }|� |� � st d|�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 �<