3 Ï(Ó\Ò ã@shddlmZddlZddlZddlZddlmZerDddlmZm Z dd„Z dd„Z d d „Z d d „Z dS) é)Úabsolute_importN)ÚMYPY_CHECK_RUNNING)ÚOptionalÚTuplec CsPtjdƒ}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úl/private/var/folders/pf/wv4htv3x0qs2c2mp0dnn0kchsvlck3/T/pip-build-k1a8l1r5/pip/pip/_internal/utils/glibc.pyÚglibc_version_string s    rcCsHtjd|ƒ}|s$tjd|tƒdSt|jdƒƒ|koFt|jdƒƒ|kS)Nz$(?P[0-9]+)\.(?P[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  r!cCstƒ}|dkrdSt|||ƒS)NF)rr!)rrrrrrÚhave_compatible_glibc9sr"cCstƒ}|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_verRsr&)Ú __future__rrrrZpip._internal.utils.typingrZtypingrrrr!r"r&rrrrÚs