관리-도구
편집 파일: _musllinux.cpython-38.pyc
U ʗ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��std��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-python38-pip-22.2.1-2.el8.x86_64/opt/alt/python38/lib/python3.8/site-packages/pip/_vendor/packaging/_musllinux.py�_read_unpacked s r )r r c C sp | � d� zt| d�}W n tjk r0 Y dS X |dd� td�krJdS | � t�d�d� zdd d �|d \}}}W n tk r� Y dS X tj|� }zt| |�\}}}}}}} W n tjk r� Y dS X t | d �D ]�} | � ||| � z|t| |��\}}} W n tjk �r& Y dS X |dk�r4q�| � |� t �| �| ��� d�}d |k�rd 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<