Viewing File: /opt/imunify360/venv/lib/python3.11/site-packages/packaging/__pycache__/_musllinux.cpython-311.pyc



]j	
HdZddlZddlZddlZddlZddlmZmZmZddl	m
Z
GddeZded	eefd
Z
ejded	eefdZd
ed	eefdZedkrddlZejZeds
JdedeedeejeddeejddedddD]ZeeddSdS)zPEP 656 support.

This module implements logic to detect if the currently running Python is
linked against musl, and what musl version is used.
N)Iterator
NamedTupleOptional)ELFFilec$eZdZUeed<eed<dS)_MuslVersionmajorminorN)__name__
__module____qualname__int__annotations__t/builddir/build/BUILD/imunify360-venv-2.6.3/opt/imunify360/venv/lib/python3.11/site-packages/packaging/_musllinux.pyr	r	s"JJJJJJJJrr	outputreturncdd|DD}t|dks|ddddkrdStjd|d}|sdSt	t|dt|d	S)
Ncg|]}||Srr.0ns  r
<listcomp>z'_parse_musl_version.<locals>.<listcomp>sFFF1AFQFFFrc3>K|]}|VdS)N)striprs  r	<genexpr>z&_parse_musl_version.<locals>.<genexpr>s*@@q@@@@@@rrmuslzVersion (\d+)\.(\d+)r)r
r)
splitlineslenrematchr	rgroup)rlinesms   r_parse_musl_versionr)sFF@@F,=,=,?,?@@@FFFE
5zzA~~q"1"//t
(%(33Atc!''!**ooS__EEEEr
executablec6	t|d5}t|j}dddn#1swxYwYn#ttt
f$rYdSwxYw|d|vrdSt
j|gtjd}t|j
S)a`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)stderruniversal_newlines)openrinterpreterOSError	TypeError
ValueError
subprocessrunPIPEr)r-)r*fldprocs    r_get_musl_versionr:s
*d
#
#	(q'B	(	(	(	(	(	(	(	(	(	(	(	(	(	(	(Y
+tt	zV2%%t>2$z4PPPDt{+++s'?3?7?7?AAarchc#Kttj}|dSt|jddD]}d|jd|d|VdS)aTGenerate musllinux tags compatible to the current platform.

    :param arch: Should 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*rangerr
)r;sys_muslrs   r
platform_tagsrC6sr!00Hx~r2..;;:8>::E::D::::::;;r__main__zlinux-z	not linuxzplat:zmusl:ztags: )endz[.-]r?-r=z
      )__doc__	functoolsr$r4r@typingrrr_elffilerr	strr)	lru_cacher:rCr	sysconfigget_platformplat
startswithprintr*subsplittrrr<module>rVs				



1111111111:
FF(>FFFF,#,(<*@,,,,,
;
;

;
;
;
; z!9!##D??8$$11k11$	E'4	E'$$S^44555	E's
]626'3

30B0B20FGG
H
H!!
aZ     !!r
Back to Directory File Manager