3

Q'ícJã@sHddlmZddlZddlZddlZdd„Zdd„Zdd„Zd	d
„ZdS)é)Ú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ú6/tmp/pip-build-l_bcah40/setuptools/setuptools/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_glibc4srcCstƒ}|dkrdSd|fSdS)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ÚÚglibc)r r )r)Ú
glibc_versionrrrÚlibc_verLsr#)	Ú
__future__rrrrrrrr#rrrrÚ<module>s