ok

Mini Shell

Direktori : /opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/
Upload File :
Current File : //opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/envbuild.pyo

�
Bu�_c@s�dZddlZddlZddlmZddlZddlmZddlZddl	m
Z
ddlmZddl
mZmZeje�Zd	�Zd
efd��YZdd�Zdd
�ZdS(sIBuild wheels/sdists by installing build deps to a temporary environment.
i����N(ttoml(t
check_call(t	get_paths(tmkdtempi(tPep517HookCallert
LoggerWrappercCs[ttjj|d���}tj|�}WdQX|d}|d|d|jd�fS(Nspyproject.tomlsbuild-systemtrequiress
build-backendsbackend-path(topentostpathtjoinRtloadtget(t
source_dirtftpyproject_datatbuildsys((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/envbuild.pyt_load_pyprojects
tBuildEnvironmentcBs;eZdZdZed�Zd�Zd�Zd�Z	RS(s�Context manager to install build deps in a simple temporary environment

    Based on code I wrote for pip, which is MIT licensed.
    cCs
||_dS(N(t_cleanup(tselftcleanup((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/envbuild.pyt__init__9scCsTtdd�|_tjd|j�tjjdd�|_tjjdd�|_	tj
dkrjdnd}t|di|jd	6|jd
6�}|d}|jr�|tj|jtjd<n|tjtj
tjd<|d|d
kr|d}n|dtj|d
}|j	rC|tj|j	tjd<n
|tjd<|S(Ntprefixspep517-build-env-sTemporary build environment: %stPATHt
PYTHONPATHtnttposix_prefixtvarstbasetplatbasetscriptstpurelibtplatlib(RR	tlogtinfoRtenvironRtNonet	save_pathtsave_pythonpathtnameRtpathseptdefpath(Rtinstall_schemetinstall_dirsRtlib_dirs((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/envbuild.pyt	__enter__<s*

	
	

cCsw|s
dStjd|�tjddddd|jgt|�}t|dtttj	�d	tttj
��dS(
sAInstall dependencies into this env by calling pip in a subprocessNsCalling pip to install %ss-mtpiptinstalls--ignore-installeds--prefixtstdouttstderr(R"R#tsyst
executableR	tlistRRtloggingtINFOtERROR(Rtreqstcmd((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/envbuild.pytpip_install\scCs�|jo*|jdk	o*tjj|j�}|rFtj|j�n|jdkrktjj	dd�n|jtjd<|j
dkr�tjj	dd�n|j
tjd<dS(NRR(RR	R%RtisdirtshutiltrmtreeR&R$tpopR'(Rtexc_typetexc_valtexc_tbt
needs_cleanup((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/envbuild.pyt__exit__js	N(
t__name__t
__module__t__doc__R%R	tTrueRR.R;RD(((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/envbuild.pyRs	 	c	Cs�|dkri}nt|�\}}}t|||�}t��@}|j|�|j|�}|j|�|j||�SWdQXdS(smBuild 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(R%RRRR;tget_requires_for_build_wheeltbuild_wheel(	R
t	wheel_dirtconfig_settingsRtbackendtbackend_paththookstenvR9((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/envbuild.pyRJ~s
	

c	Cs�|dkri}nt|�\}}}t|||�}t��@}|j|�|j|�}|j|�|j||�SWdQXdS(smBuild 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(R%RRRR;tget_requires_for_build_sdisttbuild_sdist(	R
t	sdist_dirRLRRMRNRORPR9((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/envbuild.pyRR�s
	

(RGRR6tpip._vendorRR=t
subprocessRR3t	sysconfigRttempfileRtwrappersRRt	getLoggerRER"RtobjectRR%RJRR(((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/envbuild.pyt<module>s	a

Zerion Mini Shell 1.0