관리-도구
편집 파일: prepare.cpython-37.pyc
B ��Re�M � @ s: d Z ddlZddlZddlZddlZddlmZ ddlmZ ddl m Z ddlmZm Z mZmZmZmZmZ ddlmZ ddlmZ dd lmZ dd lmZmZmZmZ ddlmZ ddl m!Z! dd l"m#Z# ddl$m%Z% e!�r�ddl&m'Z'm(Z(m)Z)m*Z* ddl+m,Z, ddlm-Z- ddl.m/Z/ ddl0m1Z1 ddl2m3Z3 ddl4m5Z5 ddl6m7Z7 ddlm8Z8 e�r�e,de'e9e(e9 ge(e9 f e:d�dd�Z;n8e,de'e9e9gdf e'e9e(e9 ge(e9 f e:e:d�dd�Z;e�<e=�Z>dd� Z?dd � Z@G d!d"� d"eA�ZBd3d#d$�ZCd%d&� ZDd'd(� ZEd4d)d*�ZFd5d+d,�ZGd-d.� ZHd/d0� ZIG d1d2� d2eA�ZJdS )6z)Prepares a distribution for installation � N)�PY2)�)make_distribution_for_install_requirement)�InstalledDistribution)�DirectoryUrlHashUnsupported�HashMismatch�HashUnpinned�InstallationError�NetworkConnectionError�PreviousBuildDirError�VcsHashUnsupported)�copy2_fixed)� MissingHashes)� indent_log)�display_path�hide_url�path_to_display�rmtree)� TempDirectory)�MYPY_CHECK_RUNNING)�unpack_file)�vcs)�Callable�List�Optional�Tuple)� TypedDict)�AbstractDistribution)� PackageFinder)�Link)� Downloader)�InstallRequirement)�RequirementTracker)�Hashes�CopytreeKwargs)�ignore�symlinksF)�total)� copy_functionr$ �ignore_dangling_symlinksr% c C s. t | �}|�| �� |�||� W dQ R X |S )z-Prepare a distribution for installation. N)r �track�prepare_distribution_metadata)�req�req_tracker�finder�build_isolation� abstract_dist� r0 ��/builddir/build/BUILDROOT/alt-python37-pip-20.2.4-6.el8.x86_64/opt/alt/python37/lib/python3.7/site-packages/pip/_internal/operations/prepare.py�_get_prepared_distributionP s r2 c C s0 t �| j�}|d k st�|j|t| j�d� d S )N)�url)r �get_backend_for_scheme�scheme�AssertionError�unpackr r3 )�link�location�vcs_backendr0 r0 r1 �unpack_vcs_link_ s r; c @ s e Zd Zdd� ZdS )�Filec C s || _ || _d S )N)�path�content_type)�selfr= r>