ruạṛ
a eV�i0� � @ s� d Z ddlmZ ddlZddlZddlZddlZddlZddlZddl m Z ddlmZ ddl mZmZmZ ddlmZ ddlmZ dd lmZmZ dd lmZmZmZ ddlmZ ddlmZm Z m!Z!m"Z"m#Z# dd l$m%Z%m&Z& ddl'm(Z( ddl)m*Z* ddl+m,Z, ddl-m.Z. ddl/m0Z0 ddl1m2Z2 ddl3m4Z4 ddl5m6Z6 ddl7m8Z8 ddl9m:Z: ddl;m<Z< ddl=m>Z> ddl?m@Z@ ddlAmBZB ddlCmDZD ddlEmFZF ddlGmHZH e�r�ddlImJZJ g d �ZKe<eL�ZMeeNd! eNeOePf f ZQeNeOeOeOeeeO eQf ZRdDd#d$d%d%d&�d'd(�ZSG d)d*� d*ejT�ZUG d+d,� d,�ZVd-d.d/d-d0�d1d2�ZWeG d3d4� d4��ZXed5d6�G d7d8� d8��ZYG d9d:� d:�ZZG d;d<� d<�Z[d/d/d=d>�d?d@�Z\d/d/dAd>�dBdC�Z]dS )Ez!Routines related to PyPI, indexes� )�annotationsN)�Iterable)� dataclass)� TYPE_CHECKING�Optional�Union)� specifiers)�Tag)�NormalizedName�canonicalize_name)�InvalidVersion�Version�_BaseVersion)�parse)�BestVersionAlreadyInstalled�DistributionNotFound�InstallationError�InvalidWheelFilename�UnsupportedWheel)� LinkCollector�parse_links)�select_backend)�InstallationCandidate)� FormatControl)�Link)�ReleaseControl)�SearchScope)�SelectionPreferences)�TargetPython)�Wheel)�InstallRequirement)� getLogger)�WHEEL_EXTENSION)�Hashes)� indent_log)�build_netloc)�check_requires_python)�SUPPORTED_EXTENSIONS)� TypeGuard)r �BestCandidateResult� PackageFinder� Fr ztuple[int, int, int]�bool)�link�version_info�ignore_requires_python�returnc C s| zt | j|d�}W n$ tjy6 t�d| j| � Y nB0 |sxd�tt|��}|sft� d|| j| � dS t�d|| j| � dS )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. z2Ignoring invalid Requires-Python (%r) for link: %s�.z4Link requires a different Python (%s not in: %r): %sFzBIgnoring failed Requires-Python check (%s not in: %r) for link: %sT) r&