Ë
    mò˜h(  ã                  ó¶   — d dl mZ d dlZd dlmZ d dlmZ d dlmZ d dl	m
Z
 d dlmZ d dlmZ d d	lmZ erd d
lmZ  ej$                  e«      Z G d„ de
«      Zy)é    )ÚannotationsN)ÚIterable)ÚTYPE_CHECKING)ÚBuildEnvironment)ÚAbstractDistribution)ÚInstallationError)ÚBaseDistribution)Úrunner_with_spinner_message)ÚBuildEnvironmentInstallerc                  óŽ   — e Zd ZdZedd„«       Zdd„Z	 	 	 	 	 	 	 	 dd„Z	 	 	 	 dd„Zdd„Z	dd„Z
	 	 	 	 dd„Z	 	 	 	 	 	 dd	„Zdd
„Zy)Ú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`.
    c                ór   — | j                   j                  sJ ‚| j                   j                  j                  S )z/Identify this requirement uniquely by its link.)ÚreqÚlinkÚurl_without_fragment©Úselfs    úc/root/html/w1hd9_aprs_logger/venv/lib/python3.12/site-packages/pip/_internal/distributions/sdist.pyÚbuild_tracker_idz#SourceDistribution.build_tracker_id   s(   € ð �x‰x�}Š}Ðˆ}Ø�x‰x�}‰}×1Ñ1Ð1ó    c                ó6   — | j                   j                  «       S )N)r   Úget_distr   s    r   Úget_metadata_distributionz,SourceDistribution.get_metadata_distribution    s   € Ø�x‰x× Ñ Ó"Ð"r   c                ó&  — | j                   j                  «        | j                   j                  xr |}|r<| j                  |«       | j                   j	                  «        | j                  |«       | j                   j                  xr |}|ri| j                   j                  }|€J ‚| j                   j                  j                  |«      \  }}|r| j                  d|«       |r| j                  |«       | j                   j                  «        y )Núthe backend dependencies)r   Úload_pyproject_tomlÚ
use_pep517Ú_prepare_build_backendÚisolated_editable_sanity_checkÚ_install_build_reqsÚpyproject_requiresÚ	build_envÚcheck_requirementsÚ_raise_conflictsÚ_raise_missing_reqsÚprepare_metadata)	r   Úbuild_env_installerÚbuild_isolationÚcheck_build_depsÚshould_isolateÚshould_check_depsr!   ÚconflictingÚmissings	            r   Úprepare_distribution_metadataz0SourceDistribution.prepare_distribution_metadata#   sí   € ð 	�‰×$Ñ$Ô&ð Ÿ™×,Ñ,Ò@°ˆÙð ×'Ñ'Ð(;Ô<ð �H‰H×3Ñ3Ô5à×$Ñ$Ð%8Ô9à ŸH™H×/Ñ/ÒDÐ4DÐÙØ!%§¡×!<Ñ!<ÐØ%Ð1Ð1Ð1Ø#'§8¡8×#5Ñ#5×#HÑ#HØ"ó$Ñ ˆK˜ñ Ø×%Ñ%Ð&@À+ÔNÙØ×(Ñ(¨Ô1Ø�‰×!Ñ!Õ#r   c                ó0  — | j                   j                  }|€J ‚t        |«      | j                   _        | j                   j                  j	                  |dd| j                   ¬«       | j                   j                  j                  | j                   j                  «      \  }}|r| j                  d|«       |r]t        j                  d| j                   «       t        j                  ddj                  t        t        t        |«      «      «      «       y y )NÚoverlayzbuild dependencies©ÚkindÚfor_reqz"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"   Úinstall_requirementsr#   Úrequirements_to_checkr$   ÚloggerÚwarningÚjoinÚmapÚreprÚsorted)r   r'   r!   r,   r-   s        r   r   z)SourceDistribution._prepare_build_backendJ   sê   € ð
 "ŸX™X×8Ñ8ÐØ!Ð-Ð-Ð-ä-Ð.AÓBˆ�‰ÔØ�‰×Ñ×/Ñ/Ø 	Ð0DÈdÏhÉhð 	0ô 	
ð  $Ÿx™x×1Ñ1×DÑDØ�H‰H×*Ñ*ó 
Ñˆ�Wñ Ø×!Ñ!Ð"FÈÔTÙÜ�N‰NØFØ—‘ôô �N‰NðAà—‘œS¤¤v¨g£Ó7Ó8õð r   c                ó&  — | j                   j                  5  t        d«      }| j                   j                  }|€J ‚|j	                  |«      5  |j                  «       cd d d «       cd d d «       S # 1 sw Y   nxY w	 d d d «       y # 1 sw Y   y xY w)Nz#Getting requirements to build wheel)r   r"   r
   Úpep517_backendÚsubprocess_runnerÚget_requires_for_build_wheel©r   ÚrunnerÚbackends      r   Ú_get_build_requires_wheelz,SourceDistribution._get_build_requires_wheelf   s�   € Ø�X‰X×Ññ 	>Ü0Ð1VÓWˆFØ—h‘h×-Ñ-ˆGØÐ&Ð&Ð&Ø×*Ñ*¨6Ó2ñ >Ø×;Ñ;Ó=÷>ð >÷		>ñ 	>÷>ð >úð >÷		>÷ 	>ñ 	>úó#   —7BÁA1Á	BÁ1A:	Á6BÂBc                ó&  — | j                   j                  5  t        d«      }| j                   j                  }|€J ‚|j	                  |«      5  |j                  «       cd d d «       cd d d «       S # 1 sw Y   nxY w	 d d d «       y # 1 sw Y   y xY w)Nz&Getting requirements to build editable)r   r"   r
   r=   r>   Úget_requires_for_build_editabler@   s      r   Ú_get_build_requires_editablez/SourceDistribution._get_build_requires_editablen   s�   € Ø�X‰X×Ññ 	AÜ0Ø8óˆFð —h‘h×-Ñ-ˆGØÐ&Ð&Ð&Ø×*Ñ*¨6Ó2ñ AØ×>Ñ>Ó@÷Að A÷	Añ 	A÷Að Aúð A÷	A÷ 	Añ 	AúrD   c                ó¨  — | j                   j                  r=| j                   j                  r'| j                   j                  r| j	                  «       }n| j                  «       }| j                   j                  j                  |«      \  }}|r| j                  d|«       | j                   j                  j                  |dd| j                   ¬«       y )Nr   Únormalzbackend dependenciesr1   )
r   ÚeditableÚpermit_editable_wheelsÚsupports_pyproject_editablerG   rC   r"   r#   r$   r4   )r   r'   Ú
build_reqsr,   r-   s        r   r    z&SourceDistribution._install_build_reqsx   s¥   € ð �H‰H×ÒØ—‘×/Ò/Ø—‘×4Ò4à×:Ñ:Ó<‰Jà×7Ñ7Ó9ˆJØ#Ÿx™x×1Ñ1×DÑDÀZÓPÑˆ�WÙØ×!Ñ!Ð"<¸kÔJØ�‰×Ñ×/Ñ/Ø�XÐ$:ÀDÇHÁHð 	0õ 	
r   c           
     ó–   — d}|j                  | j                  |dj                  d„ t        |«      D «       «      ¬«      }t	        |«      ‚)NzZSome build dependencies for {requirement} conflict with {conflicting_with}: {description}.ú, c              3  ó0   K  — | ]  \  }}|› d |› �–— Œ y­w)z is incompatible with N© )Ú.0Ú	installedÚwanteds      r   ú	<genexpr>z6SourceDistribution._raise_conflicts.<locals>.<genexpr>—   s(   è ø€ ò "á%�I˜vð �+Ð3°F°8Ô<ñ"ùs   ‚)ÚrequirementÚconflicting_withÚdescription)Úformatr   r8   r;   r   )r   rW   Úconflicting_reqsÚformat_stringÚerror_messages        r   r$   z#SourceDistribution._raise_conflicts�   sY   € ð?ð 	ð &×,Ñ,ØŸ™Ø-ØŸ	™	ñ "ä)/Ð0@Ó)Aô"ó ð -ó 
ˆô   Ó.Ð.r   c                ó¢   — d}|j                  | j                  dj                  t        t        t        |«      «      «      ¬«      }t        |«      ‚)NzASome build dependencies for {requirement} are missing: {missing}.rO   )rV   r-   )rY   r   r8   r9   r:   r;   r   )r   r-   r[   r\   s       r   r%   z&SourceDistribution._raise_missing_reqsž   sK   € àOð 	ð &×,Ñ,ØŸ™¨$¯)©)´C¼¼fÀW»oÓ4NÓ*Oð -ó 
ˆô   Ó.Ð.r   N)Úreturnz
str | None)r^   r	   )r'   r   r(   Úboolr)   r_   r^   ÚNone)r'   r   r^   r`   )r^   zIterable[str])rW   ÚstrrZ   zset[tuple[str, str]]r^   r`   )r-   zset[str]r^   r`   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__Úpropertyr   r   r.   r   rC   rG   r    r$   r%   rQ   r   r   r   r      s£   „ ñð ò2ó ð2ó
#ð%$à6ð%$ð ð%$ð ð	%$ð
 
ó%$ðNØ#<ðà	óó8>óAð
Ø#<ð
à	ó
ð*/Ø #ð/Ø7Kð/à	ó/ô"/r   r   )Ú
__future__r   ÚloggingÚcollections.abcr   Útypingr   Úpip._internal.build_envr   Ú pip._internal.distributions.baser   Úpip._internal.exceptionsr   Úpip._internal.metadatar	   Úpip._internal.utils.subprocessr
   r   Ú	getLoggerrb   r6   r   rQ   r   r   ú<module>rq      sG   ðÝ "ã Ý $Ý  å 4Ý AÝ 6Ý 3Ý FáÝAà	ˆ×	Ñ	˜8Ó	$€ôR/Ð-õ R/r   