U
    Ðvag‰  ã                   @   s`   d dl Z d dlZd dlmZ d dlmZmZ d dlmZ e  	e
¡Zeeeeee dœdd„ZdS )é    N)ÚOptional)ÚBuildBackendHookCallerÚHookMissing)Úrunner_with_spinner_message)ÚnameÚbackendÚmetadata_directoryÚtempdÚreturnc                 C   sÊ   |dk	st ‚zŒt d|¡ td| › d�ƒ}| |¡�\ z|j||d�}W nB tk
rŠ } z$t d| |¡ W Y ¢W 5 Q R £ W dS d}~X Y nX W 5 Q R X W n" tk
rº   t d| ¡ Y dS X t	j
 ||¡S )z�Build one InstallRequirement using the PEP 660 build process.

    Returns path to wheel if successfully built. Otherwise, returns None.
    NzDestination directory: %szBuilding editable for z (pyproject.toml))r   zLCannot build editable %s because the build backend does not have the %s hookzFailed building editable for %s)ÚAssertionErrorÚloggerÚdebugr   Úsubprocess_runnerÚbuild_editabler   ÚerrorÚ	ExceptionÚosÚpathÚjoin)r   r   r   r	   ÚrunnerÚ
wheel_nameÚe© r   úa/var/www/html/myvenv/lib/python3.8/site-packages/pip/_internal/operations/build/wheel_editable.pyÚbuild_wheel_editable   s.    

ÿþ
ü2r   )Úloggingr   Útypingr   Úpip._vendor.pyproject_hooksr   r   Úpip._internal.utils.subprocessr   Ú	getLoggerÚ__name__r   Ústrr   r   r   r   r   Ú<module>   s   
û