Current File : //usr/lib/python3/dist-packages/pip/_internal/models/__pycache__/wheel.cpython-312.pyc |
�
/�g � �P � d Z ddlZddlmZmZmZ ddlmZ ddlm Z G d� d� Z
y)z`Represents a wheel file and provides access to the various parts of the
name that have meaning.
� N)�Dict�Iterable�List)�Tag)�InvalidWheelFilenamec � � e Zd ZdZ ej
dej � Zdeddfd�Z de
e fd�Zde
e de
fd �Zde
e d
eee
f de
fd�Zdee defd�Zy)
�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�returnNc � � | j j |� }|st |� d�� �|| _ |j d� j dd� | _ |j d� j dd� | _ |j d� | _ |j d� j d� | _
|j d � j d� | _ |j d
� j d� | _ | j D ���ch c]1 }| j D ] }| j D ] }t |||� �� �" �3 c}}}| _ yc c}}}w )zX
:raises InvalidWheelFilename: when the filename is invalid for a wheel
z is not a valid wheel filename.�name�_�-�ver�build�pyver�.�abi�platN)�
wheel_file_re�matchr r
�group�replacer
�version� build_tag�split�
pyversions�abis�platsr � file_tags)�selfr
�
wheel_info�x�y�zs �</usr/lib/python3/dist-packages/pip/_internal/models/wheel.py�__init__zWheel.__init__ s; � � �'�'�-�-�h�7�
��&�(��3R�'S�T�T� ��
��$�$�V�,�4�4�S�#�>�� � "�'�'��.�6�6�s�C�@���#�)�)�'�2���$�*�*�7�3�9�9�#�>����$�$�U�+�1�1�#�6�� ��%�%�f�-�3�3�C�8��
� #'�/�/�
�
��4�9�9�
�67�d�j�j�
�IJ�C��1�a�L�
��
��
����
s �6Ec �: � t d� | j D � � S )z4Return the wheel's tags as a sorted list of strings.c 3 �2 K � | ] }t |� �� � y �w�N)�str)�.0�tags r&