
    q"h                     |    S r SSKrSSKJrJrJrJr  SSKJr  SSK	J
r
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.
    N)DictIterableListOptionalTag)BuildTagparse_wheel_filename)InvalidWheelFilename)
deprecatedc                       \ rS rSrSr\R                  " S\R                  5      rS\	SS4S jr
\S\4S j5       rS\\	   4S	 jrS
\\   S\4S jrS
\\   S\\\4   S\4S jrS
\\   S\4S jrSrg)Wheel   z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                   ^^ Xl         U   S U l         [        U5      nUu  U l        o0l        U l        [        U5      U l        g ! [         Ga-  nU R                  R                  U5      nU(       d  [        UR                  S   5      S e[        SU< SUR                  S    S3SSSS9  UR                  S	5      R                  S
S5      U l        UR                  S5      R                  S
S5      U l        UR                  S5      R                  S5      nUR                  S5      R                  S5      mUR                  S5      R                  S5      m[!        UU4S jU 5       5      U l         S nAg S nAff = f)Nr   zWheel filename zU is not correctly normalised. Future versions of pip will raise the following error:
z

zvto rename the wheel to use a correctly normalised name (this may require updating the version in the project metadata)z25.3i2  )reasonreplacementgone_inissuename_-verpyver.abiplatc           	   3   `   >#    U  H#  nT  H  nT  H  n[        XUS 9v   M     M     M%     g7f))interpreterr   platformNr   ).0pyr   r   abisplatss       L/var/www/html/env/lib/python3.13/site-packages/pip/_internal/models/wheel.py	<genexpr>!Wheel.__init__.<locals>.<genexpr>D   s;      '$BC!D d; " < <$s   +.)r   
_build_tagr
   r   	file_tagsstrversion_PackagingInvalidWheelFilenamelegacy_wheel_file_rematchr   argsr   groupreplacesplit	frozenset)	selfr   
wheel_info_versionelegacy_wheel_info
pyversionsr$   r%   s	          @@r&   __init__Wheel.__init__   sc     	.2%	-h7JCM@DIx$.x=DL- !	 $ 9 9 ? ? I$*166!954?%h\ 2Ovvayk'
,  *//7??SIDI,2259AA#sKDL +009??DJ$**5177<D%++F399#>E& '$' DNN9!	s   0A E<D#E77E<c                 ^   U R                   b  U R                   $ U R                  R                  U R                  5      nUc   S5       eUR	                  S5      n[
        R                  " SU5      nUc   S5       eUR                  5       n[        US   5      US   4U l         U R                   $ )Nz!guaranteed by filename validationbuildz^(\d+)(.*)$r      )r)   r.   r/   r   r1   regroupsint)r5   r9   	build_tagr/   build_tag_groupss        r&   rC   Wheel.build_tagK   s    ??&??" !55;;DMMJ ,Q.QQ,%++G4	3 E"EE  <<>/235Ea5HI    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+   )r"   tags     r&   r'   0Wheel.get_formatted_file_tags.<locals>.<genexpr>]   s     9.3c#hh.s   )sortedr*   )r5   s    r&   get_formatted_file_tagsWheel.get_formatted_file_tags[   s    9$..999rF   tagsc                 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rI   )r*   )r"   itr5   s      r&   r'   *Wheel.support_index_min.<locals>.<genexpr>m   s      Modadnn9Los   &	&)next	enumerateStopIteration
ValueErrorr5   rO   s   ` r&   support_index_minWheel.support_index_min_   s4    	MioMMM 	,	s   ! 6tag_to_priorityc                 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rI    )r"   rJ   r\   s     r&   r'   0Wheel.find_most_preferred_tag.<locals>.<genexpr>   s!      
,:S_>T OC Ns   	)minr*   )r5   rO   r\   s     `r&   find_most_preferred_tagWheel.find_most_preferred_tagq   s#    "  
,0NN
 
 	
rF   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*   
isdisjointrY   s     r&   	supportedWheel.supported   s    
 >>,,T222rF   )r)   r*   r   r   r,   )__name__
__module____qualname____firstlineno____doc__r@   compileVERBOSEr.   r+   r;   propertyr	   rC   r   rM   r   rB   rZ   r   rb   r   boolrf   __static_attributes__r_   rF   r&   r   r      s    ::	 	

	- - -^ 8  :c :d3i C $
I
04S#X
	
*3hsm 3 3rF   r   )rl   r@   typingr   r   r   r   pip._vendor.packaging.tagsr   pip._vendor.packaging.utilsr	   r
   r   r-   pip._internal.exceptionspip._internal.utils.deprecationr   r   r_   rF   r&   <module>rw      s4    
 1 1 * F : 6y3 y3rF   