Ë
    j»  ã                   ót   — d Z ddlZddlmZmZmZ ddlmZ ddl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.
é    N)ÚDictÚIterableÚList)ÚTag)ÚInvalidWheelFilename)Úparse_wheel_filename)Ú
deprecatedc                   ó¼   — e Zd ZdZ ej
                  dej                  «      Zdeddfd„Z	de
e   fd„Zde
e   defd	„Zde
e   d
eeef   defd„Zdee   def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)$ÚfilenameÚreturnNc                 óT  — | j                   j                  |«      }|st        |› d�«      ‚|| _        |j	                  d«      j                  dd«      | _        |j	                  d«      }d|v r	 t        |«       |j                  dd«      }|| _        |j	                  d«      | _        |j	                  d«      j                  d«      | _        |j	                  d«      j                  d«      | _        |j	                  d«      j                  d«      | _        | j                  D ���ch c]1  }| j                  D ]   }| j                   D ]  }t#        |||«      ’Œ Œ" Œ3 c}}}| _        y# t        $ r.}t        d|›d|j                  d   › d	�d
dd¬«       Y d}~�Œ!d}~ww xY wc c}}}w )zX
        :raises InvalidWheelFilename: when the filename is invalid for a wheel
        z is not a valid wheel filename.ÚnameÚ_Ú-ÚverzWheel filename zU is not correctly normalised. Future versions of pip will raise the following error:
r   z

zvto rename the wheel to use a correctly normalised name (this may require updating the version in the project metadata)z25.1iŠ2  )ÚreasonÚreplacementÚgone_inÚissueNÚbuildÚpyverÚ.ÚabiÚplat)Úwheel_file_reÚmatchr   r   ÚgroupÚreplacer   r   ÚPackagingInvalidWheelNamer	   ÚargsÚversionÚ	build_tagÚsplitÚ
pyversionsÚabisÚplatsr   Ú	file_tags)Úselfr   Ú
wheel_infoÚ_versionÚeÚxÚyÚzs           úc/var/www/html/sergio/sergio-backend/venv/lib/python3.12/site-packages/pip/_internal/models/wheel.pyÚ__init__zWheel.__init__   s�  € ð ×'Ñ'×-Ñ-¨hÓ7ˆ
ÙÜ&¨(¨Ð3RÐ'SÓTÐTØ ˆŒØ×$Ñ$ VÓ,×4Ñ4°S¸#Ó>ˆŒ	Ø×#Ñ# EÓ*ˆØ�(‰?ðÜ$ XÔ.ð"  ×'Ñ'¨¨SÓ1ˆHàˆŒØ#×)Ñ)¨'Ó2ˆŒØ$×*Ñ*¨7Ó3×9Ñ9¸#Ó>ˆŒØ×$Ñ$ UÓ+×1Ñ1°#Ó6ˆŒ	Ø×%Ñ% fÓ-×3Ñ3°CÓ8ˆŒ
ð #'§/¢/õ
Ù"1˜Q¸4¿9¼9°aÈdÏjÌjÈŒC��1�a�LÈjˆL¸9ˆL /ó
ˆ�øô3 -ò Üà)¨(¨ð 6SàŸ6™6 !™9˜+ Tð+ð
0ð #Ø÷ó ûðüô2
s   Á/E) Ä(6F#Å)	F Å2#FÆF 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)Ústr)Ú.0Útags     r0   Ú	<genexpr>z0Wheel.get_formatted_file_tags.<locals>.<genexpr>H   s   è ø€ Ð9©. 3”c˜#—h©.ùs   ‚)Úsortedr(   )r)   s    r0   Úget_formatted_file_tagszWheel.get_formatted_file_tagsF   s   € äÑ9¨$¯.ª.Ó9Ó9Ð9ó    Útagsc                 ó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r4   )r(   )r6   ÚiÚtr)   s      €r0   r8   z*Wheel.support_index_min.<locals>.<genexpr>X   s!   øè ø€ ÐM¡o™d˜a ¸¸d¿n¹nÒ9Lœ¡oùs   ƒ!š!)ÚnextÚ	enumerateÚStopIterationÚ
ValueError©r)   r<   s   ` r0   Úsupport_index_minzWheel.support_index_minJ   s4   ø€ ð	ÜÓM¤i°¤oÓMÓMÐMøÜò 	Ü“,Ðð	ús   ƒ   4Útag_to_priorityc                 ó@   ‡— 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r4   © )r6   r7   rG   s     €r0   r8   z0Wheel.find_most_preferred_tag.<locals>.<genexpr>m   s!   øè ø€ ð 
Ù,: S¸cÀ_Ò>TˆO˜CÕ ©Nùs   ƒ	�
)Úminr(   )r)   r<   rG   s     `r0   Úfind_most_preferred_tagzWheel.find_most_preferred_tag\   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(   Ú
isdisjointrE   s     r0   Ú	supportedzWheel.supportedq   s   € ð
 —>‘>×,Ñ,¨TÓ2Ð2Ð2r;   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚreÚcompileÚVERBOSEr   r5   r1   r   r:   r   ÚintrF   r   rL   r   ÚboolrO   rJ   r;   r0   r   r      sž   „ Ùà�B—J‘Jð	ð 	�
‰
ó	€Mð(
 ð (
¨ó (
ðT:¨¨c©ó :ð d¨3¡ið °Có ð$
Ø˜‘Ið
Ø04°S¸#°X±ð
à	ó
ð*3˜h s™mð 3°ô 3r;   r   )rS   rT   Útypingr   r   r   Úpip._vendor.packaging.tagsr   Úpip._vendor.packaging.utilsr   r    r   Úpip._internal.exceptionsÚpip._internal.utils.deprecationr	   r   rJ   r;   r0   Ú<module>r^      s4   ðñó 
ß 'Ñ 'å *õõ =å 9Ý 6÷d3ò d3r;   