관리-도구
편집 파일: req_install.cpython-310.pyc
o ƚReJ� � @ sD 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]d!e^d"e!fd#d$�Z_G d%d&� d&�Z`d'e`d"e^fd(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�r%tj}tj� |�d }n|�d�s,J �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-python310-pip-21.3.1-3.el8.x86_64/opt/alt/python310/lib/python3.10/site-packages/pip/_internal/req/req_install.py� _get_distB s �rI c @ s. e Zd ZdZ dhdee deeed f dedee d ee d ee dedeee d eee deeeee f dede e dededdfdd�Zdefdd�Zdefdd�Zdefdd�Zedee fdd��Ze�� defdd��Zedefd d!��Zedefd"d#��Zdid$eee defd%d&�Zedefd'd(��Zdjd*edefd+d,�Zdee fd-d.�Zd/ed0ed1edefd2d3�Z dkd4d5�Z!dkd6d7�Z"d8eddfd9d:�Z#edefd;d<��Z$edefd=d>��Z%edefd?d@��Z&edefdAdB��Z'edefdCdD��Z(dkdEdF�Z)dkdGdH�Z*dkdIdJ�Z+ede,fdKdL��Z-de.fdMdN�Z/dkdOdP�Z0 dldQed0ed1eddfdRdS�Z1dkdTdU�Z2 dldVedWedee3 fdXdY�Z4dZed[ed\edefd]d^�Z5d/ee ddfd_d`�Z6 ) )dmdee d ee7e daee dbee dcee dded8edeeddfdfdg�Z8dS )n�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 s t |t�s J |��|| _|| _|| _|| _|| _d | _d | _| jr8|s)J �|j r8t j�t j� |j��| _|d u rF|rF|jrFt|j�}| | _| _d| _d | _| jr^| jj r^| jj| _|rd|| _n|rpdd� |jD �| _nt� | _|d u r}|r}|j}|| _d | _d| _d | _d | _|r�|ng | _| r�| ng | _| r�| 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>� s z.InstallRequirement.__init__.<locals>.<setcomp>)+� isinstancer rK rL rU rM rX �legacy_install_reason� source_dir�is_filer: r<