JFIF$        dd7 

Viewing File: /usr/lib/python3.9/site-packages/pip/_vendor/pep517/__pycache__/envbuild.cpython-39.pyc

a

[��f��@s�dZddlZddlZddlZddlZddlmZddlZddlm	Z	ddl
mZddlm
Z
ddlmZmZe�e�Zd	d
�ZGdd�de�Zdd
d�Zddd�ZdS)zIBuild wheels/sdists by installing build deps to a temporary environment.
�N)�
check_call)�	get_paths)�mkdtemp�)�	toml_load)�Pep517HookCaller�
LoggerWrappercCs^t�tj�|d�d��}t|�}Wd�n1s40Y|d}|d|d|�d�fS)Nzpyproject.toml�rbzbuild-system�requiresz
build-backendzbackend-path)�io�open�os�path�joinr�get)�
source_dir�fZpyproject_dataZbuildsys�r�?/usr/lib/python3.9/site-packages/pip/_vendor/pep517/envbuild.py�_load_pyprojects�&�rc@s6eZdZdZdZddd�Zdd�Zdd	�Zd
d�ZdS)
�BuildEnvironmentz�Context manager to install build deps in a simple temporary environment

    Based on code I wrote for pip, which is MIT licensed.
    NTcCs
||_dS)N)�_cleanup)�selfZcleanuprrr�__init__=szBuildEnvironment.__init__cCs�tdd�|_t�d|j�tj�dd�|_tj�dd�|_tj	dkrHdnd}t
||j|jd�d	�}|d
}|jr�|tj|jtjd<n|tjtjtjd<|d|dkr�|d}n|dtj|d}|jr�|tj|jtjd<n
|tjd<|S)
Nzpep517-build-env-)�prefixzTemporary build environment: %s�PATH�
PYTHONPATH�ntZposix_prefix)�baseZplatbase)�vars�scriptsZpurelibZplatlib)
rr�log�infor
�environr�	save_path�save_pythonpath�namer�pathsep�defpath)rZinstall_schemeZinstall_dirsr Zlib_dirsrrr�	__enter__@s0�

��
zBuildEnvironment.__enter__cCsT|sdSt�d|�tjddddd|jgt|�}t|tttj	�tttj
�d�dS)	zAInstall dependencies into this env by calling pip in a subprocessNzCalling pip to install %sz-mZpip�installz--ignore-installedz--prefix)�stdout�stderr)r!r"�sys�
executabler�listrr�logging�INFOZERROR)r�reqs�cmdrrr�pip_install`s��

�zBuildEnvironment.pip_installcCs~|jo|jduotj�|j�}|r.t�|j�|jdurHtj�dd�n|jtjd<|j	durntj�dd�n|j	tjd<dS)Nrr)
rrr
�isdir�shutil�rmtreer$r#�popr%)r�exc_typeZexc_valZexc_tbZ
needs_cleanuprrr�__exit__ns��

zBuildEnvironment.__exit__)T)	�__name__�
__module__�__qualname__�__doc__rrr)r4r:rrrrr!s
 rc	Csz|duri}t|�\}}}t|||�}t��:}|�|�|�|�}|�|�|�||�Wd�S1sl0YdS)amBuild a wheel from a source directory using PEP 517 hooks.

    :param str source_dir: Source directory containing pyproject.toml
    :param str wheel_dir: Target directory to create wheel in
    :param dict config_settings: Options to pass to build backend

    This is a blocking function which will run pip in a subprocess to install
    build requirements.
    N)rrrr4Zget_requires_for_build_wheel�build_wheel)	rZ	wheel_dir�config_settingsr
�backend�backend_path�hooks�envr2rrrr?�s



r?c	Csz|duri}t|�\}}}t|||�}t��:}|�|�|�|�}|�|�|�||�Wd�S1sl0YdS)amBuild an sdist from a source directory using PEP 517 hooks.

    :param str source_dir: Source directory containing pyproject.toml
    :param str sdist_dir: Target directory to place sdist in
    :param dict config_settings: Options to pass to build backend

    This is a blocking function which will run pip in a subprocess to install
    build requirements.
    N)rrrr4Zget_requires_for_build_sdist�build_sdist)	rZ	sdist_dirr@r
rArBrCrDr2rrrrE�s



rE)N)N)r>rr
r0r6�
subprocessrr-Z	sysconfigrZtempfiler�compatrZwrappersrrZ	getLoggerr;r!r�objectrr?rErrrr�<module>s
a

Back to Directory  nL+D550H?Mx ,D"v]qv;6*Zqn)ZP0!1 A "#a$2Qr D8 a Ri[f\mIykIw0cuFcRı?lO7к_f˓[C$殷WF<_W ԣsKcëIzyQy/_LKℂ;C",pFA:/]=H  ~,ls/9ć:[=/#f;)x{ٛEQ )~ =𘙲r*2~ a _V=' kumFD}KYYC)({ *g&f`툪ry`=^cJ.I](*`wq1dđ#̩͑0;H]u搂@:~וKL Nsh}OIR*8:2 !lDJVo(3=M(zȰ+i*NAr6KnSl)!JJӁ* %݉?|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