관리-도구
편집 파일: build_env.cpython-38.pyc
U ʗRe?% � @ sJ d Z ddlZddlZddlZddlZddlZddlmZ ddlm Z ddl mZ ddlm Z mZmZmZmZmZmZ ddlmZ ddlmZ dd lmZ dd lmZ ddlmZ ddlm Z m!Z!m"Z" dd l#m$Z$m%Z% ddl&m'Z' ddl(m)Z)m*Z* e �rddl+m,Z, e�-e.�Z/G dd� d�Z0e1d�dd�Z2G dd� d�Z3G dd� de3�Z4dS )z;Build Environment used for isolation during sdist building � N)�OrderedDict)� get_paths)� TracebackType)� TYPE_CHECKING�Iterable�List�Optional�Set�Tuple�Type)�where)�Requirement)�Version)�__file__)�open_spinner)�get_platlib�get_prefixed_libs�get_purelib)�get_default_environment�get_environment)�call_subprocess)� TempDirectory� tempdir_kinds)� PackageFinderc @ s e Zd Zedd�dd�ZdS )�_PrefixN)�path�returnc C s@ || _ d| _ttjdkrdnd||d�d�d | _t|�| _d S )NF�nt�posix_prefix)�base�platbase)�vars�scripts)r �setupr �os�name�bin_dirr �lib_dirs)�selfr � r) ��/builddir/build/BUILDROOT/alt-python38-pip-22.2.1-2.el8.x86_64/opt/alt/python38/lib/python3.8/site-packages/pip/_internal/build_env.py�__init__ s ��z_Prefix.__init__)�__name__� __module__�__qualname__�strr+ r) r) r) r* r s r �r c C s. t �t��� j} | �� s t| �S t�| d �S )z�Get a file to pass to a Python executable, to run the currently-running pip. This is used to run a pip subprocess, for installing requirements into the build environment. z__pip-runner__.py) �pathlib�Path�pip_location�resolve�parent�is_dirr/ r$ �fsdecode)�sourcer) r) r* �_get_runnable_pip* s r9 c @ s� e Zd ZdZdd�dd�Zdd�dd�Zeee ee ee dd�d d �Z ee e ee eef ee f d�dd �Zdee eedd�dd�Zeedee eedd�dd��ZdS )�BuildEnvironmentzACreates and manages an isolated environment to install build depsNr0 c s� t tjdd�� t� fdd�dD ��| _g | _g | _tt| j� � ��D ] }| j� |j� | j�|j � qDdd� t� t� fD �}tj�� jd�| _tj�| j�s�t�| j� ttj�| jd �d dd��"}|�t�d �j|| jd�� W 5 Q R X d S )NT)�kind�globally_managedc 3 s&