§
]<ˆj= ã ó — d dl Z d dlZd dlZd dlmZmZmZmZ d dlm Z m
Z
d dlmZ ede
¦ « Z ej e¦ « Zdee
deedf d efd
„Z e j d¬¦ « d
e
d efd„¦ « Zde
d efd„ZdS )é N)ÚNewTypeÚOptionalÚTupleÚcast)Ú
specifiersÚversion©ÚRequirementÚNormalizedExtraÚrequires_pythonÚversion_info.Úreturnc ó® — | €dS 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 úo/builddir/build/BUILD/cloudlinux-venv-1.0.12/venv/lib/python3.11/site-packages/pip/_internal/utils/packaging.pyÚcheck_requires_pythonr sQ € ð ÐàˆtÝ *Ô 7¸Ñ HÔ HÐå”] 3§8¢8Cµ°\Ñ,BÔ,BÑ#CÔ#CÑDÔD€NØÐ6Ð6Ð6ó i )ÚmaxsizeÚ
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 dd| ¦ « ¦ « ¦ « 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% 0 s/ € õ •¥¤Ð(9¸3ÀÑ!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ÚintÚboolr Ú lru_cacher r% © r r ú