o
    !7h$                     @   s   d dl Z d dlZd dlmZmZ d dlmZ d dlm	Z	 d dl
mZ d dlmZmZ e eZdee ded	efd
dZdee dededee ded	ee fddZdedededee dee ded	ee fddZdS )    N)ListOptional)open_spinner)
deprecated) make_setuptools_bdist_wheel_args)call_subprocessformat_command_argscommand_argscommand_outputreturnc                 C   sb   t | }d| d}|s|d7 }|S t tjkr|d7 }|S |ds(|d7 }|d| 7 }|S )z'Format command information for logging.zCommand arguments: 
zCommand output: Nonez'Command output: [use --verbose to show]zCommand output:
)r   loggergetEffectiveLevelloggingDEBUGendswith)r	   r
   command_desctext r   /var/www/epreuve.sigeris.cm/public_html/epreuve/venv/lib/python3.10/site-packages/pip/_internal/operations/build/wheel_legacy.pyformat_command_result   s   
r   namestemp_dirnamec                 C   s|   t | } | sd|d}|t||7 }t| dS t| dkr5d|d|  d}|t||7 }t| tj|| d S )z>Return the path to the wheel in the temporary build directory.zLegacy build of wheel for z created no files.
N   z9 created more than one file.
Filenames (choosing first): r   r   )sortedr   r   warninglenospathjoin)r   r   r   r	   r
   msgr   r   r   get_legacy_build_wheel_path!   s   	

r"   setup_py_path
source_dirglobal_optionsbuild_optionstempdc              	   C   s   t d| dd| ddd t||||d}d|  d	}t|D}td
| z
t|d||d}	W n tyM   |d td|  Y W d   dS w t	
|}
t|
|| ||	d}|W  d   S 1 shw   Y  dS )zBuild one unpacked package using the "legacy" build process.

    Returns path to wheel if successfully built. Otherwise, returns None.
    z	Building z\ using the legacy setup.py bdist_wheel mechanism, which will be removed in a future version.zto use the standardized build interface by setting the `--use-pep517` option, (possibly combined with `--no-build-isolation`), or adding a `pyproject.toml` file to the source tree of z25.3i  )reasonreplacementgone_inissue)r%   r&   destination_dirzBuilding wheel for z (setup.py)zDestination directory: %szpython setup.py bdist_wheel)r   cwdspinnererrorzFailed building wheel for %sN)r   r   r   r	   r
   )r   r   r   r   debugr   	Exceptionfinishr/   r   listdirr"   )r   r#   r$   r%   r&   r'   
wheel_argsspin_messager.   outputr   
wheel_pathr   r   r   build_wheel_legacy<   sP   





$r8   )r   os.pathr   typingr   r   pip._internal.cli.spinnersr   pip._internal.utils.deprecationr   $pip._internal.utils.setuptools_buildr   pip._internal.utils.subprocessr   r   	getLogger__name__r   strr   r"   r8   r   r   r   r   <module>   sV    


