R`i5 d dl Z d dlmZmZmZmZ d dlmZ d dlm Z d dl mZ d dlm Z d dlmZ d dlmZ e j$ e Z G d d e Zy) N)IterableOptionalSetTuple)BuildEnvironment)AbstractDistribution)InstallationError) PackageFinder)BaseDistribution)runner_with_spinner_messagec e Zd ZdZedee fd ZdefdZ de dededdfd Zde ddfd Z dee fdZdee fdZde ddfd Zdedeeeef ddfdZdee ddfdZy)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 r | j j sJ | j j j S )z/Identify this requirement uniquely by its link.)reqlinkurl_without_fragmentselfs /builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/distributions/sdist.pybuild_tracker_idz#SourceDistribution.build_tracker_id s( xx}}}xx}}111 c 6 | j j S )N)r get_distr s r get_metadata_distributionz,SourceDistribution.get_metadata_distribution s xx ""r finderbuild_isolationcheck_build_depsNc & | j j | j j xr |}|r<| j | | j j | j | | j j xr |}|ri| j j }|J | j j j | \ }}|r| j d| |r| j | | j j y )Nthe backend dependencies)r load_pyproject_toml use_pep517_prepare_build_backendisolated_editable_sanity_check_install_build_reqspyproject_requires build_envcheck_requirements_raise_conflicts_raise_missing_reqsprepare_metadata) r r r r should_isolateshould_check_depsr&