� ��^i& ���ddlZddlZddlmZmZdeefd�Zdeefd�Zdeefd�Zdeeeffd�Z dS)�N)�Optional�Tuple�returnc�:�t��p t��S)z9Returns glibc version string, or None if not using glibc.)�glibc_version_string_confstr�glibc_version_string_ctypes����/builddir/build/BUILDROOT/alt-python311-pip-21.3.1-4.el8.x86_64/opt/alt/python311/lib/python3.11/site-packages/pip/_internal/utils/glibc.py�glibc_version_stringr s�� '� )� )� J�-H�-J�-J�Jr c��tjdkrdS tjd�����\}}n#t t tf$rYdSwxYw|S)z@Primary implementation of glibc_version_string using os.confstr.�win32N�CS_GNU_LIBC_VERSION)�sys�platform�os�confstr�split�AttributeError�OSError� ValueError)�_�versions r rrsm��  �|�w����t���Z� 5�6�6�<�<�>�>� ��7�7�� �G�Z� 0�����t�t����� �Ns�)>�A�Ac�� ddl}n#t$rYdSwxYw|�d��} |j}n#t$rYdSwxYw|j|_|��}t|t��s|� d��}|S)z=Fallback implementation of glibc_version_string using ctypes.rN�ascii) �ctypes� ImportError�CDLL�gnu_get_libc_versionr�c_char_p�restype� isinstance�str�decode)r�process_namespacer� version_strs r rrs����� � � � �� �����t�t������ � �D�)�)���0�E���� �����t�t����� $*�?�� �&�&�(�(�K� �k�3� '� '�2�!�(�(��1�1� � �s�� ��6� A�Ac�.�t��}|�dSd|fS)z�Try to determine the glibc version Returns a tuple of strings (lib, version) which default to empty strings in case the lookup fails. N)�r(�glibc)r )� glibc_versions r �libc_verr+Ns%�� )�*�*�M����x���'�'r ) rr�typingrrr#r rrr+r r r �r-s��� � � � � � � � �"�"�"�"�"�"�"�"�K�h�s�m�K�K�K�K� �h�s�m�����"�X�c�]�����^ (�%��S��/� (� (� (� (� (� (r