관리-도구
편집 파일: glibc.cpython-310.pyc
o ƚRe& � @ sp d dl Z d dlZd dlmZmZ dee fdd�Zdee fdd�Zdee fdd �Zdeeef fd d�Z dS )� N)�Optional�Tuple�returnc C s t � pt� S )z9Returns glibc version string, or None if not using glibc.)�glibc_version_string_confstr�glibc_version_string_ctypes� r r ��/builddir/build/BUILDROOT/alt-python310-pip-21.3.1-3.el8.x86_64/opt/alt/python310/lib/python3.10/site-packages/pip/_internal/utils/glibc.py�glibc_version_string s r c C sB t jdkrdS zt�d��� \} }W |S tttfy Y dS w )z@Primary implementation of glibc_version_string using os.confstr.�win32N�CS_GNU_LIBC_VERSION)�sys�platform�os�confstr�split�AttributeError�OSError� ValueError)�_�versionr r r r s ��r c C sr zddl } W n ty Y dS w | �d�}z|j}W n ty% Y dS w | j|_|� }t|t�s7|� d�}|S )z=Fallback implementation of glibc_version_string using ctypes.r N�ascii) �ctypes�ImportError�CDLL�gnu_get_libc_versionr �c_char_p�restype� isinstance�str�decode)r �process_namespacer �version_strr r r r s � � r c C s t � } | du r dS d| 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"