ok

Mini Shell

Direktori : /proc/self/root/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/utils/
Upload File :
Current File : //proc/self/root/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/utils/subprocess.pyc

�
Bu�_c
@@shddlmZddlZddlZddlZddlmZddlmZm	Z	ddl
mZddlm
Z
mZddlmZddlmZmZdd	lmZer
dd
lmZmZmZmZmZmZmZmZeeeefZ ndZ!d�Z"d
�Z#d�Z$d�Z%e&ddddddde(d�	Z)d�Z*dS(i(tabsolute_importN(tshlex_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/python36/lib/python3.6/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/python36/lib/python3.6/site-packages/pip/_internal/utils/subprocess.pys	<genexpr>8s(tjoin(R((sO/opt/alt/python36/lib/python3.6/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/python36/lib/python3.6/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}texit_statustcommand_displaytcwd_displayt
line_counttoutputtdivider(RRR	RtformattlentLOG_DIVIDER(	tcmd_argstcwdtlinesR$tcommandR%R&R(tmsg((sO/opt/alt/python36/lib/python3.6/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(tcmdtshow_stdoutR.t
on_returncodetextra_ok_returncodestcommand_desct
extra_environt
unset_environtspinnertlog_failed_cmdtlog_subprocesst
used_leveltshowing_subprocesstuse_spinnerR7tnametproctexct
all_outputtlinetproc_had_errorR1texc_msg((sO/opt/alt/python36/lib/python3.6/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(sO/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/utils/subprocess.pytrunner
sN(R<(RnRo((RnsO/opt/alt/python36/lib/python3.6/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
ttypingRRR
RRRRRRtCommandArgsR,RRR!R2tFalseR<RPRmRp(((sO/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/utils/subprocess.pyt<module>s8:			
	,�

Zerion Mini Shell 1.0