관리-도구
편집 파일: wheel.cpython-312.pyc
� G��e� � � � 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 dj |t |� � � �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 �format�str�check_compatibility)r r �info_dir�metadata�version�es ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-1.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/utils/wheel.py�parse_wheelr sr � �S�&�y�$�7��!�)�X�6����)�� ���&��X���� � S��<�C�C�D�#�a�&�Q�R�R��S�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 dj ||� � �|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, z2.dist-info directory {!r} does not start with {!r}) �namelist�split�endswithr �lenr �joinr � startswith) r r �p�subdirs�s� info_dirsr � info_dir_name�canonical_names r r r &