관리-도구
편집 파일: _musllinux.cpython-311.pyc
� ����l���fY������������� ��������H����d�Z�ddlZddlZddlZddlZddlmZmZmZ�ddl m Z ��G�d��de������������Zded ee���������fd �Z �ej����������������������ded ee���������fd���������������Zd ed ee���������fd�Zedk����r�ddlZ�ej����������������������Ze���������������������d������������s J�d����������������ede��������������ed�eej����������������������������������edd���������������e�ej��������dde���������������������dd������������d���������������������������������D�]Z�eed���������������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)�Iterator� NamedTuple�Optional����)�ELFFilec��������������������$�����e�Zd�ZU�eed<���eed<���dS�)�_MuslVersion�major�minorN)�__name__� __module__�__qualname__�int�__annotations__��������t/builddir/build/BUILD/imunify360-venv-2.5.2/opt/imunify360/venv/lib/python3.11/site-packages/packaging/_musllinux.pyr ���r ������s"�����������������J�J�J��J�J�J�J�Jr���r ����output�returnc����������������������d��d��|�������������������������������������D���������������D���������������}t����������|������������dk�����s|d���������d�d����������dk����rd�S�t����������j��������d|d���������������������}|sd�S�t ����������t����������|���������������������d������������������������t����������|���������������������d������������������������� ������������S�) Nc�����������������������g�|�]}|�|��S�r���r�����.0�ns��� r���� <listcomp>z'_parse_musl_version.<locals>.<listcomp>���s������F�F�F�1�A�F�Q�F�F�Fr���c��������������3����>���K����|�]}|������������������������������������V����d�S�)N)�stripr���s��� r���� <genexpr>z&_parse_musl_version.<locals>.<genexpr>���s*����������@�@�q������@�@�@�@�@�@r�������r��������muslzVersion (\d+)\.(\d+)r���)r ���r���)� splitlines�len�re�matchr ���r����group)r����lines�ms��� r����_parse_musl_versionr)������s�������F�F�@�@�F�,=�,=�,?�,?�@�@�@�F�F�F�E� �5�z�z�A�~�~��q��"�1�"���/�/��t� ��(�%��(�3�3�A�����t��c�!�'�'�!�*�*�o�o�S�������_�_�E�E�E�Er���� executablec������������������6���� �t����������|�d������������5�}t����������|������������j��������}ddd�������������n#�1�swxY�w�Y���n#�t����������t����������t ����������f$�r�Y�dS�w�xY�w|�d|vrdS�t ����������j��������|gt����������j��������d�������������}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 �rbNr!���T)�stderr�universal_newlines)�openr����interpreter�OSError� TypeError� ValueError� subprocess�run�PIPEr)���r-���)r*����f�ld�procs��� r����_get_musl_versionr:������s�������� �*�d� #� #�� (�q�����'�B� (�� (�� (�� (�� (�� (�� (�� (�� (�� (�� (����� (�� (�� (�� (����Y� �+��������t�t����� �z�V�2�%�%��t��>�2�$�z��4�P�P�P�D��t�{�+�+�+s'����?��3�?��7�?��7�?��A�A�archc��������������#�������K����t����������t����������j��������������������}|�dS�t����������|j��������dd������������D�]}d|j����������d|��d|����V����dS�)aT��Generate 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:����sysr*����ranger���r ���)r;����sys_muslr���s��� r���� platform_tagsrC���6���sr�����������!���0�0�H������x�~�r�2�.�.��;��;��:�8�>�:�:�E�:�:�D�:�:�:�:�:�:�;��;r����__main__zlinux-z not linuxzplat:zmusl:ztags:� )�endz[.-]r?����-r=���z )�__doc__� functoolsr$���r4���r@����typingr���r���r����_elffiler���r ����strr)���� lru_cacher:���rC���r���� sysconfig�get_platform�plat� startswith�printr*����sub�split�tr���r���r����<module>rV������s���������������� � � � ���������� � � � ��1��1��1��1��1��1��1��1��1��1����������������������:������� F���F���(>��F��F��F��F�������,�#��,�(�<�*@��,��,��,����,�, ;��� ;��� �� ;�� ;�� ;�� ;� ��z�������!�9�!�#�#�D��?�?�8�$�$�1�1�k�1�1�$� �E�'�4���� �E�'�$�$�S�^�4�4�5�5�5� �E�'�s����� �]�6�2�6�'�3�� � �3��0B�0B�2�0F�G�G� H� H��!��!�� ��a�Z� � � � � ����!��!r���