U ʗRe^ @ s d dl Z d dlmZmZmZ d dlmZ d dlmZ d dl m Z d dlmZ d dl mZ d dlmZ e eZG d d d eZdS ) N)IterableSetTuple)BuildEnvironment)AbstractDistribution)InstallationError) PackageFinder)BaseDistribution)runner_with_spinner_messagec @ s e Zd ZdZedddZeeeddddZedd d dZ e e ddd Ze e dddZ edd ddZeeeeef ddddZee ddddZdS )SourceDistributionzRepresents 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)reqget_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.pyget_metadata_distribution s z,SourceDistribution.get_metadata_distributionN)finderbuild_isolationcheck_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 )Nthe backend dependencies) r load_pyproject_toml use_pep517_prepare_build_backendisolated_editable_sanity_check_install_build_reqspyproject_requiresAssertionError build_envcheck_requirements_raise_conflicts_raise_missing_reqsprepare_metadata) r r r r should_isolateshould_check_depsr conflictingmissingr r r prepare_distribution_metadata s$ z0SourceDistribution.prepare_distribution_metadata)r r c C s | j j}|d k stt | j _| j jj||ddd | j j| j j\}}|rZ| d| |rt d| j t ddtt t| d S )Noverlayzbuild dependencieskindz"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 loggerwarningjoinmapreprsorted)r r r r% r&