관리-도구
편집 파일: legacy.cpython-36.pyc
3 �Re� � @ s� d Z ddlZddlZddlZddlmZ ddlmZ ddlm Z ddl mZ ddlm Z ddlmZ dd lmZ dd lmZ er�ddlmZmZmZ ddlmZ dd lmZ eje�ZG dd� de�Z dd� Z!dS )z6Legacy installation process, i.e. `setup.py install`. � N)�change_root)�InstallationError)� indent_log)� ensure_dir)�make_setuptools_install_args)�runner_with_spinner_message)� TempDirectory)�MYPY_CHECK_RUNNING)�List�Optional�Sequence)�BuildEnvironment)�Schemec @ s e Zd Zdd� ZdS )�LegacyInstallFailurec C s t j� | _d S )N)�sys�exc_info�parent)�self� r ��/builddir/build/BUILDROOT/alt-python36-pip-20.2.4-5.el8.x86_64/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/operations/install/legacy.py�__init__ s zLegacyInstallFailure.__init__N)�__name__� __module__�__qualname__r r r r r r s r c , s� |j }tdd���}y�tjj|jd�}t||| |� ||||| |d�}tdj| ��}t� �" |� |||d� W d Q R X W d Q R X tjj |�s�t jd|� dS W n tk r� t �Y nX t|��}|j� j� }W d Q R X W d Q R X � fd d �}x>|D ]$}tjj|�}|jd�r�||�}P q�W dj| �}t|��g }xH|D ]@}|j� }tjj|��r\|tjj7 }|jtjj||�|�� �q6W |j� t|� tjj|d �}t|d��}|jdj|�d � W d Q R X dS )N�record)�kindzinstall-record.txt) �global_options�install_options�record_filename�root�prefix� header_dir�home� use_user_site�no_user_config� pycompilezRunning setup.py install for {})�cmd�cwdzRecord file %s not foundFc s( � d kst jj| � r| S t� | �S d S )N)�os�path�isabsr )r) )r r r �prepend_root` s zinstall.<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� T)�headersr r( r) �joinr r �formatr �exists�logger�debug� Exceptionr �open�read� splitlines�dirname�endswithr �strip�isdir�sep�append�relpath�sortr �write)r r r r"