3
Q'íc{ ã @ sP d dl mZ d dlZd dlZd dlZd dlZdd Zdd Zdd Zd d
Z dS )é )Úabsolute_importNc C sP t jd} y
| j}W n tk
r( dS X t j|_| }t|tsL|jd}|S )z9Returns glibc version string, or None if not using glibc.NÚascii) ÚctypesÚCDLLÚgnu_get_libc_versionÚAttributeErrorÚc_char_pÚrestypeÚ
isinstanceÚstrÚdecode)Úprocess_namespacer Úversion_str© r ú./tmp/pip-build-l_bcah40/pip/pip/utils/glibc.pyÚglibc_version_string s
r c C sH t jd| }|s$tjd| t dS t|jd|koFt|jd|kS )Nz$(?P<major>[0-9]+)\.(?P<minor>[0-9]+)z=Expected glibc version with 2 components major.minor, got: %sFÚmajorÚminor)ÚreÚmatchÚwarningsÚwarnÚRuntimeWarningÚintÚgroup)r Úrequired_majorÚ
minimum_minorÚmr r r Úcheck_glibc_version# s
r c C s t }|d krdS t|| |S )NF)r r )r r r r r r Úhave_compatible_glibc3 s r c C s"