HEX
Server: Microsoft-IIS/10.0
System: Windows NT ITPWINWEBSVR22 10.0 build 20348 (Windows Server 2022) AMD64
User: www.conferencesearch.co.uk (0)
PHP: 8.3.30
Disabled: NONE
Upload Files
File: D:/Python311/Lib/site-packages/pip/_internal/models/__pycache__/wheel.cpython-311.pyc
�

�mih��l�dZddlmZddlmZddlmZddlmZ	ddlm
Z
ddlmZGd�d��Zd	S)
z`Represents a wheel file and provides access to the various parts of the
name that have meaning.
�)�annotations)�Iterable)�Tag)�InvalidWheelFilename)�parse_wheel_filenamec�:�eZdZdZdd�Zdd�Zdd�Zdd�Zdd�ZdS)�WheelzA wheel file�filename�str�return�Nonec���||_	t|��}n-#t$r }t|jd��d�d}~wwxYw|\|_}|_|_t|��|_	dS)Nr)
r
r�_PackagingInvalidWheelFilenamer�args�name�	build_tag�	file_tagsr�version)�selfr
�
wheel_info�e�_versions     �<D:\Python311\Lib\site-packages\pip/_internal/models/wheel.py�__init__zWheel.__init__sz�� ��
�	<�-�h�7�7�J�J��-�	<�	<�	<�&�q�v�a�y�1�1�t�;�����	<����?I�;��	�8�T�^�T�^��8�}�}����s��
A�>�A�	list[str]c�>�td�|jD����S)z4Return the wheel's tags as a sorted list of strings.c3�4K�|]}t|��V��dS�N)r)�.0�tags  r�	<genexpr>z0Wheel.get_formatted_file_tags.<locals>.<genexpr>"s(����9�9�3�c�#�h�h�9�9�9�9�9�9�)�sortedr)rs r�get_formatted_file_tagszWheel.get_formatted_file_tags s!���9�9�$�.�9�9�9�9�9�9r"�tags�	list[Tag]�intc���	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�4�K�|]\}}|�jv�|V��dSr)r)r�i�trs   �rr!z*Wheel.support_index_min.<locals>.<genexpr>2s3�����M�M�d�a���d�n�9L�M��M�M�M�M�M�Mr")�next�	enumerate�
StopIteration�
ValueError�rr%s` r�support_index_minzWheel.support_index_min$sV���	��M�M�M�M�i��o�o�M�M�M�M�M�M���	�	�	��,�,��	���s	�'+�A�tag_to_priority�dict[Tag, int]c�D��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�0�K�|]}|�v��|V��dSr�)rr r2s  �rr!z0Wheel.find_most_preferred_tag.<locals>.<genexpr>GsF�����
�
�%(�c�_�>T�
��C� �
�
�
�
�
�
r")�minr)rr%r2s  `r�find_most_preferred_tagzWheel.find_most_preferred_tag6s?���"�
�
�
�
�,0�N�
�
�
�
�
�	
r"�
Iterable[Tag]�boolc�8�|j�|��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�
isdisjointr0s  r�	supportedzWheel.supportedKs��
�>�,�,�T�2�2�2�2r"N)r
rrr
)rr)r%r&rr')r%r&r2r3rr')r%r9rr:)	�__name__�
__module__�__qualname__�__doc__rr$r1r8r=r6r"rr	r	s~��������	%�	%�	%�	%�:�:�:�:�����$
�
�
�
�*3�3�3�3�3�3r"r	N)
rA�
__future__r�collections.abcr�pip._vendor.packaging.tagsr�pip._vendor.packaging.utilsrrr�pip._internal.exceptionsr	r6r"r�<module>rGs�����#�"�"�"�"�"�$�$�$�$�$�$�*�*�*�*�*�*�������=�<�<�<�<�<�9�9�9�9�9�9�>3�>3�>3�>3�>3�>3�>3�>3�>3�>3r"