a
    bai                     @  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 zt 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 s0    Y  W n  ty   t d|  Y dS 0 tj	
||S )zBuild 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   g/var/www/html/SiteWeb/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   
