관리-도구
편집 파일: package_finder.cpython-311.pyc
� �܋fe� � �^ � d Z ddlZddlZddlZddlZddlZddlmZ ddlm Z m Z mZmZm Z mZmZmZ ddlmZ ddlmZ ddlmZ ddlmZmZ dd lmZ dd lmZmZmZm Z ddl!m"Z"m#Z# ddl$m%Z% dd l&m'Z' ddl(m)Z) ddl*m+Z+ ddl,m-Z- ddl.m/Z/ ddl0m1Z1 ddl2m3Z3 ddl4m5Z5 ddl6m7Z7 ddl8m9Z9 ddl:m;Z; ddl<m=Z= ddl>m?Z? ddl@mAZA e rddlBmCZC g d�ZD e5eE� � ZFeed eeGeHf f ZIeeGeGeGee eG eIf ZJ d8de)d eeGeGeGf d!eKd"eKfd#�ZL G d$� d%ejM � � ZN G d&� d'� � ZOd(ee% d)e e9 d*eHd"ee% fd+�ZPe G d,� d-� � � � ZQ G d.� d/� � ZR G d0� d1� � ZS G d2� d3� � ZTd4eHd5eHd"eGfd6�ZUd4eHd5eHd"e eH fd7�ZVdS )9z!Routines related to PyPI, indexes� N)� dataclass)� TYPE_CHECKING� FrozenSet�Iterable�List�Optional�Set�Tuple�Union)� specifiers)�Tag)�canonicalize_name)�InvalidVersion�_BaseVersion)�parse)�BestVersionAlreadyInstalled�DistributionNotFound�InvalidWheelFilename�UnsupportedWheel)� LinkCollector�parse_links)�InstallationCandidate)� FormatControl)�Link)�SearchScope)�SelectionPreferences)�TargetPython)�Wheel)�InstallRequirement)� getLogger)�WHEEL_EXTENSION)�Hashes)� indent_log)�build_netloc)�check_requires_python)�SUPPORTED_EXTENSIONS)� TypeGuard)r �BestCandidateResult� PackageFinder� F�link�version_info�ignore_requires_python�returnc � � t | j |�� � }|spd� t t |� � � � }|s$t � d|| j | � � dS t � d|| j | � � n6# t j $ r$ t � d| j | � � Y nw xY wdS )aa Return whether the given Python version is compatible with a link's "Requires-Python" value. :param version_info: A 3-tuple of ints representing the Python major-minor-micro version to check. :param ignore_requires_python: Whether to ignore the "Requires-Python" value if the given Python version isn't compatible. )r, �.z4Link requires a different Python (%s not in: %r): %sFzBIgnoring failed Requires-Python check (%s not in: %r) for link: %sz2Ignoring invalid Requires-Python (%r) for link: %sT) r% �requires_python�join�map�str�logger�verbose�debugr �InvalidSpecifier)r+ r, r- � is_compatible�versions �Y/opt/cloudlinux/venv/lib64/python3.11/site-packages/pip/_internal/index/package_finder.py�_check_link_requires_pythonr<