U 巀g=@sddlZddlZddlZddlmZmZmZmZddlm Z m Z ddl m Z ede ZeeZee eedfeddd Zejd d e e d d dZe edddZdS)N)NewTypeOptionalTuplecast) specifiersversion RequirementNormalizedExtra.)requires_python version_inforeturncCs4|dkr dSt|}tdtt|}||kS)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 SpecifierSetrparsejoinmapstr)r r requires_python_specifierpython_versionrK/opt/hc_python/lib/python3.8/site-packages/pip/_internal/utils/packaging.pycheck_requires_pythons  ri)maxsize) req_stringr cCst|S)z5Construct a packaging.Requirement object with cachingr)rrrrget_requirement%sr)extrar cCstttdd|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 resublower)rrrr safe_extra0s r!) functoolsloggingrtypingrrrrZpip._vendor.packagingrr"pip._vendor.packaging.requirementsr rr getLogger__name__loggerintboolr lru_cacherr!rrrrs