관리-도구
편집 파일: glibc.cpython-38.pyc
U ��.e- � @ sx d dl mZ d dlZd dlZd dlZd dlmZ erDd dlmZm Z dd� Z dd� Zd d � Zdd� Z d d� Zdd� ZdS )� )�absolute_importN)�MYPY_CHECK_RUNNING)�Optional�Tuplec 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.8/site-packages/pip/_internal/utils/glibc.py�glibc_version_string s r c C s8 zt �d��� \} }W n tttfk r2 Y dS X |S )z@Primary implementation of glibc_version_string using os.confstr.�CS_GNU_LIBC_VERSIONN)�os�confstr�split�AttributeError�OSError� ValueError)�_�versionr r r r s r c C sv zddl } W n tk r" Y dS X | �d�}z |j}W n tk rN Y dS X | j|_|� }t|t�sr|� 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 �version_strr r r r &