관리-도구
편집 파일: sdist.cpython-38.pyc
U &?�f_ � @ s� d dl Z d dlmZmZmZmZmZ d dlmZ d dl m Z d dlmZ d dl mZ d dlmZ erpd dlmZ e �e�ZG d d � d e �ZdS )� N)� TYPE_CHECKING�Iterable�Optional�Set�Tuple)�BuildEnvironment)�AbstractDistribution)�InstallationError)�BaseDistribution)�runner_with_spinner_message)� PackageFinderc @ s� e Zd ZdZeee d�dd��Zed�dd�Z de e dd �d d�Zddd�d d�Ze e d�dd�Ze e d�dd�Zddd�dd�Zeeeeef dd�dd�Zee dd�dd�ZdS )�SourceDistributionz�Represents a source distribution. The preparation step for these needs metadata for the packages to be generated, either using PEP 517 or using the legacy `setup.py egg_info`. )�returnc C s | j jst�| j jjS )z/Identify this requirement uniquely by its link.)�req�link�AssertionError�url_without_fragment��self� r �O/opt/hc_python/lib/python3.8/site-packages/pip/_internal/distributions/sdist.py�build_tracker_id s z#SourceDistribution.build_tracker_idc C s | j �� S )N)r �get_distr r r r �get_metadata_distribution s z,SourceDistribution.get_metadata_distributionr N)�finder�build_isolation�check_build_depsr c C s� | j �� | j jo|}|r8| �|� | j �� | �|� | j joB|}|r�| j j}|d k s\t�| j j� |�\}}|r~| � d|� |r�| �|� | j �� d S )N�the backend dependencies) r �load_pyproject_toml� use_pep517�_prepare_build_backend�isolated_editable_sanity_check�_install_build_reqs�pyproject_requiresr � build_env�check_requirements�_raise_conflicts�_raise_missing_reqs�prepare_metadata) r r r r �should_isolate�should_check_depsr# �conflicting�missingr r r �prepare_distribution_metadata s$ � z0SourceDistribution.prepare_distribution_metadata)r r c C s� | j j}|d k st�t� | j _| j jj||ddd� | j j�| j j�\}}|rZ| �d|� |r�t � d| j � t � dd�tt t|���� d S )N�overlayzbuild dependencies��kindz"PEP 517/518 supported requirementsz4Missing build requirements in pyproject.toml for %s.z`The project does not specify a build backend, and pip cannot fall back to setuptools without %s.z and )r r# r r r$ �install_requirementsr% �requirements_to_checkr&