a
    <BìjÆ  ã                   @  s\   d dl mZ d dlZd dlZd dlmZmZ d dlmZ e 	e
¡Zddddddœd	d
„ZdS )é    )ÚannotationsN)ÚBuildBackendHookCallerÚHookMissing)Úrunner_with_spinner_messageÚstrr   z
str | None)ÚnameÚbackendÚmetadata_directoryÚwheel_directoryÚreturnc                 C  sÜ   |dusJ ‚z t  d|¡ td| › d�ƒ}| |¡�f z|j||d�}W nB tyŠ } z*t  d| |¡ W Y d}~W d  ƒ W dS d}~0 0 W d  ƒ n1 s 0    Y  W n  tyÌ   t  d| ¡ Y dS 0 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
   r	   zLCannot build editable %s because the build backend does not have the %s hookzFailed building editable for %s)ÚloggerÚdebugr   Úsubprocess_runnerZbuild_editabler   ÚerrorÚ	ExceptionÚosÚpathÚjoin)r   r   r	   r
   ÚrunnerÚ
wheel_nameÚe© r   úl/mnt/bigstor/www/usecases/.venv/lib/python3.9/site-packages/pip/_internal/operations/build/wheel_editable.pyÚbuild_wheel_editable   s.    

ÿþ
üHr   )Ú
__future__r   Úloggingr   Zpip._vendor.pyproject_hooksr   r   Úpip._internal.utils.subprocessr   Ú	getLoggerÚ__name__r   r   r   r   r   r   Ú<module>   s   
