Ë
    KêjD  ã                  óð   — d Z ddlmZ ddlZddl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mZmZ e	rdd	lmZ  G d
„ de«      Z G d„ de«      Z G d„ de«      Z G d„ dee«      Z G d„ de«      Zy)z)Build environment related pip exceptions.é    )ÚannotationsN)ÚIterable)ÚTYPE_CHECKING)Úescape)ÚText)ÚDiagnosticPipErrorÚInstallationErrorÚPipError)ÚInstallRequirementc                  ó<   ‡ — e Zd ZdZdZ	 	 	 	 	 	 	 	 	 	 dˆ fd„Zˆ xZS )ÚBuildDependencyInstallErrorz3Raised when build dependencies cannot be installed.zfailed-build-dependency-installc               ó  •— t        |t        «      rd}nd}|€t        d«      }n¯t        |t        «      r|j                  d|› �«       nA|j	                  dj                  t        j                  |«      «      j                  «       «       t        j                  ddj                  |«      › d�d	t        |«      › d
�dfdj                  |«      d«      }t        dd«      }|r|t        d|› �«      z  }t        ‰| �1  ||d |¬«       y )Nú&This is likely not a problem with pip.zmpip crashed unexpectedly. Please file an issue on pip's issue tracker: https://github.com/pypa/pip/issues/newzSee above for more details.zERROR: Ú zInstalling ú ú
ú[z lines of output]
Úred)z
[end of output]r   z!Cannot install build dependenciesÚgreenz for ©ÚmessageÚcontextÚ	hint_stmtÚ	note_stmt)Ú
isinstancer
   r   ÚappendÚextendÚjoinÚ	tracebackÚformat_exceptionÚ
splitlinesÚassembleÚlenÚsuperÚ__init__)	ÚselfÚreqÚ
build_reqsÚcauseÚ	log_linesÚnoter   r   Ú	__class__s	           €úc/home/oem/CyberBrain26-unified/.venv/lib/python3.12/site-packages/pip/_internal/exceptions/build.pyr%   z$BuildDependencyInstallError.__init__   s  ø€ ô �eœXÔ&Ø;‰DðBð ð
 ÐäÐ8Ó9‰Gä˜%¤Ô*Ø× Ñ  7¨5¨'Ð!2Õ3ð × Ñ Ø—G‘GœI×6Ñ6°uÓ=Ó>×IÑIÓKôô —m‘mØ˜cŸh™h zÓ2Ð3°2Ð6Ø”S˜“^Ð$Ð$7Ð8¸%Ð@Ø—	‘	˜)Ó$Ø,ó	ˆGô Ð:¸GÓDˆÙØ”t˜e C 5˜MÓ*Ñ*ˆGÜ‰ÑØ W¸Èð 	õ 	
ó    )
r'   zInstallRequirement | Noner(   zIterable[str]r)   Ú	Exceptionr*   úlist[str] | NoneÚreturnÚNone©Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú	referencer%   Ú__classcell__©r,   s   @r-   r   r      sE   ø„ Ù=à1€Ið(
à&ð(
ð "ð(
ð
 ð(
ð $ð(
ð 
÷(
ñ (
r.   r   c                  ó(   ‡ — e Zd ZdZdZdˆ fd„Zˆ xZS )ÚVenvImportErrorz%Raised when 'venv' can't be imported.zvenv-import-errorc                ó\   •— t         j                  dk7  rd }nd}t        ‰| �  ddd|¬«       y )NÚlinuxz�If this is an OS-provided Python, it's likely that your OS package maintainers have split Python's standard library across multiple OS packages.z>Cannot import the 'venv' module of the Python standard libraryzMThis is a symptom of a broken/modified Python, which cannot be used with pip.z>This is an issue with the Python installation itself, not pip.)r   r   r   r   )ÚsysÚplatformr$   r%   )r&   r   r,   s     €r-   r%   zVenvImportError.__init__M   sC   ø€ Ü�<‰<˜7Ò"Ø‰Ið(ð ô
 	‰ÑØTðð WØð 	õ 	
r.   )r1   r2   r3   r:   s   @r-   r<   r<   H   s   ø„ Ù/à#€I÷
ñ 
r.   r<   c                  ó(   ‡ — e Zd ZdZdZdˆ fd„Zˆ xZS )ÚVenvCreationErrorz3Raised when a virtual environment can't be created.zvenv-creation-errorc                ól   •— t         j                  dk(  rd}nd }t        ‰| �  dt	        |«      |¬«       y )NÚntz1This may be caused by running antivirus software.z#Cannot create a virtual environment)r   r   r   )ÚosÚnamer$   r%   r   )r&   r   Úhintr,   s      €r-   r%   zVenvCreationError.__init__f   s7   ø€ Ü�7‰7�dŠ?ØF‰DàˆDÜ‰ÑØ9Ü˜“MØð 	õ 	
r.   )r   Ústrr1   r2   r3   r:   s   @r-   rB   rB   a   s   ø„ Ù=à%€I÷	
ñ 	
r.   rB   c                  ó@   ‡ — e Zd ZdZdZ	 	 	 	 	 	 	 	 dˆ fd„Zdd„Zˆ xZS )ÚInstallationSubprocessErrorzA subprocess call failed.zsubprocess-exited-with-errorc               ó(  •— |€t        d«      }nSt        j                  dt        |«      › d�«      t        dj                  |«      «      z   t        j                  d«      z   }t        ‰| �  dt        |«      › d|› �|d d¬	«       || _        || _        y )
NzNo available output.z[red][z lines of output][/]
r   z[red]\[end of output][/]z[green]z)[/] did not run successfully.
exit code: zNThis error originates from a subprocess, and is likely not a problem with pip.r   )	r   Úfrom_markupr#   r   r$   r%   r   Úcommand_descriptionÚ	exit_code)r&   rM   rN   Úoutput_linesÚoutput_promptr,   s        €r-   r%   z$InstallationSubprocessError.__init__w   sµ   ø€ ð ÐÜ Ð!7Ó8‰Mô × Ñ  6¬#¨lÓ*;Ð)<Ð<RÐ!SÓTÜ�r—w‘w˜|Ó,Ó-ñ.ä×"Ñ"Ð#>Ó?ñ@ð ô 	‰Ñàœ&Ð!4Ó5Ð6ð 7Ø'˜[ð*ð "Øð$ð 	ô 	
ð $7ˆÔ Ø"ˆ�r.   c                ó8   — | j                   › d| j                  › �S )Nz exited with )rM   rN   ©r&   s    r-   Ú__str__z#InstallationSubprocessError.__str__—   s   € Ø×*Ñ*Ð+¨=¸¿¹Ð8HÐIÐIr.   )rM   rH   rN   ÚintrO   r0   r1   r2   ©r1   rH   )r4   r5   r6   r7   r8   r%   rS   r9   r:   s   @r-   rJ   rJ   r   s?   ø„ Ù#à.€Ið#ð !ð#ð ð	#ð
 'ð#ð 
õ#÷@Jr.   rJ   c                  ó4   — e Zd ZdZdZ	 	 	 	 	 	 	 	 dd„Zdd„Zy)ÚBackendUnavailableErrorz&The build backend could not be loaded.zbackend-unavailablec               óf   — t        j                  | dt        |«      ›d�|d d¬«       d|› �| _        y )NzCannot import build backend ú.r   r   zCalling build backend hook )r   r%   r   rM   )r&   Ú	hook_nameÚbackend_nameÚbackend_errors       r-   r%   z BackendUnavailableError.__init__    sB   € ô 	×#Ñ#ØØ2´6¸,Ó3GÐ2JÈ!ÐLØ!ØØ>õ	
ð &AÀÀÐ#LˆÕ r.   c                ó,   — t        | j                  «      S )N)rH   r   rR   s    r-   rS   zBackendUnavailableError.__str__¬   s   € Ü�4—<‘<Ó Ð r.   N)rZ   rH   r[   rH   r\   rH   r1   r2   rU   )r4   r5   r6   r7   r8   r%   rS   © r.   r-   rW   rW   ›   s9   „ Ù0à%€Ið
MØð
MØ/2ð
MØCFð
Mà	ó
Mô!r.   rW   )r7   Ú
__future__r   rE   r?   r   Úcollections.abcr   Útypingr   Úpip._vendor.rich.markupr   Úpip._vendor.rich.textr   Úpip._internal.exceptions._baser   r	   r
   Úpip._internal.req.req_installr   r   r<   rB   rJ   rW   r^   r.   r-   ú<module>rf      sz   ðÙ /å "ã 	Û 
Û Ý $Ý  å *Ý &÷ñ ñ Ý@ô-
Ð"4ô -
ô`
Ð(ô 
ô2
Ð*ô 
ô"&JÐ"4Ð6Gô &JôR!Ð9õ !r.   