1j d dl Z d dlZd dlmZmZ dee fdZdee fdZdee fdZdeeef fdZ dS ) N)OptionalTuplereturnc : t p
t S )z9Returns glibc version string, or None if not using glibc.)glibc_version_string_confstrglibc_version_string_ctypes k/builddir/build/BUILD/cloudlinux-venv-1.0.11/venv/lib/python3.11/site-packages/pip/_internal/utils/glibc.pyglibc_version_stringr s '))J-H-J-JJr
c t j dk rdS t j d } | dS | \ }}n# t
t t f$ r Y dS w xY w|S )z@Primary implementation of glibc_version_string using os.confstr.win32NCS_GNU_LIBC_VERSION)sysplatformosconfstrsplitAttributeErrorOSError
ValueError)gnu_libc_version_versions r r r s~ |wt:&;<<#4%++--
77GZ0 tt Ns A A AAc 8 ddl } n# t $ r Y dS w xY w | d }n# t $ r Y dS w xY w |j }n# t
$ r Y dS w xY w| j |_ | }t |t s|
d }|S )z=Fallback implementation of glibc_version_string using ctypes.r Nascii)ctypesImportErrorCDLLr gnu_get_libc_versionr c_char_prestype
isinstancestrdecode)r process_namespacer version_strs r r r s
tt "KK-- tt0E tt $*? ++--Kk3'' 2!((11s*
/
==A
AAc . t } | dS d| fS )zTry 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, [ s% )**Mx''r
)
r r typingr r r$ r r r r, r r
r