ó vÆ_c @@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((sO/opt/alt/python38/lib/python3.8/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((sO/opt/alt/python38/lib/python3.8/site-packages/pip/_internal/utils/subprocess.pys 8s(tjoin(R((sO/opt/alt/python38/lib/python3.8/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((sO/opt/alt/python38/lib/python3.8/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((sO/opt/alt/python38/lib/python3.8/site-packages/pip/_internal/utils/subprocess.pytmake_subprocess_output_errorGs     traisec  C@s|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ÐWyMtjt|ƒdtjdtjdtjd|d|ƒ}|jjƒWn2tk rk}| retjd||ƒn‚nXg}xctr×t|jjƒƒ}|sšPn|jƒ}|j|dƒ| |ƒ| ru|jƒququWz|jƒWd |jr|jjƒnX|jo|j|k}| rG|r7|j d ƒqG|j d ƒn|r |d kr¾| rš| ršt!d |d|d|d|jƒ}tj"|ƒndj#|j|ƒ}t$|ƒ‚q |dkrætj%d||j|ƒq |dkrõq t&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!tSTDOUTtPIPER5tcloset ExceptiontcriticaltTrueRR6treadlinetrstripRtspintwaitt 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((sO/opt/alt/python38/lib/python3.8/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_(RRl(RXR.R]R_(tmessage(sO/opt/alt/python38/lib/python3.8/site-packages/pip/_internal/utils/subprocess.pytrunner s N(R<(RmRn((RmsO/opt/alt/python38/lib/python3.8/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<RORlRo(((sO/opt/alt/python38/lib/python3.8/site-packages/pip/_internal/utils/subprocess.pyts8   :   , ‡