ó
    ÂÜh†
  ã            
      óà  • S r SSKJr  SSKrSSKrSSKrSSKrSSKJrJ	r	J
r
  SSKJr   " S S\	5      rSS	 jr\R                  SS
 j5       rSS jr\S:X  a—  SSKr\R(                  " 5       r\R-                  S5      (       d   S5       e\" S\5        \" S\" \R0                  5      5        \" SSS9  \" \R2                  " SS\R5                  SS5      S   5      5       H
  r\" \SS9  M     gg)z�PEP 656 support.

This module implements logic to detect if the currently running Python is
linked against musl, and what musl version is used.
é    )ÚannotationsN)ÚIteratorÚ
NamedTupleÚSequenceé   )ÚELFFilec                  ó*   • \ rS rSr% S\S'   S\S'   Srg)Ú_MuslVersioné   ÚintÚmajorÚminor© N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__annotations__Ú__static_attributes__r   ó    Ú6/usr/lib/python3/dist-packages/packaging/_musllinux.pyr
   r
      s   ‡ ØƒJØ†Jr   r
   c                óZ  • S U R                  5        5        Vs/ s H  o(       d  M  UPM     nn[        U5      S:  d  US   S S S:w  a  g [        R                  " SUS   5      nU(       d  g [	        [        UR                  S5      5      [        UR                  S5      5      S9$ s  snf )	Nc              3  ó@   #   • U  H  oR                  5       v •  M     g 7f)N)Ústrip)Ú.0Úns     r   Ú	<genexpr>Ú&_parse_musl_version.<locals>.<genexpr>   s   é € Ð@Ò,? qŸ™Ÿ˜Ò,?ùs   ‚é   r   é   ÚmuslzVersion (\d+)\.(\d+)r   )r   r   )Ú
splitlinesÚlenÚreÚmatchr
   r   Úgroup)Úoutputr   ÚlinesÚms       r   Ú_parse_musl_versionr*      s�   € Ù@¨F×,=Ñ,=Ô,?Ô@ÓFÒ@�1ÃA�QÑ@€EÐFÜ
ˆ5ƒz�Aƒ~˜˜q™ " 1˜¨Ó/ØÜ
�ŠÐ(¨%°©(Ó3€AÞØÜœc !§'¡'¨!£*›o´S¸¿¹À»³_ÑEÐEùò Gs
   š
B(¨B(c                ó8  •  [        U S5       n[        U5      R                  nSSS5        Wb  SU;  a  g[        R                  " U/[        R                  SS9n[        UR                  5      $ ! , (       d  f       NR= f! [        [        [
        4 a     gf = f)aD  Detect currently-running musl runtime version.

This is done by checking the specified executable's dynamic linking
information, and invoking the loader to parse its output for a version
string. If the loader is musl, the output would be something like::

    musl libc (x86_64)
    Version 1.2.2
    Dynamic Program Loader
ÚrbNr!   T)ÚstderrÚtext)Úopenr   ÚinterpreterÚOSErrorÚ	TypeErrorÚ
ValueErrorÚ
subprocessÚrunÚPIPEr*   r-   )Ú
executableÚfÚldÚprocs       r   Ú_get_musl_versionr;   !   s€   € ðÜ�*˜dÔ# qÜ˜“×'Ñ'ˆB÷ $ð 
�z�V 2Ó%ØÜ�>Š>˜2˜$¤z§¡¸TÑB€DÜ˜tŸ{™{Ó+Ð+÷ $Õ#ûä”Y¤
Ð+ó Ùðús-   ‚B ŽA0¤B Á0
A>Á:B Á>B ÂBÂBc              #  óÂ   #   • [        [        R                  5      nUc  gU  H8  n[        UR                  SS5       H  nSUR
                   SU SU 3v •  M     M:     g7f)aª  Generate musllinux tags compatible to the current platform.

:param archs: Sequence of compatible architectures.
    The first one shall be the closest to the actual architecture and be the part of
    platform tag after the ``linux_`` prefix, e.g. ``x86_64``.
    The ``linux_`` prefix is assumed as a prerequisite for the current platform to
    be musllinux-compatible.

:returns: An iterator of compatible musllinux tags.
NéÿÿÿÿÚ
musllinux_Ú_)r;   Úsysr7   Úranger   r   )ÚarchsÚsys_muslÚarchr   s       r   Úplatform_tagsrE   8   s]   é € ô !¤§¡Ó0€HØÑØÛˆÜ˜8Ÿ>™>¨2¨rÖ2ˆEØ˜xŸ~™~Ð.¨a°¨w°a¸°vÐ>Ô>ó 3ò ùs   ‚AAÚ__main__zlinux-z	not linuxzplat:zmusl:ztags:Ú )Úendz[.-]r?   Ú-r=   z
      )r'   ÚstrÚreturnú_MuslVersion | None)r7   rJ   rK   rL   )rB   zSequence[str]rK   zIterator[str])Ú__doc__Ú
__future__r   Ú	functoolsr$   r4   r@   Útypingr   r   r   Ú_elffiler   r
   r*   Ú	lru_cacher;   rE   r   Ú	sysconfigÚget_platformÚplatÚ
startswithÚprintr7   ÚsubÚsplitÚtr   r   r   Ú<module>r[      sî   ðñõ #ã Û 	Û Û 
ß 1Ñ 1å ô�:ô ô
Fð ×Ñó,ó ð,ô,?ð& ˆzÓÛà×!Ò!Ó#€DØ�?‰?˜8×$Ñ$Ð1 kÓ1Ð$á	ˆ'�4ÔÙ	ˆ'Ñ$ S§^¡^Ó4Ô5Ù	ˆ'�sÒÙ˜2Ÿ6š6 '¨3°·
±
¸3ÀÓ0BÀ2Ñ0FÓGÖHˆÙˆa�ZÔ ò Ið r   