+
    i
              
         R t ^ RIHt ^ RIt^ RIt^ RIt^ RIt^ RIHtH	t	H
t
 ^RIHt  ! R R]	4      tR R lt]P                  R	 R
 l4       tR R lt]R8X  d   ^ RIt]P(                  ! 4       t]P-                  R4      '       g   Q R4       h]! R]4       ]! R]! ]P0                  4      4       ]! RRR7       ]! ]P2                  ! RR]P5                  R^4      R,          4      4       F  t]! ]RR7       K  	  R# R# )zPEP 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                  ,    ] tR t^t$ R]R&   R]R&   RtR# )_MuslVersionintmajorminor N)__name__
__module____qualname____firstlineno____annotations____static_attributes__r       g/home/wkmabra/.openclaw/workspace/venv/lib/python3.14/site-packages/pip/_vendor/packaging/_musllinux.pyr   r      s    JJr   r   c                    V ^8  d   QhRRRR/# )   outputstrreturn_MuslVersion | Noner   )formats   "r   __annotate__r      s     F F F(; Fr   c                   R  V P                  4        4        Uu. uF  q'       g   K  VNK  	  pp\        V4      ^8  g   V^ ,          R,          R8w  d   R# \        P                  ! RV^,          4      pV'       g   R# \	        \        VP                  ^4      4      \        VP                  ^4      4      R7      # u upi )c              3  @   "   T F  qP                  4       x  K  	  R # 5i)N)strip).0ns   & r   	<genexpr>&_parse_musl_version.<locals>.<genexpr>   s     @,?q,?s   :N   NmuslNzVersion (\d+)\.(\d+))r
   r   )
splitlineslenrematchr   r	   group)r   r!   linesms   &   r   _parse_musl_versionr-      s    @F,=,=,?@F@1AQQ@EF
5zA~q"/
(%(3Ac!''!*oS_EE Gs
   	B<B<c                    V ^8  d   QhRRRR/# )r   
executabler   r   r   r   )r   s   "r   r   r   "   s     , ,# ,*= ,r   c                ^    \        V R4      ;_uu_ 4       p\        V4      P                  pRRR4       Xe   RT9  d   R# \        P                  ! T.R\        P                  RR7      p\        TP                  4      #   + '       g   i     L[; i  \        \        \
        3 d     R# i ; i)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-   r3   )r/   fldprocs   &   r   _get_musl_versionr@   !   s    *d##q''B $ 
zV2%>>2$eJOO$ODt{{++ $#Y
+ s-   B A?B ?B	
B B B,+B,c                    V ^8  d   QhRRRR/# )r   archszSequence[str]r   zIterator[str]r   )r   s   "r   r   r   8   s     ? ? ?= ?r   c              #     "   \        \        P                  4      pVf   R# V  F8  p\        VP                  RR4       F  pRVP
                   RV RV 2x  K  	  K:  	  R# 5i)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@   sysr/   ranger   r
   )rB   sys_muslarchr   s   &   r   platform_tagsrK   8   s]      !0H8>>2r2Ex~~.awav>> 3 s   A A"__main__zlinux-z	not linuxzplat:zmusl:ztags: )endz[.-]rE   -z
      rF   )__doc__
__future__r   	functoolsr(   r:   rG   typingr   r   r   _elffiler   r   r-   	lru_cacher@   rK   r   	sysconfigget_platformplat
startswithprintr/   subsplittr   r   r   <module>r^      s    #  	  
 1 1 : 
F , ,,?& z!!#D??8$$1k1$	'4	'$S^^45	's266'3

30B20FGHaZ  I r   