OwlCyberSecurity - MANAGER
Edit File: wheel.cpython-312.pyc
� "��g� � � � d Z ddlZddlmZ ddlmZ ddlmZ ddlm Z m Z ddlmZ ddl mZ d Z ej e� Zd e dedeeef fd �Zde dedefd�Zde dedefd�Zde dedefd�Zdedeedf fd�Zdeedf deddfd�Zy)z0Support functions for working with wheel files. � N)�Message)�Parser)�Tuple)� BadZipFile�ZipFile)�canonicalize_name)�UnsupportedWheel)� r � wheel_zip�name�returnc � � t | |� }t | |� }t |� }t ||� ||fS # t $ r}t |� d|� �� �d}~ww xY w)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 �H/opt/hc_python/lib/python3.12/site-packages/pip/_internal/utils/wheel.py�parse_wheelr sl � �D�&�y�$�7��!�)�X�6����)�� ���&��X���� � D��$��'>�q�c�B�C�C��D�s �#5 � A�A�A�sourcec � � | j � D �ch c] }|j dd� d �� }}|D �cg c] }|j d� s�|�� }}|st d� �t |� dkD r)t dj dj |� � � �|d }t |� }t |� }|j |� st d|�d |��� �|S c c}w c c}w ) 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. �/r r 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 �len�format�joinr � startswith) r r �p�subdirs�s� info_dirsr � info_dir_name�canonical_names r r r &