관리-도구
편집 파일: resolver.cpython-36.pyc
3 �Re�I � @ s� d Z ddlZddlZddlmZ ddlmZ ddlmZ ddl m Z mZmZm Z mZ ddlmZ ddlmZ dd lmZ dd lmZ ddlmZ ddlmZmZ dd lmZ ddlmZmZ ddl m!Z! e!�rZddl"m#Z#m$Z$m%Z%m&Z&m'Z' ddl(m)Z) ddl*m+Z+ ddl,m-Z- ddl.m/Z/ ddl0m1Z1 ddl2m3Z3 ddlm4Z4 ddlm5Z5 e#e6e$e4 f Z7ej8e9�Z:ddd�Z;G dd� 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)� specifiers)�BestVersionAlreadyInstalled�DistributionNotFound� HashError� HashErrors�UnsupportedPythonVersion)�check_invalid_constraint_type)�RequirementSet)�BaseResolver)� get_supported)� indent_log)�dist_in_usersite�normalize_version_info)�dist_in_install_path)�check_requires_python�get_requires_python)�MYPY_CHECK_RUNNING)�DefaultDict�List�Optional�Set�Tuple)� pkg_resources)� WheelCache)�AbstractDistribution)� PackageFinder)�Link)�RequirementPreparer)�InstallRequirement)�InstallRequirementProviderFc C s� t | �}yt||d�}W n2 tjk rJ } ztjd| j|� dS d}~X nX |rTdS djtt |��}|r~tj d| j||� dS tdj| j||���dS )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. )�version_infoz-Package %r has an invalid Requires-Python: %sN�.zBIgnoring failed Requires-Python check for package %r: %s not in %rz8Package {!r} requires a different Python: {} not in {!r}) r r r �InvalidSpecifier�logger�warning�project_name�join�map�str�debugr �format)�distr"