HEX
Server: LiteSpeed
System: Linux php-prod-1.spaceapp.ru 5.15.0-157-generic #167-Ubuntu SMP Wed Sep 17 21:35:53 UTC 2025 x86_64
User: sport3497 (1034)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //usr/local/lib/python3.10/dist-packages/pip/_internal/utils/__pycache__/glibc.cpython-310.pyc
o

��h��@sHddlmZddlZddlZddd�Zddd�Zdd	d
�Zddd
�ZdS)�)�annotationsN�return�
str | NonecCst�pt�S)z9Returns glibc version string, or None if not using glibc.)�glibc_version_string_confstr�glibc_version_string_ctypes�rr�D/usr/local/lib/python3.10/dist-packages/pip/_internal/utils/glibc.py�glibc_version_stringsr	c
CsTtjdkrdSzt�d�}|durWdS|��\}}W|Stttfy)YdSw)z@Primary implementation of glibc_version_string using os.confstr.�win32N�CS_GNU_LIBC_VERSION)�sys�platform�os�confstr�split�AttributeError�OSError�
ValueError)�gnu_libc_version�_�versionrrrrs

��rcCs�zddl}Wn
tyYdSwz|�d�}Wn
ty"YdSwz|j}Wn
ty2YdSw|j|_|�}t|t	�sD|�
d�}|S)z=Fallback implementation of glibc_version_string using ctypes.rN�ascii)�ctypes�ImportError�CDLLr�gnu_get_libc_versionr�c_char_p�restype�
isinstance�str�decode)r�process_namespacer�version_strrrrr s(��
�

r�tuple[str, str]cCst�}|dur	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_versionrrr�libc_ver\sr')rr)rr#)�
__future__rrrr	rrr'rrrr�<module>s


<