<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
        integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
</html>
3
Re&              	   @   s   d dl mZ d dlZd dlZd dlZd dlmZ d dlmZm	Z	 d dl
mZ d dlmZmZ d dlmZ d dlmZmZ d d	lmZ erd d
lmZmZmZmZmZmZmZmZ eeeef  Z dZ!dd Z"dd Z#dd Z$dd Z%dddZ&dd Z'dS )    )absolute_importN)shlex_quote)SpinnerInterfaceopen_spinner)InstallationError)console_to_strstr_to_display)subprocess_logger)
HiddenTextpath_to_display)MYPY_CHECK_RUNNING)AnyCallableIterableListMappingOptionalTextUnionz(----------------------------------------c              G   s6   g }x,| D ]$}t |tr$|j| q
|j| q
W |S )z&
    Create a CommandArgs object.
    )
isinstancelistextendappend)argscommand_argsarg r   /builddir/build/BUILDROOT/alt-python36-pip-20.2.4-5.el8.x86_64/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/utils/subprocess.pymake_command   s    

r   c             C   s   dj dd | D S )z/
    Format command arguments for display.
     c             s   s,   | ]$}t |trtt|nt|V  qd S )N)r   r
   r   str).0r   r   r   r   	<genexpr>8   s   z&format_command_args.<locals>.<genexpr>)join)r   r   r   r   format_command_args-   s    
r$   c             C   s   dd | D S )z=
    Return the arguments in their raw, unredacted form.
    c             S   s    g | ]}t |tr|jn|qS r   )r   r
   secret)r!   r   r   r   r   
<listcomp>C   s    z'reveal_command_args.<locals>.<listcomp>r   )r   r   r   r   reveal_command_args=   s    r'   c       	      C   sD   t | }t|dd}t|}dj|}dj|||t||td}|S )z
    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.
    zcommand bytes)desc zCommand errored out with exit status {exit_status}:
 command: {command_display}
     cwd: {cwd_display}
Complete output ({line_count} lines):
{output}{divider})exit_statuscommand_displaycwd_display
line_countoutputdivider)r$   r   r   r#   formatlenLOG_DIVIDER)	cmd_argscwdlinesr*   commandr+   r,   r.   msgr   r   r   make_subprocess_output_errorG   s    
r8   FraiseTc
             C   sf  |dkrg }|dkrg }|r*t j}
tj}nt j}
tj}t j |k}| oN|dk	}|dkr`t| }|
d| tj	j
 }|r|j| x|D ]}|j|d qW yBtjt| tjtjtj||d}|jst|jst|jj  W n: tk
r } z|	rt jd||  W Y dd}~X nX g }xRt|jj }|s6P |j }|j|d  |
| |r |sdt|j  q W z|j  W d|jr|jj  X |jo|j|k}|r|st|r|jd n
|jd |r\|dkr$| r|	rt | |||jd	}t j!| d
j"|j|}t#|n8|dkrBt j$d||j| n|dkrNnt%dj"|dj&|S )a  
    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.
    NzRunning command %s)stderrstdinstdoutr4   envz#Error %s while executing command %s
errordoner9   )r3   r4   r5   r*   zSCommand errored out with exit status {}: {} Check the logs for full command output.warnz$Command "%s" had error code %s in %signorez!Invalid value: on_returncode={!r}r)   )'r	   infologgingINFOdebugDEBUGgetEffectiveLevelr$   osenvironcopyupdatepop
subprocessPopenr'   STDOUTPIPEr;   AssertionErrorr<   close	Exceptioncriticalr   readlinerstripr   spinwait
returncodefinishr8   r?   r0   r   warning
ValueErrorr#   )cmdshow_stdoutr4   on_returncodeextra_ok_returncodescommand_descextra_environunset_environspinnerlog_failed_cmdlog_subprocess
used_levelshowing_subprocessuse_spinnerr=   nameprocexc
all_outputlineproc_had_errorr7   exc_msgr   r   r   call_subprocessq   s    
















rr   c                s   d fdd	}|S )zProvide 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.
    Nc                s(   t  }t| |||d W d Q R X d S )N)r4   rc   re   )r   rr   )r^   r4   rc   re   )messager   r   runner
  s    
z+runner_with_spinner_message.<locals>.runner)NNr   )rs   rt   r   )rs   r   runner_with_spinner_message  s    
 ru   )	FNr9   NNNNNT)(
__future__r   rD   rI   rN   pip._vendor.six.movesr   pip._internal.cli.spinnersr   r   pip._internal.exceptionsr   pip._internal.utils.compatr   r   pip._internal.utils.loggingr	   pip._internal.utils.miscr
   r   pip._internal.utils.typingr   typingr   r   r   r   r   r   r   r   r    ZCommandArgsr2   r   r$   r'   r8   rr   ru   r   r   r   r   <module>   s:   (
,        
 