OwlCyberSecurity - MANAGER
Edit File: legacy_resolve.cpython-38.pyc
U �J)^�? � @ sB d Z ddlZddlZddlmZ ddlmZ ddlmZ ddl m Z mZmZm Z mZ ddlmZ ddlmZmZ dd lmZmZ dd lmZ e�rddlmZmZmZmZmZmZ ddl m!Z! dd l"m#Z# ddl$m%Z% ddl&m'Z' ddl(m)Z) ddl*m+Z+ ee,e)ge)f Z-ee,ee) f Z.e�/e0�Z1ddd�Z2G dd� de3�Z4dS )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)� indent_log)�dist_in_usersite�normalize_version_info)�check_requires_python�get_requires_python)�MYPY_CHECK_RUNNING)�Callable�DefaultDict�List�Optional�Set�Tuple)� pkg_resources)�AbstractDistribution)� PackageFinder)�RequirementPreparer)�InstallRequirement)�RequirementSetFc C s� t | �}zt||d�}W n: tjk rR } zt�d| j|� W Y �dS d}~X Y nX |r\dS d�tt |��}|r�t� d| j||� dS td�| 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 ZInvalidSpecifier�logger�warningZproject_name�join�map�str�debugr �format)�distr �ignore_requires_pythonZrequires_pythonZ is_compatible�exc�version� r) �>/usr/lib/python3/dist-packages/pip/_internal/legacy_resolve.py�_check_dist_requires_python9 s>