3

Q'íc{ã@sPddlmZddlZddlZddlZddlZdd„Zdd„Zdd„Zd	d
„Z	dS)é)Úabsolute_importNcCsPtjdƒ}y
|j}Wntk
r(dSXtj|_|ƒ}t|tƒsL|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



rcCsHtjd|ƒ}|s$tjd|tƒdSt|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ÚmrrrÚcheck_glibc_version#s
rcCstƒ}|dkrdSt|||ƒS)NF)rr)rrrrrrÚhave_compatible_glibc3srcCs"tƒ}|dkrtjƒSd|fSdS)NÚglibc)rÚplatformÚlibc_ver)Ú
glibc_versionrrrr"Ksr")
Ú
__future__rrrr!rrrrr"rrrrÚ<module>s