HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //usr/lib/python3/dist-packages/pip/_internal/utils/__pycache__/packaging.cpython-310.pyc
o

@%Ne<�@s�ddlZddlZddlZddlmZmZmZmZddlm	Z	m
Z
ddlmZede
�Ze�e�Zdee
deedfd	efd
d�Zejdd
�de
d	efdd��Zde
d	efdd�ZdS)�N)�NewType�Optional�Tuple�cast)�
specifiers�version��Requirement�NormalizedExtra�requires_python�version_info.�returncCs4|durdSt�|�}t�d�tt|���}||vS)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)rr�requires_python_specifier�python_version�r�?/usr/lib/python3/dist-packages/pip/_internal/utils/packaging.py�check_requires_pythons

ri)�maxsize�
req_stringcCst|�S)z5Construct a packaging.Requirement object with cachingr)rrrr�get_requirement%sr�extracCsttt�dd|����S)aDConvert 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.-]+�_)rr
�re�sub�lower)rrrr�
safe_extra0s	r!)�	functools�loggingr�typingrrrr�pip._vendor.packagingrr�"pip._vendor.packaging.requirementsr	rr
�	getLogger�__name__�logger�int�boolr�	lru_cacherr!rrrr�<module>s$

�
�
�