관리-도구
편집 파일: req_install.cpython-39.pyc
a ��ReJ� � @ s@ d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlmZm Z m Z mZmZm Z mZmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d d lmZ d d lmZ d dl m!Z! d dl"m#Z#m$Z$ d d l%m&Z& d dl'm(Z( d dl)m*Z* d dl+m,Z, d dl-m.Z. d dl/m,Z0 d dl1m2Z3 d dl4m5Z5 d dl4m6Z7 d dl8m9Z9 d dl:m;Z;m<Z< d dl=m>Z> d dl?m@Z@ d dlAmBZBmCZC d dlDmEZE d dlFmGZGmHZHmIZImJZJmKZKmLZLmMZMmNZNmOZO d dlPmQZQ d dlRmSZS d dlTmUZUmVZV d dlWmXZX d d lYmZZZ e�[e\�Z]e^e!d!�d"d#�Z_G d$d%� d%�Z`e`e^d&�d'd(�ZadS ))� N)�Any� Collection�Dict�Iterable�List�Optional�Sequence�Union)� pkg_resources)�Marker)�Requirement)�SpecifierSet)�canonicalize_name)�Version)�parse)�Pep517HookCaller)�Distribution)�BuildEnvironment�NoOpBuildEnvironment)�InstallationError)� get_scheme)�Link)�generate_metadata)�generate_editable_metadata)�install_editable)�LegacyInstallFailure)�install)� install_wheel)�load_pyproject_toml�make_pyproject_path)�UninstallPathSet)� deprecated)�direct_url_for_editable�direct_url_from_link)�Hashes) �ask_path_exists� backup_dir�display_path�dist_in_install_path�dist_in_site_packages�dist_in_usersite�get_distribution�hide_url�redact_auth_from_url)�get_metadata)�runner_with_spinner_message)� TempDirectory� tempdir_kinds)�running_under_virtualenv)�vcs)�metadata_directory�returnc C s� | � tj�}tj�|�\}}t�||�}|�d�rJtj}tj� |�d }n.|�d�sXJ �tj }tj� |�d �d�d }||||d�S )zQReturn a pkg_resources.Distribution for the provided metadata directory. z .egg-infor z .dist-info�-)�project_name�metadata)�rstrip�os�sep�path�splitr �PathMetadata�endswithr �splitext�DistInfoDistribution)r4 �dist_dir�base_dir� dist_dir_namer8 �dist_cls� dist_name� rG ��/builddir/build/BUILDROOT/alt-python39-pip-21.3.1-2.el8.x86_64/opt/alt/python39/lib/python3.9/site-packages/pip/_internal/req/req_install.py� _get_distB s �rI c @ s� e Zd ZdZdSee eeed f eee ee ee eeee eee eeeee f ee e eedd�dd�Zed�d d �Zed�dd�Zed�d d�Zeee d�dd��Ze�� ed�dd��Zeed�dd��Zeed�dd��ZdTeee ed�dd�Zeed�dd��ZdUeed�dd�Zee d�d d!�Zeeeed"�d#d$�Z dd�d%d&�Z!dd�d'd(�Z"edd)�d*d+�Z#eed�d,d-��Z$eed�d.d/��Z%eed�d0d1��Z&eed�d2d3��Z'eed�d4d5��Z(dd�d6d7�Z)dd�d8d9�Z*dd�d:d;�Z+ee,d�d<d=��Z-e.d�d>d?�Z/dd�d@dA�Z0dVeeeddB�dCdD�Z1dd�dEdF�Z2dWeeee3 dG�dHdI�Z4eeeedJ�dKdL�Z5ee ddM�dNdO�Z6dXee ee7e ee ee ee eeeddP� dQdR�Z8dS )Y�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. FNrG )�req� comes_from�editable�link�markers� use_pep517�isolated�install_options�global_options�hash_options� constraint�extras� user_supplied�permit_editable_wheelsr5 c C s� |d u st |t�sJ |��|| _|| _|| _|| _|| _d | _d | _| jrp|sRJ �|j rpt j�t j� |j��| _|d u r�|r�|jr�t|j�}| | _| _d| _d | _| jr�| jj r�| jj| _|r�|| _n |r�dd� |jD �| _nt� | _|d u r�|r�|j}|| _d | _d| _d | _d | _|�r"|ng | _| �r2| ng | _| �rB| ni | _d| _ | | _!|| _"t#� | _$d | _%d | _&g | _'d | _(|| _)d| _*d S )NFc S s h | ]}t �|��qS rG )r � safe_extra��.0�extrarG rG rH � <setcomp>� � z.InstallRequirement.__init__.<locals>.<setcomp>)+� isinstancer rK rL rU rM rX �legacy_install_reason� source_dir�is_filer: r<