Sindbad~EG File Manager

Current Path : /usr/local/lib/python3.12/site-packages/pip/_internal/models/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.12/site-packages/pip/_internal/models/__pycache__/wheel.cpython-312.pyc

�

4Μg��P�dZddlZddlmZmZmZddlmZddlm	Z	Gd�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��eZdZdZej
dej�Zdeddfd�Z	de
efd�Zde
ede
fd	�Zde
ed
eee
fde
fd�Zdeedefd�Zy)
�WheelzA 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��|jj|�}|st|�d���||_|j	d�jdd�|_|j	d�jdd�|_|j	d�|_|j	d�jd�|_
|j	d	�jd�|_|j	d
�jd�|_|jD���chc]1}|jD] }|jD]}t|||����"�3c}}}|_ycc}}}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�matchrr
�group�replacer
�version�	build_tag�split�
pyversions�abis�platsr�	file_tags)�selfr
�
wheel_info�x�y�zs      �E/usr/local/lib/python3.12/site-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��
�#'�/�/�
�"1�Q�4�9�9�a�d�j�j��C��1�a�L�j�L�9�L�/�
����
s�6Ec�:�td�|jD��S)z4Return the wheel's tags as a sorted list of strings.c3�2K�|]}t|����y�w�N)�str)�.0�tags  r&�	<genexpr>z0Wheel.get_formatted_file_tags.<locals>.<genexpr>/s����9�.�3�c�#�h�.�s�)�sortedr )r!s r&�get_formatted_file_tagszWheel.get_formatted_file_tags-s���9�$�.�.�9�9�9��tagsc�n��	t�fd�t|�D��S#t$rt��wxYw)a�Return the lowest index that one of the wheel's file_tag combinations
        achieves in the given list of supported tags.

        For example, if there are 8 supported tags and one of the file tags
        is first in the list, then return 0.

        :param tags: the PEP 425 tags to check the wheel against, in order
            with most preferred first.

        :raises ValueError: If none of the wheel's file tags match one of
            the supported tags.
        c3�F�K�|]\}}|�jvs�|���y�wr*)r )r,�i�tr!s   �r&r.z*Wheel.support_index_min.<locals>.<genexpr>?s!�����M�o�d�a���d�n�n�9L��o�s�!�!)�next�	enumerate�
StopIteration�
ValueError�r!r2s` r&�support_index_minzWheel.support_index_min1s4���	��M�i��o�M�M�M���	��,��	�s� �4�tag_to_priorityc�@��t�fd�|jD��S)a�Return the priority of the most preferred tag that one of the wheel's file
        tag combinations achieves in the given list of supported tags using the given
        tag_to_priority mapping, where lower priorities are more-preferred.

        This is used in place of support_index_min in some cases in order to avoid
        an expensive linear scan of a large list of tags.

        :param tags: the PEP 425 tags to check the wheel against.
        :param tag_to_priority: a mapping from tag to priority of that tag, where
            lower is more preferred.

        :raises ValueError: If none of the wheel's file tags match one of
            the supported tags.
        c3�2�K�|]}|�vs��|���y�wr*�)r,r-r=s  �r&r.z0Wheel.find_most_preferred_tag.<locals>.<genexpr>Ts!�����
�,:�S�c�_�>T�O�C� �N�s�	�
)�minr )r!r2r=s  `r&�find_most_preferred_tagzWheel.find_most_preferred_tagCs#���"�
�,0�N�N�
�
�	
r1c�:�|jj|�S)z�Return whether the wheel is compatible with one of the given tags.

        :param tags: the PEP 425 tags to check the wheel against.
        )r �
isdisjointr;s  r&�	supportedzWheel.supportedXs��
�>�>�,�,�T�2�2�2r1)�__name__�
__module__�__qualname__�__doc__�re�compile�VERBOSErr+r'rr0r�intr<rrBr�boolrEr@r1r&r	r	
s�����B�J�J�	�	�
�
�	�M�
��
��
�,:��c��:��d�3�i��C��$
���I�
�04�S�#�X��
�	�
�*3�h�s�m�3��3r1r	)rIrJ�typingrrr�pip._vendor.packaging.tagsr�pip._internal.exceptionsrr	r@r1r&�<module>rRs'���
�'�'�*�9�P3�P3r1

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists