
    )ih                    d    S r SSKJr  SSKJr  SSKJr  SSKJr	  SSKJ
r
  SSKJr   " S S5      rg	)
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                  V    \ rS rSrSrS
S jrSS jrSS jr      SS jrSS jr	Sr
g	)Wheel   zA wheel filec                    Xl          [        U5      nUu  U l        o@l        U l        [        U5      U l	        g ! [         a  n[        UR                  S   5      S eS nAff = f)Nr   )
filenamer   _PackagingInvalidWheelFilenamer   argsname	build_tag	file_tagsstrversion)selfr   
wheel_infoe_versions        Z/var/www/html/land-doc-ocr/venv/lib/python3.13/site-packages/pip/_internal/models/wheel.py__init__Wheel.__init__   s]     	<-h7J ?I;	8^T^8}	 . 	<&qvvay1t;	<s   9 
A!AA!c                :    [        S U R                   5       5      $ )z4Return the wheel's tags as a sorted list of strings.c              3  8   #    U  H  n[        U5      v   M     g 7fN)r   ).0tags     r   	<genexpr>0Wheel.get_formatted_file_tags.<locals>.<genexpr>"   s     9.3c#hh.s   )sortedr   )r   s    r   get_formatted_file_tagsWheel.get_formatted_file_tags    s    9$..999    c                r   ^   [        U 4S j[        U5       5       5      $ ! [         a    [        5       ef = f)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.
c              3  P   >#    U  H  u  pUTR                   ;   d  M  Uv   M     g 7fr   )r   )r   itr   s      r   r    *Wheel.support_index_min.<locals>.<genexpr>2   s      Modadnn9Los   &	&)next	enumerateStopIteration
ValueErrorr   tagss   ` r   support_index_minWheel.support_index_min$   s4    	MioMMM 	,	s   ! 6c                B   ^ [        U4S jU R                   5       5      $ )aX  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.
c              3  <   >#    U  H  oT;   d  M
  TU   v   M     g 7fr    )r   r   tag_to_prioritys     r   r    0Wheel.find_most_preferred_tag.<locals>.<genexpr>G   s!      
,:S_>T OC Ns   	)minr   )r   r0   r6   s     `r   find_most_preferred_tagWheel.find_most_preferred_tag6   s#    "  
,0NN
 
 	
r%   c                B    U R                   R                  U5      (       + $ )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   	supportedWheel.supportedK   s    
 >>,,T222r%   )r   r   r   r   r   N)r   r   returnNone)r?   z	list[str])r0   	list[Tag]r?   int)r0   rA   r6   zdict[Tag, int]r?   rB   )r0   zIterable[Tag]r?   bool)__name__
__module____qualname____firstlineno____doc__r   r#   r1   r9   r=   __static_attributes__r5   r%   r   r	   r	      s6    	%:$

0>
	
*3r%   r	   N)rH   
__future__r   collections.abcr   pip._vendor.packaging.tagsr   pip._vendor.packaging.utilsr   r   r   pip._internal.exceptionsr	   r5   r%   r   <module>rO      s,    # $ * = 9>3 >3r%   