File: //usr/lib/python3/dist-packages/pip/_internal/distributions/__pycache__/sdist.cpython-310.pyc
o
@%Ne{ � @ s� d dl Z d dlmZmZmZ d dlmZ d dlmZ d dl m
Z
d dlmZ d dl
mZ d dlmZ e �e�ZG d d
� d
e�ZdS )� N)�Iterable�Set�Tuple)�BuildEnvironment)�AbstractDistribution)�InstallationError)�
PackageFinder)�BaseDistribution)�runner_with_spinner_messagec @ s� e Zd ZdZdefdd�Zdededdfdd �Zdeddfd
d�Z de
e fdd
�Zde
e fdd�Z
deddfdd�Zdedeeeef ddfdd�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 �� S �N)�req�get_dist)�self� r �C/usr/lib/python3/dist-packages/pip/_internal/distributions/sdist.py�get_metadata_distribution s
z,SourceDistribution.get_metadata_distribution�finder�build_isolationNc C sF | j �� | j jo
|}|r| �|� | j �� | �|� | j �� d S r
)r �load_pyproject_toml�
use_pep517�_prepare_build_backend�isolated_editable_sanity_check�_install_build_reqs�prepare_metadata)r r r �should_isolater r r �prepare_distribution_metadata s
z0SourceDistribution.prepare_distribution_metadatac C s� | j j}|d us
J �t� | j _| j jj||ddd� | j j�| j j�\}}|r-| �d|� |rFt� d| j � t� dd�
ttt
|���� d S 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 �pyproject_requiresr � build_env�install_requirements�check_requirements�requirements_to_check�_raise_conflicts�logger�warning�join�map�repr�sorted)r r r! �conflicting�missingr r r r 1 s*
�����z)SourceDistribution._prepare_build_backendc C � | j j�7 td�}| j j}|d usJ �|�|�� |�� W d � W d � S 1 s.w Y W d � d S 1 s>w Y d S )Nz#Getting requirements to build wheel)r r"