ó
    ÷Þ jÖ
  ã            
      óü  • 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	  SSK
Jr  \(       a  SSKJr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\R1                  S5      (       d   S5       e\" S\5        \" S\" \R4                  5      5        \" SSS9  \" \R6                  " SS\R9                  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)ÚTYPE_CHECKINGÚ
NamedTupleé   )ÚELFFile)ÚIteratorÚSequencec                  ó*   • \ 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   ó    ÚN/var/www/html/gaurav/venv/lib/python3.13/site-packages/packaging/_musllinux.pyr   r      s   ‡ ØƒJØ†Jr   r   c                óX  • 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                ó:  •  [        U S5       n[        U5      R                  nSSS5        Wb  SU;  a  g[        R                  " U/S[        R                  SS9n[        UR                  5      $ ! , (       d  f       NS= 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"   FT)ÚcheckÚ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˜$ e´J·O±OÈ$ÑO€DÜ˜tŸ{™{Ó+Ð+÷ $Õ#ûä”Y¤
Ð+ó Ùðús-   ‚B ŽA1¤B Á1
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=   Úsysr9   Úranger   r   )ÚarchsÚsys_muslÚarchr   s       r   Úplatform_tagsrG   ;   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[.-]rA   Ú-r?   z
      )r(   ÚstrÚreturnú_MuslVersion | None)r9   rL   rM   rN   )rD   zSequence[str]rM   zIterator[str])Ú__doc__Ú
__future__r   Ú	functoolsr%   r6   rB   Útypingr   r   Ú_elffiler   Úcollections.abcr   r	   r   r+   Ú	lru_cacher=   rG   r   Ú	sysconfigÚget_platformÚplatÚ
startswithÚprintr9   ÚsubÚsplitÚtr   r   r   Ú<module>r^      sô   ðñõ #ã Û 	Û Û 
ß ,å æß2ô�:ô ô
Fð ×Ñó,ó ð,ô,?ð& ˆzÓÛà×!Ò!Ó#€DØ�?‰?˜8×$Ñ$Ð1 kÓ1Ð$á	ˆ'�4ÔÙ	ˆ'Ñ$ S§^¡^Ó4Ô5Ù	ˆ'�sÒÙ˜BŸFšF 7¨C°·±¸CÀÓ1CÀBÑ1GÓHÐIÖJˆÙˆa�ZÔ ò Kð r   