✏️ 编辑:glibc.cpython-39.pyc
路径:
/usr/lib/python3.9/site-packages/pip/_internal/utils/__pycache__/glibc.cpython-39.pyc
大小:1.6 KB · 修改:2026-05-23 08:59:54 · 权限:0644 · 只读(保存会失败)
← 返回目录
👁 查看
⬇ 下载
检测到二进制内容,直接保存可能损坏文件。请改用「上传替换」。
a �lj& � @ sp d dl Z d dlZd dlmZmZ ee d�dd�Zee d�dd�Zee d�dd �Zeeef d�d d�Z dS )� N)�Optional�Tuple)�returnc C s t � p t� S )z9Returns glibc version string, or None if not using glibc.)�glibc_version_string_confstr�glibc_version_string_ctypes� r r �=/usr/lib/python3.9/site-packages/pip/_internal/utils/glibc.py�glibc_version_string s r c C sD t jdkrdS zt�d��� \} }W n tttfy> Y dS 0 |S )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 0 | �d�}z |j}W n tyJ Y dS 0 | j|_|� }t|t�sn|� d�}|S )z=Fallback implementation of glibc_version_string using ctypes.r N�ascii) �ctypes�ImportErrorZCDLL�gnu_get_libc_versionr Zc_char_pZrestype� isinstance�str�decode)r Zprocess_namespacer Zversion_strr r r r s r c C s t � } | du rdS d| fS dS )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 Zglibc)r )Z glibc_versionr r r �libc_verN s r ) r r �typingr r r r r r r r r r r �<module> s /
💾 保存
取消
保存为 UTF-8,换行统一为 LF