Ë
    ›7šh–  ã                  ó|   — d Z ddlmZ ddlZddlmZ ddlmZ ddlm	Z	m
Z
 ddlmZ ddlmZ ddlmZ  G d	„ d
«      Zy)z`Represents a wheel file and provides access to the various parts of the
name that have meaning.
é    )ÚannotationsN)ÚIterable©ÚTag)ÚBuildTagÚparse_wheel_filename)ÚInvalidWheelFilename)Ú
deprecatedc                  ó�   — e Zd ZdZ ej
                  dej                  «      Zd
d„Ze	dd„«       Z
dd„Zdd„Z	 	 	 	 	 	 dd„Zdd„Zy	)Ú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)$c                óø  ‡‡— || _         |  d | _        	 t        |«      }|\  | _        }| _        | _        t        |«      | _        y # t        $ �r)}| j                  j                  |«      }|st        |j                  d   «      d ‚t        d|›d|j                  d   › d�ddd¬«       |j                  d	«      j                  d
d«      | _        |j                  d«      j                  d
d«      | _        |j                  d«      j                  d«      }|j                  d«      j                  d«      Š|j                  d«      j                  d«      Št!        ˆˆfd„|D «       «      | _        Y d }~y d }~ww xY w)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.3iŠ2  )ÚreasonÚreplacementÚgone_inÚissueÚnameÚ_ú-ÚverÚpyverú.ÚabiÚplatc              3  óV   •K  — | ]   }‰D ]  }‰D ]  }t        |||¬ «      –— Œ Œ Œ" y­w))Úinterpreterr   ÚplatformNr   )Ú.0Úpyr   r   ÚabisÚplatss       €€ú_/var/www/html/w1hd-tracker/send/venv/lib/python3.12/site-packages/pip/_internal/models/wheel.pyú	<genexpr>z!Wheel.__init__.<locals>.<genexpr>F   sO   øè ø€ ò 'àØò'ð Ø!ò	'ð ô  ¨°d×;Ð;ð'Ø;ð'Ø;ñ'ùs   ƒ&))ÚfilenameÚ
_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__zWheel.__init__   sg  ù€ Ø ˆŒñ 	Ø+/ˆŒð%	Ü-¨hÓ7ˆJØCMÑ@ˆDŒI�x ¤°$´.Ü˜x›=ˆD�LøÜ-ó !	à $× 9Ñ 9× ?Ñ ?ÀÓ IÐÙ$Ü*¨1¯6©6°!©9Ó5¸4Ð?äà% h \ð 2Oà—v‘v˜a‘y�k ð'ð
,ð Øõð *×/Ñ/°Ó7×?Ñ?ÀÀSÓIˆDŒIØ,×2Ñ2°5Ó9×AÑAÀ#ÀsÓKˆDŒLð +×0Ñ0°Ó9×?Ñ?ÀÓDˆJØ$×*Ñ*¨5Ó1×7Ñ7¸Ó<ˆDØ%×+Ñ+¨FÓ3×9Ñ9¸#Ó>ˆEÜ&ô 'à$ô'ó ˆD�N‰Nûð9!	ús   ”1A Á
E9ÁDE4Å4E9c                óV  — | j                   �| j                   S | j                  j                  | j                  «      }|€J d«       ‚|j	                  d«      }t        j                  d|«      }|€J d«       ‚|j                  «       }t        |d   «      |d   f| _         | j                   S )Nz!guaranteed by filename validationÚbuildz^(\d+)(.*)$r   é   )r$   r)   r*   r#   r,   ÚreÚgroupsÚint)r0   r4   Ú	build_tagr*   Úbuild_tag_groupss        r!   r=   zWheel.build_tagM   sª   € à�?‰?Ð&Ø—?‘?Ð"ð !×5Ñ5×;Ñ;¸D¿M¹MÓJÐØ Ð,ÐQÐ.QÓQÐ,Ø%×+Ñ+¨GÓ4ˆ	Ü—‘˜¨Ó3ˆØÐ ÐEÐ"EÓEÐ Ø Ÿ<™<›>ÐÜÐ/°Ñ2Ó3Ð5EÀaÑ5HÐIˆŒà�‰Ðó    c                ó:   — t        d„ | j                  D «       «      S )z4Return the wheel's tags as a sorted list of strings.c              3  ó2   K  — | ]  }t        |«      –— Œ y ­w©N)r&   )r   Útags     r!   r"   z0Wheel.get_formatted_file_tags.<locals>.<genexpr>_   s   è ø€ Ò9 3”c˜#—hÑ9ùs   ‚)Úsortedr%   )r0   s    r!   Úget_formatted_file_tagszWheel.get_formatted_file_tags]   s   € äÑ9¨$¯.©.Ô9Ó9Ð9r?   c                ón   ‡ — 	 t        ˆ fd„t        |«      D «       «      S # t        $ r t        «       ‚w xY 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.
        c              3  óF   •K  — | ]  \  }}|‰j                   v sŒ|–— Œ y ­wrB   )r%   )r   ÚiÚtr0   s      €r!   r"   z*Wheel.support_index_min.<locals>.<genexpr>o   s    øè ø€ ÒM™d˜a ¸¸d¿n¹nÒ9LœÑMùs   ƒ!š!)ÚnextÚ	enumerateÚStopIterationÚ
ValueError©r0   Útagss   ` r!   Úsupport_index_minzWheel.support_index_mina   s4   ø€ ð	ÜÓM¤i°£oÔMÓMÐMøÜò 	Ü“,Ðð	ús   ƒ   4c                ó@   ‡— t        ˆfd„| j                  D «       «      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.
        c              3  ó2   •K  — | ]  }|‰v sŒ‰|   –— Œ y ­wrB   © )r   rC   Útag_to_prioritys     €r!   r"   z0Wheel.find_most_preferred_tag.<locals>.<genexpr>„   s"   øè ø€ ò 
Ø%(¸cÀ_Ò>TˆO˜CÕ ñ
ùs   ƒ	�
)Úminr%   )r0   rO   rT   s     `r!   Úfind_most_preferred_tagzWheel.find_most_preferred_tags   s#   ø€ ô" ó 
Ø,0¯N©Nô
ó 
ð 	
r?   c                ó:   — | j                   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%   Ú
isdisjointrN   s     r!   Ú	supportedzWheel.supportedˆ   s   € ð
 —>‘>×,Ñ,¨TÓ2Ð2Ð2r?   N)r#   r&   ÚreturnÚNone)rZ   r   )rZ   z	list[str])rO   ú	list[Tag]rZ   r<   )rO   r\   rT   zdict[Tag, int]rZ   r<   )rO   zIterable[Tag]rZ   Úbool)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r:   ÚcompileÚVERBOSEr)   r6   Úpropertyr=   rE   rP   rV   rY   rS   r?   r!   r   r      sj   „ Ùà%˜2Ÿ:™:ð	ð 	�
‰
ó	Ðó-ð^ òó ðó:óð$
Øð
Ø0>ð
à	ó
ô*3r?   r   )ra   Ú
__future__r   r:   Úcollections.abcr   Úpip._vendor.packaging.tagsr   Úpip._vendor.packaging.utilsr   r   r	   r(   Úpip._internal.exceptionsÚpip._internal.utils.deprecationr
   r   rS   r?   r!   ú<module>rk      s4   ðñõ #ã 	Ý $å *ß Fõõ :Ý 6÷y3ò y3r?   