관리-도구
편집 파일: sdist.cpython-38.pyc
U ʗRe^ � @ 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 ZdZed�dd�Zeeedd�dd�Zedd �d d�Z e e d�dd �Ze e d�dd�Z edd �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 �� S )N)�req�get_dist)�self� r ��/builddir/build/BUILDROOT/alt-python38-pip-22.2.1-2.el8.x86_64/opt/alt/python38/lib/python3.8/site-packages/pip/_internal/distributions/sdist.py�get_metadata_distribution s z,SourceDistribution.get_metadata_distributionN)�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_requires�AssertionError� 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 �logger�warning�join�map�repr�sorted)r r r r% r&