U ÀÒ.eeã@sVddlZddlmZddlmZddlmZddlmZe  e ¡Z Gdd„deƒZ dS)éN)ÚBuildEnvironment)ÚAbstractDistribution)ÚInstallationError)Úrunner_with_spinner_messagec@s(eZdZdZdd„Zdd„Zdd„ZdS) ÚSourceDistributionaÅ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`. NOTE from @pradyunsg (14 June 2019) I expect SourceDistribution class will need to be split into `legacy_source` (setup.py based) and `source` (PEP 517 based) when we start bringing logic for preparation out of InstallRequirement into this class. cCs |j ¡S©N)ÚreqZget_dist)Úself©r úM/usr/lib/python3.8/site-packages/pip/_internal/distributions/source/legacy.pyÚget_pkg_resources_distributionsz1SourceDistribution.get_pkg_resources_distributioncCs<|j ¡|jjo|}|r$| |¡|j ¡|j ¡dSr)rZload_pyproject_tomlZ use_pep517Ú_setup_isolationZprepare_metadataZassert_source_matches_version)r ÚfinderZbuild_isolationZshould_isolater r r Úprepare_distribution_metadatas     z0SourceDistribution.prepare_distribution_metadatac sü‡‡fdd„}tƒˆj_ˆjj |ˆjjdd¡ˆjj ˆjj¡\‰}ˆrT|dˆƒ|r‚t dˆj¡t dd  t t t |ƒƒ¡¡ˆjj4t d ƒ}ˆjj}| |¡| ¡}W5QRXW5QRXˆjj |¡\‰}ˆrä|d ˆƒˆjj ||d d ¡dS) Ncs6d}|jˆj|d dd„tˆƒDƒ¡d}t|ƒ‚dS)NzZSome build dependencies for {requirement} conflict with {conflicting_with}: {description}.z, css|]\}}d||fVqdS)z%s is incompatible with %sNr )Ú.0Z installedZwantedr r r Ú 3sÿzPSourceDistribution._setup_isolation.._raise_conflicts..)Z requirementÚconflicting_withÚ description)ÚformatrÚjoinÚsortedr)rZconflicting_reqsÚ format_stringZ error_message©Z conflictingr r r Ú_raise_conflicts+sÿ þýz=SourceDistribution._setup_isolation.._raise_conflictsZoverlayzInstalling build dependenciesz"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 z#Getting requirements to build wheelzthe backend dependenciesZnormalzInstalling backend dependencies)rrZ build_envZinstall_requirementsZpyproject_requiresZcheck_requirementsZrequirements_to_checkÚloggerZwarningrÚmapÚreprrrZpep517_backendZsubprocess_runnerZget_requires_for_build_wheel)r rrZmissingZrunnerZbackendZreqsr rr r *sP þÿÿþý ÿ  þz#SourceDistribution._setup_isolationN)Ú__name__Ú __module__Ú __qualname__Ú__doc__r rr r r r r rs  r) ZloggingZpip._internal.build_envrZ pip._internal.distributions.baserZpip._internal.exceptionsrZpip._internal.utils.subprocessrZ getLoggerrrrr r r r Ús