
    !g^                     6   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j        e          Z e j        d          dee         d	eed
f         defd            Z e j        d          dedefd            ZdedefdZdS )    N)NewTypeOptionalTuplecast)
specifiersversionRequirementNormalizedExtra    )maxsizerequires_pythonversion_info.returnc                     | dS t          j        |           }t          j        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_versions       ]/home/jrussi/.local/pipx/shared/lib/python3.11/site-packages/pip/_internal/utils/packaging.pycheck_requires_pythonr      sQ     t * 7 H H]388C\,B,B#C#CDDN666    i   
req_stringc                      t          |           S )z5Construct a packaging.Requirement object with cachingr	   )r   s    r   get_requirementr   &   s     z"""r   extrac                 x    t          t          t          j        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    s    r   
safe_extrar&   1   s/     (93!F!F!L!L!N!NOOOr   )	functoolsloggingr#   typingr   r   r   r   pip._vendor.packagingr   r   "pip._vendor.packaging.requirementsr
   r   r   	getLogger__name__logger	lru_cacheintboolr   r   r&    r   r   <module>r3      s]        				 1 1 1 1 1 1 1 1 1 1 1 1 5 5 5 5 5 5 5 5 : : : : : :'+S11		8	$	$ R   7c]727S/7	7 7 7 ! 7. T"""# # # # # #"#	Pc 	Po 	P 	P 	P 	P 	P 	Pr   