Ë
    ð�©jg  ã                  óÎ   — 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
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)Únullcontext)Ú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    úh/var/www/html/streamforge-license/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Ò#ð ×'Ñ'¨Ô8ð
 �H‰H×*Ñ*Ô,à×$Ñ$Ø# _Àoð %õ ð �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_envS   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 ‚|dk(  r| j                   j                  n	t        «       }|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)	Nr5   Ú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   r   Úinstall_requirementsr)   Úrequirements_to_checkr*   ÚloggerÚwarningÚjoinÚmapÚreprÚsorted)r   r.   r'   Úcontextr0   r1   s         r   r$   z)SourceDistribution._prepare_build_backend_   s%  € à!ŸX™X×8Ñ8ÐØ!Ð-Ð-Ð-Ü˜dŸh™h×0Ñ0Ô2FÔGÐGÐGà(7¸6Ò(A�$—(‘(×$Ò$Ä{Ã}ˆØñ 	Ø�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   rH   rI   Úget_requires_for_build_editablerK   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úrO   c                óø  — | j                   j                  r)|r'| j                   j                  r| j                  «       }n| j	                  «       }| j                   j
                  j                  |«      \  }}|r| j                  d|«       |dk(  r| j                   j
                  n	t        «       }|5  | j                   j
                  j                  |dd| j                   ¬«       d d d «       y # 1 sw Y   y xY w)Nr!   r5   Únormalzbackend dependenciesr:   )
r   ÚeditableÚsupports_pyproject_editablerR   rN   r(   r)   r*   r   r>   )r   r-   r.   r    Ú
build_reqsr0   r1   rF   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Ø(7¸6Ò(A�$—(‘(×$Ò$Ä{Ã}ˆØñ 	Ø�H‰H×Ñ×3Ñ3Ø˜Ð(>ÈÏÉð 4ô ÷	÷ 	ñ 	ús   Â34C0Ã0C9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   rB   rE   r   )r   ra   Ú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}.rY   )r`   r1   )rc   r   rB   rC   rD   rE   r   )r   r1   re   rf   s       r   r+   z&SourceDistribution._raise_missing_reqsº   sK   € àOð 	ð &×,Ñ,ØŸ™¨$¯)©)´C¼¼fÀW»oÓ4NÓ*Oð -ó 
ˆô   Ó.Ð.r   N)Úreturnz
str | None)rh   r   )
r-   r   r.   r   r/   Úboolr    ri   rh   ÚNone)r.   r   r-   r   rh   rj   )r.   r   rh   rj   )rh   zIterable[str])r-   r   r.   r   r    ri   rh   rj   )ra   Ústrrd   zset[tuple[str, str]]rh   rj   )r1   zset[str]rh   rj   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__Úpropertyr   r   r2   r#   r$   rN   rR   r&   r*   r+   r[   r   r   r   r      sØ   „ ñð ò2ó ð2ó
#ð(3à6ð(3ð ,ð(3ð ð	(3ð
 ð(3ð 
ó(3ðT
Ià+ð
Ið 7ð
Ið 
ó	
Ióó<>óAðà6ðð ,ðð ð	ð
 
óð4/Ø #ð/Ø7Kð/à	ó/ô"/r   r   )Ú
__future__r   ÚloggingÚcollections.abcr   Ú
contextlibr   Útypingr   Úpip._internal.build_envr   r   r	   r
   Ú pip._internal.distributions.baser   Úpip._internal.exceptionsr   Úpip._internal.metadatar   Úpip._internal.utils.subprocessr   r   Ú	getLoggerrl   r@   r   r[   r   r   ú<module>r|      sT   ðÝ "ã Ý $Ý "Ý  ÷ó õ BÝ 6Ý 3Ý FáÝAà	ˆ×	Ñ	˜8Ó	$€ôh/Ð-õ h/r   