ó
    �Rj‚  ã                   ó|   • 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.3iŠ2  )Ú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       €€ÚFD:\diplom_project\venv\Lib\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Ó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   “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×;Ñ;¸D¿M¹MÓJÐØ Ñ,ÐQÐ.QÓQÐ,Ø%×+Ñ+¨GÓ4ˆ	Ü—’˜¨Ó3ˆØÑ ÐEÐ"EÓEÐ Ø Ÿ<™<›>ÐÜÐ/°Ñ2Ó3Ð5EÀaÑ5HÐ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ª. 3”c˜#—h�hª.ù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    øé € ÐM¢o™d˜a¸¸d¿n¹nÑ9LŸ™¢oùs   ƒ&�	&)ÚnextÚ	enumerateÚStopIterationÚ
ValueError©r5   rO   s   ` r&   Úsupport_index_minÚWheel.support_index_min_   s4   ø€ ð	ÜÔM¤i°¤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Ó ˆO˜CÖ ªNùs   ƒ	�)Úminr*   )r5   rO   r\   s     `r&   Úfind_most_preferred_tagÚWheel.find_most_preferred_tagq   s#   ø€ ô" ô 
Ø,0¯NªNó
ó 
ð 	
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©ô :ð d¨3¡ið °Cô ð$
Ø˜‘Ið
Ø04°S¸#°X±ð
à	ô
ð*3˜h s™mð 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   