관리-도구
편집 파일: wheel_legacy.cpython-39.pyc
a [��f� � @ s� d dl Z d dlZd dlmZmZ d dlmZ d dlm Z d dl mZmZm Z e �e�Zee eed�dd�Zee eeee eee d �d d�Zeeeee ee eee d�d d�ZdS )� N)�List�Optional)�open_spinner)� make_setuptools_bdist_wheel_args)�LOG_DIVIDER�call_subprocess�format_command_args)�command_args�command_output�returnc C sb t | �}d|� d�}|s"|d7 }n<t�� tjkr:|d7 }n$|�d�sL|d7 }|d|� t� �7 }|S )z'Format command information for logging.zCommand arguments: � zCommand output: Nonez'Command output: [use --verbose to show]zCommand output: )r �loggerZgetEffectiveLevel�logging�DEBUG�endswithr )r r Zcommand_desc�text� r �O/usr/lib/python3.9/site-packages/pip/_internal/operations/build/wheel_legacy.py�format_command_result s r )�names�temp_dir�namer r r c C st t | �} | s2d�|�}|t||�7 }t�|� dS t| �dkrbd�|| �}|t||�7 }t�|� tj�|| d �S )z>Return the path to the wheel in the temporary build directory.z1Legacy build of wheel for {!r} created no files. N� zZLegacy build of wheel for {!r} created more than one file. Filenames (choosing first): {} r ) �sorted�formatr r Zwarning�len�os�path�join)r r r r r �msgr r r �get_legacy_build_wheel_path$ s �� r )r � setup_py_path� source_dir�global_options� build_options�tempdr c C s� t ||||d�}d| � d�}t|���}t�d|� zt|||d�} W n6 tyz |�d� t�d| � Y W d � dS 0 t� |�} t | || || d �}|W d � S 1 s�0 Y dS ) z�Build one unpacked package using the "legacy" build process. Returns path to wheel if successfully built. Otherwise, returns None. )r# r$ Zdestination_dirzBuilding wheel for z (setup.py)zDestination directory: %s)�cwd�spinner�errorzFailed building wheel for %sN)r r r r r )r r r �debugr � ExceptionZfinishr( r �listdirr )r r! r"