관리-도구
편집 파일: resolver.cpython-311.pyc
� �ReH � � � d Z ddlZddlZddlmZ ddlmZ ddlmZm Z m Z mZmZm Z ddlmZ ddlmZ ddlmZ dd lmZmZmZmZmZmZ dd lmZ ddlmZ ddlm Z dd l!m"Z" ddl#m$Z$m%Z% ddl&m'Z' ddl(m)Z)m*Z* ddl+m,Z, ddl-m.Z. ddl/m0Z0m1Z1 ddl/m2Z2 ddl3m4Z4 ej5 e6� � Z7ee8e e$ f Z9 ddede e:e:e:f de;ddfd�Z< G d� de)� � Z=dS )ay Dependency Resolution The dependency resolution in pip is performed as follows: for top-level requirements: a. only one spec allowed per project, regardless of conflicts or not. otherwise a "double requirement" exception is raised b. they override sub-dependency requirements. for sub-dependencies a. "first found, wins" (where the order is breadth first) � N)�defaultdict)�chain)�DefaultDict�Iterable�List�Optional�Set�Tuple)� specifiers)�Requirement)� WheelCache)�BestVersionAlreadyInstalled�DistributionNotFound� HashError� HashErrors�NoneMetadataError�UnsupportedPythonVersion)� PackageFinder)�BaseDistribution)�Link)�RequirementPreparer)�InstallRequirement�check_invalid_constraint_type)�RequirementSet)�BaseResolver�InstallRequirementProvider)� get_supported)� indent_log)�dist_in_usersite�normalize_version_info)�dist_in_install_path)�check_requires_pythonF�dist�version_info�ignore_requires_python�returnc �$ � t | j � � }n/# t $ r"}t | t |� � � � �d}~ww xY w t ||�� � }n># t j $ r,}t � d| j |� � Y d}~dS d}~ww xY w|rdS d� t t |� � � � }|r$t � d| j ||� � dS t d� | j ||� � � � �)a� Check whether the given Python version is compatible with a distribution'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. :raises UnsupportedPythonVersion: When the given Python version isn't compatible. N)r$ z-Package %r has an invalid Requires-Python: %s�.zBIgnoring failed Requires-Python check for package %r: %s not in %rz8Package {!r} requires a different Python: {} not in {!r})�str�requires_python�FileNotFoundErrorr r"