Viewing File: /usr/lib/python3.6/site-packages/pip/utils/__pycache__/packaging.cpython-36.opt-1.pyc

3

£éaj ã@s~ddlmZddlmZddlZddlZddlmZddlmZddl	m
Z
ddlmZej
eƒZdd	„Zd
d„Zdd
„ZdS)é)Úabsolute_import)Ú
FeedParserN)Ú
specifiers)Úversion)Ú
pkg_resources)Ú
exceptionscCs>|dkrdStj|ƒ}tjdjtttjdd…ƒƒƒ}||kS)aG
    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.
    NTÚ.é)	rZSpecifierSetrÚparseÚjoinÚmapÚstrÚsysÚversion_info)Úrequires_pythonZrequires_python_specifierZpython_version©rú/usr/lib/python3.6/packaging.pyÚcheck_requires_pythons


 rcCs8t|tjƒr |jdƒr |jdƒS|jdƒr4|jdƒSdS)NZMETADATAzPKG-INFO)Ú
isinstancerZDistInfoDistributionZhas_metadataÚget_metadata)Údistrrrr%s



rcCs t|ƒ}tƒ}|j|ƒ|jƒ}|jdƒ}y8t|ƒs`tjd|j|dj	t
ttj
dd…ƒƒfƒ‚Wn8tjk
rš}ztjd|j||fƒdSd}~XnXdS)NzRequires-Pythonz4%s requires Python '%s' but the running Python is %srr	z7Package %s has an invalid Requires-Python entry %s - %s)rrZfeedÚcloseÚgetrrZUnsupportedPythonVersionZproject_namerrr
rrrZInvalidSpecifierÚloggerZwarning)rZmetadataZfeed_parserZ
pkg_info_dictrÚerrrÚcheck_dist_requires_python-s"

$r)Z
__future__rZemail.parserrZloggingrZpip._vendor.packagingrrZpip._vendorrZpiprZ	getLoggerÚ__name__rrrrrrrrÚ<module>s

Back to Directory File Manager