HEX
Server: LiteSpeed
System: Linux s1049.use1.mysecurecloudhost.com 4.18.0-477.27.2.lve.el8.x86_64 #1 SMP Wed Oct 11 12:32:56 UTC 2023 x86_64
User: xedaptot (3356)
PHP: 8.3.31
Disabled: NONE
Upload Files
File: //opt/saltstack/salt/lib/python3.10/site-packages/packaging/__pycache__/_manylinux.cpython-310.pyc
o

;jv%�@s�UddlZddlZddlZddlZddlZddlZddlZddlmZm	Z	m
Z
mZmZm
Z
mZddlmZmZmZmZdZdZdZejded	e	eeddffd
d��Zded	efd
d�Zded	efdd�Zdede
ed	efdd�Ze�dd��Zee e fe!d<Gdd�de�Z"d	eefdd�Z#d	eefdd�Z$d	eefdd�Z%ded	ee e ffd d!�Z&e�'�d	ee e ffd"d#��Z(d$ed%e"d	efd&d'�Z)d(d)d*d+�Z*de
ed	e
efd,d-�Z+dS).�N)�Dict�	Generator�Iterator�
NamedTuple�Optional�Sequence�Tuple�)�EIClass�EIData�ELFFile�EMachinel~ii�path�returnc
csb�zt|d��}t|�VWd�WdS1swYWdStttfy0dVYdSw)N�rb)�openr�OSError�	TypeError�
ValueError)r�f�r�H/opt/saltstack/salt/lib/python3.10/site-packages/packaging/_manylinux.py�
_parse_elfs�&��r�
executablecCsvt|��-}|duo(|jtjko(|jtjko(|jtj	ko(|j
t@tko(|j
t
@t
k	Wd�S1s4wYdS�N)r�capacityr
�C32�encodingr�Lsb�machiner
ZArm�flags�EF_ARM_ABIMASK�EF_ARM_ABI_VER5�EF_ARM_ABI_FLOAT_HARD�rrrrr�_is_linux_armhfs

�
�
���$�r%cCsZt|��}|duo|jtjko|jtjko|jtj	k	Wd�S1s&wYdSr)
rrr
rrrrrr
ZI386r$rrr�_is_linux_i686+s

�
�
�$�r&�archscs>d|vrt|�Sd|vrt|�Shd��t�fdd�|D��S)NZarmv7l�i686>Zriscv64Zppc64le�x86_64Zloongarch64Zppc64�aarch64Zs390xc3s�|]}|�vVqdSrr)�.0�arch�Z
allowed_archsrr�	<genexpr>Cs�z'_have_compatible_abi.<locals>.<genexpr>)r%r&�any)rr'rr-r�_have_compatible_abi5s	r0cCsdS)N�2rrrrr�<lambda>Ksr2�_LAST_GLIBC_MINORc@seZdZUeed<eed<dS)�
_GLibCVersion�major�minorN)�__name__�
__module__�__qualname__�int�__annotations__rrrrr4Ns
r4cCsFzt�d�}|dusJ�|��\}}W|Sttttfy"YdSw)zJ
    Primary implementation of glibc_version_string using os.confstr.
    �CS_GNU_LIBC_VERSIONN)�os�confstr�rsplit�AssertionError�AttributeErrorrr)Zversion_string�_�versionrrr�_glibc_version_string_confstrSs
��rDcCs�zddl}Wn
tyYdSwz|�d�}Wn
ty"YdSwz|j}Wn
ty2YdSw|j|_|�}t|t	�sD|�
d�}|S)zG
    Fallback implementation of glibc_version_string using ctypes.
    rN�ascii)�ctypes�ImportError�CDLLr�gnu_get_libc_versionrA�c_char_p�restype�
isinstance�str�decode)rFZprocess_namespacerI�version_strrrr�_glibc_version_string_ctypesfs(��
�

rPcCst�pt�S)z9Returns glibc version string, or None if not using glibc.)rDrPrrrr�_glibc_version_string�srQrOcCsBt�d|�}|st�d|��t�dSt|�d��t|�d��fS)a3Parse glibc version.

    We use a regexp instead of str.split because we want to discard any
    random junk that might come after the minor version -- this might happen
    in patched/forked versions of glibc (e.g. Linaro's version of glibc
    uses version strings like "2.20-2014.11"). See gh-3588.
    z$(?P<major>[0-9]+)\.(?P<minor>[0-9]+)z;Expected glibc version with 2 components major.minor, got: ����rSr5r6)�re�match�warnings�warn�RuntimeWarningr:�group)rO�mrrr�_parse_glibc_version�s��r[cCst�}|dur	dSt|�S)NrR)rQr[)rOrrr�_get_glibc_version�sr\r,rCcCs�t�}||kr	dSzddl}Wn
tyYdSwt|d�r4|�|d|d|�}|dur2t|�SdS|tdd�krEt|d�rEt|j�S|tdd	�krVt|d
�rVt|j�S|tdd�krgt|d�rgt|j	�SdS)
NFrT�manylinux_compatibler	���manylinux1_compatible��manylinux2010_compatible��manylinux2014_compatible)
r\�
_manylinuxrG�hasattrr]�boolr4r`rbrd)r,rCZ	sys_glibcre�resultrrr�_is_compatible�s.�






riZ
manylinux2014Z
manylinux2010Z
manylinux1))r^rc)r^ra)r^r_ccs�ttj|�s	dStdd�}t|�ddh@rtdd�}tt��}|g}t|jddd�D]}t|}|�	t||��q,|D]J}|D]E}|j|jkrM|j
}nd}t|j
|d�D]/}t|j|�}	d	j|	�}
t||	�rp|
�d
|��V|	t
vr�t
|	}t||	�r�|�d
|��VqVqAq=dS)a�Generate manylinux 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 manylinux-compatible.

    :returns: An iterator of compatible manylinux tags.
    Nr^�r)r(�r	rSzmanylinux_{}_{}rB)r0�sysrr4�setr\�ranger5r3�appendr6�formatri�_LEGACY_MANYLINUX_MAP)r'Ztoo_old_glibc2Z
current_glibcZglibc_max_listZglibc_majorZglibc_minorr,Z	glibc_maxZ	min_minorZ
glibc_version�tagZ
legacy_tagrrr�
platform_tags�s:�





����rs),�collections�
contextlib�	functoolsr=rTrlrV�typingrrrrrrrZ_elffiler
rrr
r!r"r#�contextmanagerrMrrgr%r&r0�defaultdictr3r:r;r4rDrPrQr[�	lru_cacher\rirqrsrrrr�<module>s>
$"
,�