ó â\e[c@@sĨddlmZddlZddlZddlmZddlmZddlm Z m Z ddl m Z ej eƒZd„Zd„Zd „Zd „ZdS( i(tabsolute_importN(t FeedParser(t pkg_resources(t specifierstversion(t exceptionscC@sQ|dkrtStj|ƒ}tjdjttt j d ƒƒƒ}||kS(sG Check if the python version in use match the `requires_python` specifier. Returns `True` if the version of python in use matches the requirement. Returns `False` if the version of python in use does not matches the requirement. Raises an InvalidSpecifier if `requires_python` have an invalid format. t.iN( tNonetTrueRt SpecifierSetRtparsetjointmaptstrtsyst version_info(trequires_pythontrequires_python_specifiertpython_version((s</tmp/pip-install-0xiv62/pip/pip/_internal/utils/packaging.pytcheck_requires_pythons (cC@sNt|tjƒr.|jdƒr.|jdƒS|jdƒrJ|jdƒSdS(NtMETADATAsPKG-INFO(t isinstanceRtDistInfoDistributiont has_metadatat get_metadata(tdist((s</tmp/pip-install-0xiv62/pip/pip/_internal/utils/packaging.pyR#s  c C@sŋt|ƒ}tƒ}|j|ƒ|jƒ}|jdƒ}yKt|ƒs‡tjd|j|dj t t t j d ƒƒfƒ‚nWn0tjk rš}tjd|j||ƒdSXdS(NsRequires-Pythons4%s requires Python '%s' but the running Python is %sRis7Package %s has an invalid Requires-Python entry %s - %s(RRtfeedtclosetgetRRtUnsupportedPythonVersiont project_nameR R R RRRtInvalidSpecifiertloggertwarning(Rtmetadatat feed_parsert pkg_info_dictRte((s</tmp/pip-install-0xiv62/pip/pip/_internal/utils/packaging.pytcheck_dist_requires_python+s"     -cC@sF|jdƒrBx0|jdƒD]}|jƒr|jƒSqWndS(Nt INSTALLERt(Rtget_metadata_lineststrip(Rtline((s</tmp/pip-install-0xiv62/pip/pip/_internal/utils/packaging.pyt get_installerAs  (t __future__RtloggingRt email.parserRt pip._vendorRtpip._vendor.packagingRRt pip._internalRt getLoggert__name__R RRR&R,(((s</tmp/pip-install-0xiv62/pip/pip/_internal/utils/packaging.pyts