관리-도구
편집 파일: _musllinux.cpython-39.pyc
a ��Re � @ st d Z ddlZddlZddlZddlZddlZddlZddlZddlZddl m Z mZmZm Z mZ e e eeedf d�dd�Ze e e e d�d d �ZG dd� de�Zee e d �dd�Ze�� ee e d�dd��Zeee d�dd�Zedk�rpddlZe�� Ze�d��sJ d��ede� edeej�� eddd� ee� dde�!d d!�d" ��D ]Z"ee"d#d� �q\dS )$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�returnc C s t �|| �t �|���S �N)�struct�unpack�read�calcsize)r r � r ��/builddir/build/BUILDROOT/alt-python39-pip-21.3.1-2.el8.x86_64/opt/alt/python39/lib/python3.9/site-packages/pip/_vendor/packaging/_musllinux.py�_read_unpacked s r )r r c C sh | � d� zt| d�}W n tjy. Y dS 0 |dd� td�krHdS | � t�d�d� zdd d �|d \}}}W n ty� Y dS 0 tj|� }zt| |�\}}}}}}} W n tjy� Y dS 0 t | d �D ]�} | � ||| � z|t| |��\}}} W n tj�y Y dS 0 |dk�r,q�| � |� t �| �| ��� d�}d |v�r\ dS | S dS )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� s ELF�HHI� )�IIIIHHH�IIIIIIII)r r r )�QQQIHHH�IIQQQQQQ)r � � )r r � � �musl)�seekr r �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�interpreterr r r �_parse_ld_musl_from_elf sF �� r7 c @ s e Zd ZU eed<