File: //usr/local/lib/python3.7/site-packages/pip/_internal/operations/__pycache__/prepare.cpython-37.pyc
B
L��g�m � @ sZ d Z ddlZddlZddlZddlmZ ddlmZmZm Z m
Z
ddlmZ ddl
mZ ddlmZ ddlmZmZmZmZmZmZmZ dd lmZ dd
lmZmZ ddlmZ ddl m!Z! dd
l"m#Z# ddl$m%Z%m&Z& ddl'm(Z(m)Z) ddl*m+Z+ ddl,m-Z- ddl.m/Z/ ddl0m1Z1 ddl2m3Z3m4Z4 ddl5m6Z6m7Z7 ddl8m9Z9 ddl:m;Z;m<Z<m=Z=m>Z> ddl?m@Z@ ddlAmBZB ddlCmDZD e1eE�ZFe/e-eeGeGed�dd�ZHe!eIeJdd�dd �ZKG d!d"� d"�ZLd2e!e&e
eI e
e6 eLd#�d$d%�ZMd3e!e
eI e
e6 eLd&�d'd(�ZNd4e!eIe&eJe
eI e
e6 e
eL d)�d*d+�ZOd5e!eIe
e6 eGe
eI d-�d.d/�ZPG d0d1� d1�ZQdS )6z)Prepares a distribution for installation
� N)�Path)�Dict�Iterable�List�Optional)�canonicalize_name)�)make_distribution_for_install_requirement)�InstalledDistribution)�DirectoryUrlHashUnsupported�HashMismatch�HashUnpinned�InstallationError�MetadataInconsistent�NetworkConnectionError�VcsHashUnsupported)�
PackageFinder)�BaseDistribution�get_metadata_distribution)�ArchiveInfo)�Link)�Wheel)�BatchDownloader�
Downloader)�HTTPRangeRequestUnsupported�dist_from_wheel_url)�
PipSession)�BuildTracker)�InstallRequirement)� getLogger)�direct_url_for_editable�direct_url_from_link)�Hashes�
MissingHashes)�
indent_log)�display_path� hash_file�hide_url�redact_auth_from_requirement)�
TempDirectory)�unpack_file)�vcs)�req�
build_tracker�finder�build_isolation�check_build_deps�returnc C sD t | �}|j}|dk r<|�| |�� |�|||� W dQ R X |�� S )z(Prepare a distribution for installation.N)r Zbuild_tracker_id�track�prepare_distribution_metadatar )r+ r, r- r. r/ �
abstract_distZ
tracker_id� r4 �D/tmp/pip-unpacked-wheel-hv55ucu3/pip/_internal/operations/prepare.py�_get_prepared_distribution; s r6 )�link�location� verbosityr0 c C s2 t �| j�}|d k st�|j|t| j�|d� d S )N)�urlr9 )r* �get_backend_for_scheme�scheme�AssertionError�unpackr&