관리-도구
편집 파일: _musllinux.cpython-311.pyc
� ,�Re � � � d Z ddlZddlZddlZddlZddlZddlZddlZddlZddl m Z mZmZm Z mZ de e dedeedf fd�Zde e de e fd �Z G d � de� � Zdede e fd �Z ej � � dede e fd�� � Zdedee fd�Zedk r�ddlZ ej � � Ze� d� � s J d� � � ede� � ed eej � � � � edd�� � e ej dde�! dd� � d � � � � D ]Z" ee"d�� � �dS 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�return.c �v � t j || � t j |� � � � � � S �N)�struct�unpack�read�calcsize)r r s ��/builddir/build/BUILDROOT/alt-python311-setuptools-65.6.3-2.el8.x86_64/opt/alt/python311/lib/python3.11/site-packages/setuptools/_vendor/packaging/_musllinux.py�_read_unpackedr s* � ��=��a�f�f�V�_�S�%9�%9�:�:�;�;�;� c �b � | � d� � t | d� � }n# t j $ r Y dS w xY w|dd� t d� � k rdS | � t j d� � d� � dd d �|d \ }}}t j |� }n# t $ r Y dS w xY w t | |� � \ }}}}}}} n# t j $ r Y dS w xY wt | dz � � D ]�} | � ||| z z � � |t | |� � � � \ }}} n# t j $ r Y dS w xY w|dk r�Z| � |� � t j | � | � � � � � d� � }d |vr dS |c 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 �operator� itemgetter�KeyError�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�interpreters r �_parse_ld_musl_from_elfr: s$ � � �F�F�1�I�I�I���q�%�(�(�����<� � � ��t�t������R�a�R�y�E�*�%�%�%�%��t��F�F�6�?�5�!�!�1�%�%�%�,� 2�1� � � ��(����u�e� �#�U�+���� � � � ��t�t������4B�1�e�4L�4L�1��7�A�q�!�[�'�'���<� � � ��t�t����� �7�Q�;� � � � �� ���w��q��(�)�)�)� �).��~�a��/G�/G�)H�)H�&�F�H�h�h���|� � � ��4�4�4� �����Q�;�;�� ���x�����k�!�&�&��"2�"2�3�3�9�9�$�?�?����$�$��4�4������4sB �( �;�;�B( �( B6�5B6�:C �C&�%C&�D7�7E� Ec �$ � e Zd ZU eed<