ó •abc@@s¦ddlmZddlmZddlZddlZddlmZddlmZddl m Z ddl m Z ej eƒZd„Zd „Zd „ZdS( i(tabsolute_import(t FeedParserN(t specifiers(tversion(t pkg_resources(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((s7/usr/lib/python2.7/site-packages/pip/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((s7/usr/lib/python2.7/site-packages/pip/utils/packaging.pyR%s  c C@sÃt|ƒ}tƒ}|j|ƒ|jƒ}|jdƒ}yKt|ƒs‡tjd|j|dj t t t j d ƒƒfƒ‚nWn4tjk r¾}tjd|j||fƒ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((s7/usr/lib/python2.7/site-packages/pip/utils/packaging.pytcheck_dist_requires_python-s"     -(t __future__Rt email.parserRtloggingRtpip._vendor.packagingRRt pip._vendorRtpipRt getLoggert__name__R RRR&(((s7/usr/lib/python2.7/site-packages/pip/utils/packaging.pyts