Your IP : 216.73.216.181
3
�Pf �@s~ddlmZddlmZddlZddlZddlmZddlmZddl m
Z
ddlmZej
e�Zdd �Zd
d�Zdd
�ZdS)�)�absolute_import)�
FeedParserN)�
specifiers)�version)�
pkg_resources)�
exceptionscCs>|dkrdStj|�}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�.�) rZSpecifierSetr�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)�
isinstancerZDistInfoDistributionZhas_metadata�get_metadata)�distrrrr%s
rcCs�t|�}t�}|j|�|j�}|jd�}y8t|�s`tjd|j|dj t
ttj
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�getrrZUnsupportedPythonVersionZproject_namerrr
rrrZInvalidSpecifier�loggerZwarning)rZmetadataZfeed_parserZ
pkg_info_dictr�errr�check_dist_requires_python-s"
$r)Z
__future__rZemail.parserrZloggingrZpip._vendor.packagingrrZpip._vendorrZpiprZ getLogger�__name__rrrrrrrr�<module>s
?>