ó ïRec@sÿdZddlZddlZddlZddlZddlmZddlm Z ddl m Z ddl m Z ddlmZmZmZddlmZdd lmZdd lmZdd lmZdd 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(t path_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‹t StS|jsžt‚|jj ƒ\}}t |ƒrÃt StS(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$t vcs_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$t wheel_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_dirs 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|jt||||ƒ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   c Cstddƒ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 |_ |jj s·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 sNsSuccessfully built %st sFailed to build %s(RRRSRR<RGRR R+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.urlsR tpip._internal.vcsR ttypingR RRRRRtpip._internal.cacheRtpip._internal.req.req_installRRtBinaryAllowedPredicatet BuildResultt 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.pytsD    . - !    3