
    /h                        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mZ  e j        e          Zdee         dedefd	Zd
ee         dededee         dedee         fdZdedededee         dee         dedee         fdZdS )    N)ListOptional)open_spinner) make_setuptools_bdist_wheel_args)call_subprocessformat_command_argscommand_argscommand_outputreturnc                     t          |           }d| d}|s|dz  }nOt                                          t          j        k    r|dz  }n"|                    d          s|dz  }|d| z  }|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texts       ^/var/www/html/venv/lib/python3.11/site-packages/pip/_internal/operations/build/wheel_legacy.pyformat_command_resultr      s    
 '|44L1111D 5&&		!	!	#	#gm	3	399&&t,, 	#d"N4N444K    namestemp_dirnamec                    t          |           } | sDd                    |          }|t          ||          z  }t                              |           dS t          |           dk    rCd                    ||           }|t          ||          z  }t                              |           t          j                            || 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   warninglenospathjoin)r   r   r   r	   r
   msgs         r   get_legacy_build_wheel_pathr%       s     5MME CKKDQQ$\>BBBst
5zzA~~/
&u

 	 	$\>BBBs7<<%(+++r   setup_py_path
source_dirglobal_optionsbuild_optionstempdc                    t          ||||          }d|  d}t          |          5 }t                              d|           	 t	          |d||          }	nL# t
          $ r? |                    d           t                              d|            Y d	d	d	           d	S w xY wt          j	        |          }
t          |
|| ||	
          }|cd	d	d	           S # 1 swxY w Y   d	S )zBuild one unpacked package using the "legacy" build process.

    Returns path to wheel if successfully built. Otherwise, returns None.
    )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   debugr   	Exceptionfinishr/   r!   listdirr%   )r   r&   r'   r(   r)   r*   
wheel_argsspin_messager.   outputr   
wheel_paths               r   build_wheel_legacyr8   ;   s    2%#	  J ;:::L	l	#	# w0%888
	$:	  FF  	 	 	NN7###LL7>>>       	
 
5!!0#!
 
 

 /                 s5   CAC:B#C"B##,CC #C )r   os.pathr!   typingr   r   pip._internal.cli.spinnersr   $pip._internal.utils.setuptools_buildr   pip._internal.utils.subprocessr   r   	getLogger__name__r   strr   r%   r8    r   r   <module>rB      ss     ! ! ! ! ! ! ! ! 3 3 3 3 3 3 Q Q Q Q Q Q O O O O O O O O		8	$	$s) 	   (,9,, , s)	,
 , c], , , ,6+
++ + I	+
 9+ + c]+ + + + + +r   