σ οRec @@shddlmZddlZddlZddlZddlmZddlmZm Z ddl m Z ddl m Z mZddlmZddlmZmZdd lmZer dd lmZmZmZmZmZmZmZmZeeeefZ nd Z!d „Z"d „Z#d„Z$d„Z%e&ddddddde(d„ Z)d„Z*dS(i(tabsolute_importN(t shlex_quote(tSpinnerInterfacet open_spinner(tInstallationError(tconsole_to_strtstr_to_display(tsubprocess_logger(t HiddenTexttpath_to_display(tMYPY_CHECK_RUNNING(tAnytCallabletIterabletListtMappingtOptionaltTexttUnions(----------------------------------------cG@sGg}x:|D]2}t|tƒr2|j|ƒq |j|ƒq W|S(s& Create a CommandArgs object. (t isinstancetlisttextendtappend(targst command_argstarg((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/subprocess.pyt make_commands  cC@sdjd„|DƒƒS(s/ Format command arguments for display. t cs@s<|]2}t|tƒr*tt|ƒƒn t|ƒVqdS(N(RRRtstr(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/utils/subprocess.pys 8s(tjoin(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/utils/subprocess.pytformat_command_args-s cC@s/g|D]$}t|tƒr%|jn|^qS(s= Return the arguments in their raw, unredacted form. (RRtsecret(RR((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/subprocess.pytreveal_command_args=sc C@sst|ƒ}t|ddƒ}t|ƒ}dj|ƒ}djd|d|d|dt|ƒd |d tƒ}|S( s§ Create and return the error message to use to log a subprocess error with command output. :param lines: A list of lines, each ending with a newline. tdescs command bytestuŸCommand errored out with exit status {exit_status}: command: {command_display} cwd: {cwd_display} Complete output ({line_count} lines): {output}{divider}t exit_statustcommand_displayt cwd_displayt line_counttoutputtdivider(RRR Rtformattlent LOG_DIVIDER( tcmd_argstcwdtlinesR$tcommandR%R&R(tmsg((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/subprocess.pytmake_subprocess_output_errorGs     traisec  C@sP|d krg}n|d kr*g}n|rEtj} tj} ntj} tj} tjƒ| k} | oy|d k } |d kr—t|ƒ}n| d|ƒt j j ƒ}|rΙ|j |ƒnx|D]}|j |d ƒqΠWyktjt|ƒdtjdtjdtjd|d|ƒ}|js8t‚|jsGt‚|jjƒWn2tk r‰}| rƒtjd||ƒn‚nXg}xotrt|jjƒƒ}|sΈPn|jƒ}|j|dƒ| |ƒ| r“|sρt‚|jƒq“q“Wz|jƒWd |jr,|jjƒnX|j oB|j |k}| r}|sWt‚|rm|j!d ƒq}|j!d ƒn|rC|d krτ| rΠ| rΠt"d |d|d|d|j ƒ}tj#|ƒndj$|j |ƒ}t%|ƒ‚qC|dkrtj&d||j |ƒqC|dkr+qCt'dj$|ƒƒ‚ndj(|ƒS(sν Args: show_stdout: if true, use INFO to log the subprocess's stderr and stdout streams. Otherwise, use DEBUG. Defaults to False. extra_ok_returncodes: an iterable of integer return codes that are acceptable, in addition to 0. Defaults to None, which means []. unset_environ: an iterable of environment variable names to unset prior to calling subprocess.Popen(). log_failed_cmd: if false, failed commands are not logged, only raised. sRunning command %ststderrtstdintstdoutR.tenvs#Error %s while executing command %ss NterrortdoneR3R-R/R$sSCommand errored out with exit status {}: {} Check the logs for full command output.twarns$Command "%s" had error code %s in %stignores!Invalid value: on_returncode={!r}R#()tNoneRtinfotloggingtINFOtdebugtDEBUGtgetEffectiveLevelRtostenvirontcopytupdatetpopt subprocesstPopenR!tSTDOUTtPIPER5tAssertionErrorR6tcloset ExceptiontcriticaltTrueRtreadlinetrstripRtspintwaitt returncodetfinishR2R8R*Rtwarningt ValueErrorR(tcmdt show_stdoutR.t on_returncodetextra_ok_returncodest command_desct extra_environt unset_environtspinnertlog_failed_cmdtlog_subprocesst used_leveltshowing_subprocesst use_spinnerR7tnametproctexct all_outputtlinetproc_had_errorR1texc_msg((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/subprocess.pytcall_subprocessqs˜                         c@sdd‡fd†}|S(sάProvide a subprocess_runner that shows a spinner message. Intended for use with for pep517's Pep517HookCaller. Thus, the runner has an API that matches what's expected by Pep517HookCaller.subprocess_runner. c @s5tˆƒ#}t|d|d|d|ƒWdQXdS(NR.R^R`(RRm(RYR.R^R`(tmessage(s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/subprocess.pytrunner s N(R<(RnRo((Rns/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/subprocess.pytrunner_with_spinner_messages  (+t __future__RR>RCRHtpip._vendor.six.movesRtpip._internal.cli.spinnersRRtpip._internal.exceptionsRtpip._internal.utils.compatRRtpip._internal.utils.loggingRtpip._internal.utils.miscRR tpip._internal.utils.typingR ttypingR R R RRRRRRt CommandArgsR,RRR!R2tFalseR<RPRmRp(((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/subprocess.pyts8   :   , ‡