Current File : //lib/python3.9/site-packages/pip/_internal/operations/install/__pycache__/legacy.cpython-39.pyc
a

[��f>�@sdZddlZddlZddlmZddlmZmZmZddl	m
Z
ddlmZddl
mZddlmZdd	lmZdd
lmZddlmZddlmZe�e�ZGd
d�de�Zeeeeedd�dd�Zeeeeeeeeeee e eee ee
eee d�dd�Z!dS)z6Legacy installation process, i.e. `setup.py install`.
�N)�change_root)�List�Optional�Sequence)�BuildEnvironment)�InstallationError)�Scheme)�
indent_log)�
ensure_dir)�make_setuptools_install_args)�runner_with_spinner_message)�
TempDirectoryc@seZdZdS)�LegacyInstallFailureN)�__name__�
__module__�__qualname__�rr�K/usr/lib/python3.9/site-packages/pip/_internal/operations/install/legacy.pyrsr)�record_lines�root�req_description�returncs�ttd��fdd�}|D]&}tj�|�}|�d�r||�}qRqd�|�}t|��g}|D]<}|��}	tj�|	�r~|	tjj	7}	|�
tj�||	�|��qZ|��t
|�tj�|d�}
t|
d��$}|�d�|�d�Wd�n1s�0YdS)	N)�pathrcs&�dustj�|�s|St�|�SdS)N)�osr�isabsr)r�rrr�prepend_rootszBwrite_installed_files_from_setuptools_record.<locals>.prepend_rootz	.egg-infoz�{} did not indicate that it installed an .egg-info directory. Only setup.py projects generating .egg-info directories are supported.zinstalled-files.txt�w�
)�strrr�dirname�endswith�formatr�strip�isdir�sep�append�relpath�sortr
�join�open�write)rrrr�lineZ	directoryZegg_info_dir�messageZ	new_lines�filenameZinst_files_path�frrr�,write_installed_files_from_setuptools_records,
��r0)�install_options�global_optionsr�home�prefix�
use_user_site�	pycompile�scheme�
setup_py_path�isolated�req_name�	build_env�unpacked_source_directoryrrcCsf|j}tdd���2}z�tj�|jd�}t||||||||||	|d�}td|
���}t��@|�|||d�Wd�n1s�0YWd�n1s�0Ytj�|�s�t	�
d|�WWd�dSWn*ty�}zt|�WYd}~n
d}~00t
|��}|����}Wd�n1�s,0YWd�n1�sL0Yt|||
�d	S)
N�record)�kindzinstall-record.txt)
r2r1�record_filenamerr4�
header_dirr3r5Zno_user_configr6zRunning setup.py install for )�cmd�cwdzRecord file %s not foundFT)Zheadersr
rrr)rrr	�exists�logger�debug�	Exceptionrr*�read�
splitlinesr0)r1r2rr3r4r5r6r7r8r9r:r;r<rr@Ztemp_dirr?Zinstall_argsZrunner�er/rrrr�install>sD���B
LrJ)"�__doc__ZloggingrZdistutils.utilr�typingrrrZpip._internal.build_envrZpip._internal.exceptionsrZpip._internal.models.schemerZpip._internal.utils.loggingr	Zpip._internal.utils.miscr
Z$pip._internal.utils.setuptools_buildrZpip._internal.utils.subprocessrZpip._internal.utils.temp_dirr
Z	getLoggerrrDrFrrr0�boolrJrrrr�<module>sF
�&�