관리-도구
편집 파일: req_install.cpython-38.pyc
U ��.e� � @ sL d dl mZ d dlZd dlZd dlZd dlZd dlZd dlZd dlZd dl m Z d dlmZm Z d dlmZ d dlmZ d dlmZ d dlmZ d d lmZ d d lmZmZ d dlmZ d dlmZ d d lm Z d dl!m"Z" d dl#m$Z$m%Z% d dl&m'Z' d dl(m)Z) d dl*m+Z+ d dl,m-Z- d dl.m/Z/m0Z0 d dl1m2Z2m3Z3m4Z4m5Z5m6Z6m7Z7m8Z8m9Z9m:Z:m;Z;m<Z<m=Z= d dl>m?Z? d dl@mAZA d dlBmCZCmDZD d dlEmFZF d dlGmHZH d dlImJZJ d dlKmLZL eH�r.d dlMmNZNmOZOmPZPmQZQmRZRmSZSmTZT d dlmUZU d dlVmWZW d d lXmYZY d d!lZm[Z[ d d"l\m]Z] d d#l^m_Z_ e�`ea�ZbG d$d%� d%ec�ZddS )&� )�absolute_importN)�change_root)� pkg_resources�six)�Requirement)�canonicalize_name)�Version)�parse)�Pep517HookCaller)� pep425tags�wheel)�NoOpBuildEnvironment)�InstallationError)�Link)�get_metadata_generator)�load_pyproject_toml�make_pyproject_path)�UninstallPathSet)� native_str)�Hashes)� indent_log)�PIP_DELETE_MARKER_FILENAME�has_delete_marker_file)�_make_build_dir�ask_path_exists� backup_dir�display_path�dist_in_install_path�dist_in_site_packages�dist_in_usersite� ensure_dir�get_installed_version�hide_url�redact_auth_from_url�rmtree)�get_metadata)�make_setuptools_shim_args)�call_subprocess�runner_with_spinner_message)� TempDirectory)�MYPY_CHECK_RUNNING)�running_under_virtualenv)�vcs)�Any�Dict�Iterable�List�Optional�Sequence�Union)�BuildEnvironment)� WheelCache)� PackageFinder)�Distribution)�SpecifierSet)�Markerc @ sp e Zd ZdZdPdd�Zdd� Zd d � Zdd� Zd d� Ze dd� �Z e dd� �Ze dd� �Ze dd� �Z dQdd�Ze dd� �ZdRdd�Zdd� Zd d!� Zd"d#� Zd$d%� Zd&d'� Ze d(d)� �ZdSd*d+�Ze d,d-� �Ze d.d/� �Ze d0d1� �Zd2d3� Zd4d5� Zd6d7� Ze d8d9� �Zd:d;� Zd<d=� Z d>d?� Z!dTd@dA�Z"dUdBdC�Z#dVdDdE�Z$dFdG� Z%dHdI� Z&dJdK� Z'dWdLdM�Z(dNdO� Z)dS )X�InstallRequirementz� Represents something that may be installed later on, may have information about where to fetch the relevant requirement and also contains logic for installing the said requirement. NF� c C s2 |d kst |t�st|��|| _|| _|| _|d kr<d | _ntj� tj� |��| _|| _| | _|d krz|rz|j rzt|j �}| | _| _|r�|| _n |r�dd� |jD �| _nt� | _|d kr�|r�|j}|| _d | _d | _d | _d | _d | _| r�| ni | _d| _d| _|| _t� | _d | _ d | _!g | _"d | _#|| _$d S )Nc S s h | ]}t �|��qS r; )r Z safe_extra��.0�extrar; r; �A/usr/lib/python3.8/site-packages/pip/_internal/req/req_install.py� <setcomp>w s z.InstallRequirement.__init__.<locals>.<setcomp>F)%� isinstancer �AssertionError�req� comes_from� constraint� source_dir�os�path�normpath�abspath�editable�_wheel_cache�urlr �link� original_link�extras�set�marker�markers�satisfied_by�conflicts_with�_temp_build_dir�_ideal_build_dir�install_succeeded�optionsZpreparedZ is_direct�isolatedr � build_env�metadata_directory�pyproject_requires�requirements_to_check�pep517_backend� use_pep517) �selfrC rD rF rK rN rS r` rZ rY Zwheel_cacherE rP r; r; r? �__init__T sJ � zInstallRequirement.__init__c C s� | j r,t| j �}| jrD|dt| jj� 7 }n| jr@t| jj�}nd}| jd k rb|dt| jj� 7 }| jr�t | jt j�r~| j}n | j�� }|r�|d| 7 }|S )Nz from %sz<InstallRequirement>z in %sz (from %s)) rC �strrN r# rM rT r �locationrD rA r �string_types� from_path�ra �srD r; r; r? �__str__� s zInstallRequirement.__str__c C s d| j jt| �| jf S )Nz<%s object: %s editable=%r>)� __class__�__name__rc rK �ra r; r; r? �__repr__� s �zInstallRequirement.__repr__c s>