Your IP : 3.145.166.223


Current Path : /opt/alt/python27/lib/python2.7/site-packages/pip/_internal/
Upload File :
Current File : //opt/alt/python27/lib/python2.7/site-packages/pip/_internal/wheel_builder.pyc

�
�Rec@s�dZddlZddlZddlZddlZddlmZddlm	Z	ddl
mZddlm
Z
ddlmZmZmZddlmZdd	lmZdd
lmZddlmZddlmZdd
lmZertddlmZm Z m!Z!m"Z"m#Z#m$Z$ddl%m&Z&ddl'm(Z(e e(ge)fZ*e$e"e(e"e(fZ+nej,e-�Z.ej/dej0�Z1d�Z2d�Z3d�Z4d�Z5d�Z6d�Z7d�Z8d�Z9d�Z:d�Z;d�Z<dS(s;Orchestrator for building wheels from InstallRequirements.
i����N(tLink(tbuild_wheel_pep517(tbuild_wheel_legacy(t
indent_log(t
ensure_dirt	hash_filetis_wheel_installed(tmake_setuptools_clean_args(tcall_subprocess(t
TempDirectory(tMYPY_CHECK_RUNNING(tpath_to_url(tvcs(tAnytCallabletIterabletListtOptionaltTuple(t
WheelCache(tInstallRequirements([a-z0-9_.]+)-([a-z0-9_.!+-]+)cCsttj|��S(sjDetermine whether the string looks like an egg_info.

    :param s: The string to parse. E.g. foo-2.1
    (tboolt_egg_info_retsearch(ts((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/wheel_builder.pyt_contains_egg_info%scCs�|jr
tS|jr6|r2tjd|j�ntS|r@tS|jsS|jrWtS||�sztjd|j�tS|j	r�t
�r�tjd|j�tStS(sBReturn whether an InstallRequirement should be built into a wheel.s(Skipping %s, due to already being wheel.sCSkipping wheel build for %s, due to binaries being disabled for it.sOUsing legacy 'setup.py install' for %s, since package 'wheel' is not installed.(t
constrainttFalsetis_wheeltloggertinfotnametTrueteditablet
source_dirt
use_pep517R(treqt
need_wheeltcheck_binary_allowed((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/wheel_builder.pyt
_should_build.s,		

cCst|dtdt�S(NR%R&(R'R t_always_true(R$((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/wheel_builder.pytshould_build_for_wheel_command[scCst|dtd|�S(NR%R&(R'R(R$R&((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/wheel_builder.pyt should_build_for_install_commanddscCs�|js|jrtS|jr�|jjr�|js<t�|jsKt�tj|jj�}|slt�|j	|jj
|j�r�tStS|js�t�|jj�\}}t
|�r�tStS(s�
    Return whether a built InstallRequirement can be stored in the persistent
    wheel cache, assuming the wheel cache is available, and _should_build()
    has determined a wheel needs to be built.
    (R!R"Rtlinktis_vcstAssertionErrorRtget_backend_for_schemetschemetis_immutable_rev_checkoutturlR tsplitextR(R$tvcs_backendtbasetext((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/wheel_builder.pyt
_should_cachens	cCs[t|j�}|jst�|rEt|�rE|j|j�}n|j|j�}|S(sdReturn the persistent or temporary cache directory where the built
    wheel need to be stored.
    (Rt	cache_dirR+R-R6tget_path_for_linktget_ephem_path_for_link(R$twheel_cachetcache_availableR7((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/wheel_builder.pyt_get_cache_dir�scCstS(N(R (t_((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/wheel_builder.pyR(�sc	Csbyt|�Wn*tk
r:}tjd|j|�dSX|j�t||||�SWdQXdS(saBuild one wheel.

    :return: The filename of the built wheel, or None if the build failed.
    s Building wheel for %s failed: %sN(RtOSErrorRtwarningRtNonet	build_envt_build_one_inside_env(R$t
output_dirt
build_optionstglobal_optionste((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/wheel_builder.pyt
_build_one�s

cCs�tdd��x}|js!t�|jro|js9t�td|jd|jd|jd|d|j�}n9td|jd|j	d	|j
d
|d|d|j�}|dk	rftjj
|�}tjj||�}y\t|�\}}	tj||�tjd|j||	|j��tjd|�|SWqftk
rb}
tjd
|j|
�qfXn|jst||�ndSWdQXdS(NtkindtwheelRtbackendtmetadata_directoryRDttempdt
setup_py_pathR"REs3Created wheel for %s: filename=%s size=%d sha256=%ssStored in directory: %ss Building wheel for %s failed: %s(R	RR-R#RKRtpep517_backendtpathRRMtunpacked_source_directoryR@tostbasenametjoinRtshutiltmoveRRt	hexdigestt	ExceptionR?t_clean_one_legacy(R$RCRDREttemp_dirt
wheel_patht
wheel_namet	dest_patht
wheel_hashtlengthRF((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/wheel_builder.pyRB�sF								
	cCsot|jd|�}tjd|j�yt|d|j�tSWn%tk
rjtj	d|j�t
SXdS(NREsRunning setup.py clean for %stcwds Failed cleaning build dir for %s(RRMRRRRR"R RWterrorR(R$REt
clean_args((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/wheel_builder.pyRX�s		
c	
CsX|sggfStjddjd�|D���t���gg}}x�|D]�}t||�}t||||�}|r�tt|��|_|jj	|_
|jjs�t�|j
|�qQ|j
|�qQWWdQX|rtjddjg|D]}|j^q���n|rNtjddjg|D]}|j^q2��n||fS(s�Build wheels.

    :return: The list of InstallRequirement that succeeded to build and
        the list of InstallRequirement that failed to build.
    s*Building wheels for collected packages: %ss, css|]}|jVqdS(N(R(t.0R$((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/wheel_builder.pys	<genexpr>sNsSuccessfully built %st sFailed to build %s(RRRSRR<RGRRR+t	file_pathtlocal_file_pathRR-tappendR(	trequirementsR:RDREtbuild_successestbuild_failuresR$R7t
wheel_file((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/wheel_builder.pytbuilds4



))(=t__doc__tloggingtos.pathRQtreRTtpip._internal.models.linkRt$pip._internal.operations.build.wheelRt+pip._internal.operations.build.wheel_legacyRtpip._internal.utils.loggingRtpip._internal.utils.miscRRRt$pip._internal.utils.setuptools_buildRtpip._internal.utils.subprocessRtpip._internal.utils.temp_dirR	tpip._internal.utils.typingR
tpip._internal.utils.urlsRtpip._internal.vcsRttypingR
RRRRRtpip._internal.cacheRtpip._internal.req.req_installRRtBinaryAllowedPredicatetBuildResultt	getLoggert__name__Rtcompilet
IGNORECASERRR'R)R*R6R<R(RGRBRXRk(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/wheel_builder.pyt<module>sD.			-			
	!				3	

?>