File: //usr/local/lib/python3.10/dist-packages/pip/_internal/models/__pycache__/wheel.cpython-310.pyc
o
��h� � @ sv d Z ddlmZ ddlZddlmZ ddlmZ ddlm Z m
Z
ddlmZ ddl
mZ ddlmZ G d d
� d
�ZdS )z`Represents a wheel file and provides access to the various parts of the
name that have meaning.
� )�annotationsN)�Iterable��Tag)�BuildTag�parse_wheel_filename)�InvalidWheelFilename)�
deprecatedc @ s^ e Zd ZdZe�dej�Zddd�Ze dd
d��Z
dd
d�Zd dd�Zd!dd�Z
d"dd�ZdS )#�WheelzA wheel filez�^(?P<namever>(?P<name>[^\s-]+?)-(?P<ver>[^\s-]*?))
((-(?P<build>\d[^-]*?))?-(?P<pyver>[^\s-]+?)-(?P<abi>[^\s-]+?)-(?P<plat>[^\s-]+?)
\.whl|\.dist-info)$�filename�str�return�Nonec
s || _ | d | _zt|�}|\| _}| _| _t|�| _W d S ty� } zb| j� |�}|s5t
|jd �d �td|�d|jd � d�dddd� |�
d ��d
d�| _|�
d��d
d�| _|�
d
��d�}|�
d��d�� |�
d��d��t� �fdd�|D ��| _W Y d }~d S d }~ww )Nr zWheel filename zU is not correctly normalised. Future versions of pip will raise the following error:
z
zvto rename the wheel to use a correctly normalised name (this may require updating the version in the project metadata)z25.3i�2 )�reason�replacement�gone_in�issue�name�_�-�ver�pyver�.�abi�platc 3 s2 � | ]}� D ]}�D ]
}t |||d �V q
qqdS ))�interpreterr �platformNr )�.0�pyr r ��abis�plats� �E/usr/local/lib/python3.10/dist-packages/pip/_internal/models/wheel.py� <genexpr>F s � ����z!Wheel.__init__.<locals>.<genexpr>)r �
_build_tagr r � file_tagsr �version�_PackagingInvalidWheelFilename�legacy_wheel_file_re�matchr �argsr �group�replace�split� frozenset)�selfr �
wheel_info�_version�e�legacy_wheel_info�
pyversionsr"