a
    shA                     @  s   d dl mZ d dlZd dlZd dlmZmZ d dlmZ e	e
Zejddddd	d
ddZejdddddddZdS )    )annotationsN)
specifiersversionRequirement    )maxsizez
str | Noneztuple[int, ...]bool)requires_pythonversion_inforeturnc                 C  s4   | du rdS t | }tdtt|}||v 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   requires_python_specifierpython_version r   Y/var/www/html/assistant/venv/lib/python3.9/site-packages/pip/_internal/utils/packaging.pycheck_requires_python   s
    
r   i'  r   r   )
req_stringr   c                 C  s   t | S )z5Construct a packaging.Requirement object with cachingr   )r   r   r   r   get_requirement$   s    r   )
__future__r   	functoolsloggingZpip._vendor.packagingr   r   "pip._vendor.packaging.requirementsr   	getLogger__name__logger	lru_cacher   r   r   r   r   r   <module>   s   


