HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //opt/osm/venv/lib/python3.10/site-packages/pip/_internal/models/__pycache__/wheel.cpython-310.pyc
o

5ih�@s^dZddlmZddlmZddlmZddlmZ	ddlm
Z
ddlmZGdd�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@sBeZdZdZddd�Zdd	d
�Zddd�Zddd�Zddd�ZdS)�WheelzA wheel file�filename�str�return�Nonec
Cs\||_zt|�}Wnty}zt|jd�d�d}~ww|\|_}|_|_t|�|_	dS)Nr)
rr�_PackagingInvalidWheelFilenamer�args�name�	build_tag�	file_tagsr	�version)�selfr�
wheel_info�e�_version�r�H/opt/osm/venv/lib/python3.10/site-packages/pip/_internal/models/wheel.py�__init__s��zWheel.__init__�	list[str]cCstdd�|jD��S)z4Return the wheel's tags as a sorted list of strings.css�|]}t|�VqdS�N)r	��.0�tagrrr�	<genexpr>"s�z0Wheel.get_formatted_file_tags.<locals>.<genexpr>)�sortedr�rrrr�get_formatted_file_tags szWheel.get_formatted_file_tags�tags�	list[Tag]�intcs2zt�fdd�t|�D��WStyt��w)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.
        c3s"�|]\}}|�jvr|VqdSr)r)r�i�tr rrr2s� z*Wheel.support_index_min.<locals>.<genexpr>)�next�	enumerate�
StopIteration�
ValueError�rr"rr r�support_index_min$s

�zWheel.support_index_min�tag_to_priority�dict[Tag, int]cst�fdd�|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.
        c3s �|]}|�vr�|VqdSrrr�r-rrrGs��z0Wheel.find_most_preferred_tag.<locals>.<genexpr>)�minr)rr"r-rr/r�find_most_preferred_tag6s�zWheel.find_most_preferred_tag�
Iterable[Tag]�boolcCs|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�
isdisjointr+rrr�	supportedKszWheel.supportedN)rr	r
r)r
r)r"r#r
r$)r"r#r-r.r
r$)r"r2r
r3)	�__name__�
__module__�__qualname__�__doc__rr!r,r1r5rrrrrs



rN)
r9�
__future__r�collections.abcrZpip._vendor.packaging.tagsrZpip._vendor.packaging.utilsrrr�pip._internal.exceptionsrrrrr�<module>s