Ë
    ìLqj>  ã                  óÂ   — d dl mZ d dlZd dlmZ d dlmZ d dlmZm	Z	m
Z
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)ÚBuildIsolationModeÚNoOpBuildEnvironmentÚVenvBuildEnvironmentÚVirtualBuildEnvironment)Ú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dd„Zy)ÚSourceDistributionzRepresents a source distribution.

    The preparation step for these needs metadata for the packages to be
    generated.
    c                ór   — | j                   j                  sJ ‚| j                   j                  j                  S )z/Identify this requirement uniquely by its link.)ÚreqÚlinkÚurl_without_fragment©Úselfs    úm/var/www/html/ai-menu-system/python-ai/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                  ||«       |dk7  r>| j                  «        | j                   j	                  «        | j                  ||¬«       n| j                   j	                  «        |ri| j                   j                  }|€J ‚| j                   j                  j                  |«      \  }}|r| j                  d|«       |r| j                  |«       | j                   j                  |«       y )NÚoff)Úallow_editablesúthe backend dependencies)r   Úload_pyproject_tomlÚ_prepare_build_envÚ_prepare_build_backendÚ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_depsr   r&   ÚconflictingÚmissings           r   Úprepare_distribution_metadataz0SourceDistribution.prepare_distribution_metadata(   só   € ð 	�‰×$Ñ$Ô&Ø×Ñ Ð1DÔEð ˜eÒ#ð ×'Ñ'Ô)ð
 �H‰H×*Ñ*Ô,à×$Ñ$Ø#°_ð %õ ð �H‰H×*Ñ*Ô,áØ!%§¡×!<Ñ!<ÐØ%Ð1Ð1Ð1Ø#'§8¡8×#5Ñ#5×#HÑ#HØ"ó$Ñ ˆK˜ñ Ø×%Ñ%Ð&@À+ÔNÙØ×(Ñ(¨Ô1Ø�‰×!Ñ! /Õ2r   c                óô   — |dk(  rt        |«      | j                  _        n|dk(  rt        |«      | j                  _        | j                  j	                  | j                  j                  j
                  «       y )NÚvirtualÚvenv)r	   r   r'   r   Úconfigure_backendÚpython_executable)r   r-   r,   s      r   r"   z%SourceDistribution._prepare_build_envR   sZ   € ð
 ˜iÒ'Ü!8Ð9LÓ!MˆD�H‰HÕØ Ò&Ü!5Ð6IÓ!JˆD�H‰HÔà�‰×"Ñ" 4§8¡8×#5Ñ#5×#GÑ#GÕHr   c                óž  — | j                   j                  }|€J ‚t        | j                   j                  t        «      rJ ‚| j                   j                  5  | j                   j                  j                  |dd| j                   ¬«       d d d «       | j                   j                  j                  | j                   j                  «      \  }}|r| j                  d|«       |r]t        j                  d| j                   «       t        j                  ddj                  t        t        t        |«      «      «      «       y y # 1 sw Y   Œ¹xY w)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&   Ú
isinstancer'   r   Úinstall_requirementsr(   Úrequirements_to_checkr)   ÚloggerÚwarningÚjoinÚmapÚreprÚsorted)r   r&   r/   r0   s       r   r#   z)SourceDistribution._prepare_build_backend^   s  € à!ŸX™X×8Ñ8ÐØ!Ð-Ð-Ð-Ü˜dŸh™h×0Ñ0Ô2FÔGÐGÐGà�X‰X×Ññ 	Ø�H‰H×Ñ×3Ñ3Ø"ØØ)ØŸ™ð	 4ô ÷	ð  $Ÿx™x×1Ñ1×DÑDØ�H‰H×*Ñ*ó 
Ñˆ�Wñ Ø×!Ñ!Ð"FÈÔTÙÜ�N‰NØFØ—‘ôô �N‰NðAà—‘œS¤¤v¨g£Ó7Ó8õð ÷	ð 	ús   Á4EÅE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_wheel{   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   rF   rG   Úget_requires_for_build_editablerI   s      r   Ú_get_build_requires_editablez/SourceDistribution._get_build_requires_editableƒ   s�   € Ø�X‰X×Ññ 	AÜ0Ø8óˆFð —h‘h×-Ñ-ˆGØÐ&Ð&Ð&Ø×*Ñ*¨6Ó2ñ AØ×>Ñ>Ó@÷Að A÷	Añ 	A÷Að Aúð A÷	A÷ 	Añ 	AúrM   c                óÖ  — | j                   j                  r)|r'| j                   j                  r| j                  «       }n| j	                  «       }| j                   j
                  j                  |«      \  }}|r| j                  d|«       | j                   j
                  5  | j                   j
                  j                  |dd| j                   ¬«       d d d «       y # 1 sw Y   y xY w)Nr    Únormalzbackend dependenciesr9   )	r   ÚeditableÚsupports_pyproject_editablerP   rL   r'   r(   r)   r=   )r   r,   r   Ú
build_reqsr/   r0   s         r   r%   z&SourceDistribution._install_build_reqs�   s½   € ð �H‰H×ÒÙØ—‘×4Ò4à×:Ñ:Ó<‰Jà×7Ñ7Ó9ˆJØ#Ÿx™x×1Ñ1×DÑDÀZÓPÑˆ�WÙØ×!Ñ!Ð"<¸kÔJØ�X‰X×Ññ 	Ø�H‰H×Ñ×3Ñ3Ø˜Ð(>ÈÏÉð 4ô ÷	÷ 	ñ 	ús   Â"4CÃC(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   rA   rD   r   )r   r_   Ú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}.rW   )r^   r0   )ra   r   rA   rB   rC   rD   r   )r   r0   rc   rd   s       r   r*   z&SourceDistribution._raise_missing_reqs¶   sK   € àOð 	ð &×,Ñ,ØŸ™¨$¯)©)´C¼¼fÀW»oÓ4NÓ*Oð -ó 
ˆô   Ó.Ð.r   N)Úreturnz
str | None)rf   r   )
r,   r   r-   r   r.   Úboolr   rg   rf   ÚNone)r-   r   r,   r   rf   rh   )rf   rh   )rf   zIterable[str])r,   r   r   rg   rf   rh   )r_   Ústrrb   zset[tuple[str, str]]rf   rh   )r0   zset[str]rf   rh   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__Úpropertyr   r   r1   r"   r#   rL   rP   r%   r)   r*   rY   r   r   r   r      sÎ   „ ñð ò2ó ð2ó
#ð(3à6ð(3ð ,ð(3ð ð	(3ð
 ð(3ð 
ó(3ðT
Ià+ð
Ið 7ð
Ið 
ó	
Ióó:>óAðà6ðð ðð 
ó	ð0/Ø #ð/Ø7Kð/à	ó/ô"/r   r   )Ú
__future__r   ÚloggingÚcollections.abcr   Útypingr   Úpip._internal.build_envr   r   r   r	   Ú pip._internal.distributions.baser
   Úpip._internal.exceptionsr   Úpip._internal.metadatar   Úpip._internal.utils.subprocessr   r   Ú	getLoggerrj   r?   r   rY   r   r   ú<module>ry      sQ   ðÝ "ã Ý $Ý  ÷ó õ BÝ 6Ý 3Ý FáÝAà	ˆ×	Ñ	˜8Ó	$€ôe/Ð-õ e/r   