U
    cUh^                     @   s   d dl Z d dlZd dlZd dlmZmZmZmZ d dlm	Z	m
Z
 d dlmZ edeZeeZe jddee eedf ed	d
dZe jddeedddZeedddZdS )    N)NewTypeOptionalTuplecast)
specifiersversionRequirementNormalizedExtra    )maxsize.)requires_pythonversion_inforeturnc                 C   s4   | dkrdS t | }tdtt|}||kS )a  
    Check if the given Python version matches a "Requires-Python" specifier.

    :param version_info: A 3-tuple of ints representing a Python
        major-minor-micro version to check (e.g. `sys.version_info[:3]`).

    :return: `True` if the given Python version satisfies the requirement.
        Otherwise, return `False`.

    :raises InvalidSpecifier: If `requires_python` has an invalid format.
    NT.)r   SpecifierSetr   parsejoinmapstr)r   r   Zrequires_python_specifierpython_version r   ]/opt/bot/vods_filmes/script/venv/lib/python3.8/site-packages/pip/_internal/utils/packaging.pycheck_requires_python   s
    
r   i   )
req_stringr   c                 C   s   t | S )z5Construct a packaging.Requirement object with cachingr   )r   r   r   r   get_requirement&   s    r   )extrar   c                 C   s   t ttdd|  S )aD  Convert an arbitrary string to a standard 'extra' name

    Any runs of non-alphanumeric characters are replaced with a single '_',
    and the result is always lowercased.

    This function is duplicated from ``pkg_resources``. Note that this is not
    the same to either ``canonicalize_name`` or ``_egg_link_name``.
    z[^A-Za-z0-9.-]+_)r   r
   resublower)r   r   r   r   
safe_extra1   s    	r!   )	functoolsloggingr   typingr   r   r   r   Zpip._vendor.packagingr   r   "pip._vendor.packaging.requirementsr	   r   r
   	getLogger__name__logger	lru_cacheintboolr   r   r!   r   r   r   r   <module>   s   


 


