관리-도구
편집 파일: prepare.cpython-38.opt-1.pyc
U ��.e, � @ s d Z ddlZddlZddlmZ ddlmZ ddlmZ ddl m Z ddlmZm Z mZmZmZ ddlmZ dd lmZ dd lmZ ddlmZ ddlmZmZ dd lmZ er�ddlmZ ddlm Z ddl!m"Z" ddl#m$Z$ ddl%m&Z& ddl'm(Z( e�)e*�Z+dd� Z,G dd� de-�Z.dS )z)Prepares a distribution for installation � N)�requests)�)make_distribution_for_install_requirement)�InstalledDistribution)� unpack_url)�DirectoryUrlHashUnsupported�HashUnpinned�InstallationError�PreviousBuildDirError�VcsHashUnsupported)� expanduser)� MissingHashes)� indent_log)�write_delete_marker_file)�display_path�normalize_path)�MYPY_CHECK_RUNNING)�Optional)�AbstractDistribution)� PackageFinder)� PipSession)�InstallRequirement)�RequirementTrackerc C s. t | �}|�| �� |�||� W 5 Q R X |S )z-Prepare a distribution for installation. )r ZtrackZprepare_distribution_metadata)�req�req_tracker�finder�build_isolation� abstract_dist� r �D/usr/lib/python3.8/site-packages/pip/_internal/operations/prepare.py�_get_prepared_distribution, s r c sD e Zd ZdZ� fdd�Zedd� �Zdd� Zdd � Zd d� Z � Z S )�RequirementPreparerzPrepares a Requirement c sT t t| ��� || _|| _|| _|r,t|�}|| _|r>t|�}|| _ || _ || _d S )N)�superr �__init__�src_dir� build_dirr r �download_dirr �wheel_download_dir�progress_barr )�selfr$ r% r# r&