}M $LfK}ddlmZddlZddlZddlZddlZddlmZmZddl m Z m Z m Z m Z ddlmZddlmZmZddlmZddlmZmZdd lmZee eefZd.dZd/dZd0dZ d1d2d*Z d3d-Z!dS)4) annotationsN)IterableMapping)AnyCallableLiteralUnion)escape)SpinnerInterface open_spinner)InstallationSubprocessError)VERBOSEsubprocess_logger) HiddenTextargsstr | HiddenText | CommandArgsreturn CommandArgscg}|D]B}t|tr||-||C|S)z& Create a CommandArgs object. ) isinstancelistextendappend)r command_argsargs p/builddir/build/BUILD/cloudlinux-venv-1.0.10/venv/lib/python3.11/site-packages/pip/_internal/utils/subprocess.py make_commandrsb!#L%% c4  %    $ $ $ $    $ $ $ $ list[str] | CommandArgsstrc@dd|DS)z/ Format command arguments for display.  c3K|]N}t|tr!tjt |ntj|VOdS)N)rrshlexquoter .0rs r z&format_command_args...sd ",C!z'reveal_command_args..8s- O O O3*S*55 >CJJ3 O O Orr/r*s rreveal_command_argsr24s P O$ O O OOrFraiseTcmd show_stdoutboolcwd str | None on_returncode"Literal['raise', 'warn', 'ignore']extra_ok_returncodesIterable[int] | None extra_environMapping[str, Any] | None unset_environIterable[str] | NonespinnerSpinnerInterface | Nonelog_failed_cmd bool | None stdout_only command_descc  |g}|g}|rtj} tj} ntj} t } tj| k} | o|du}| d| tj }|r| ||D]}| |d tj t|tjtj| s tjn tj||d}n+#t"$r}|rtjd|| d}~wwxYwg}| s |jsJ|jsJ|j |j}|snR|}||dz| ||r|sJ|n ||jr|jn&#|jr|jwwxYwd|}n|\}}|D] }| ||||D] }| ||||}|jo|j|v}|r1|sJ|r|d n|d |r|d krtA| |j| s|nd }|rttj!d |dditjdtEtG|dditjdtE|pdddi||dkrtj$d| |j|n|dkrntKd||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. stdout_only: if true, return only stdout, else return both. When true, logging of both stdout and stderr occurs when the subprocess has terminated, else logging occurs as subprocess output is produced. NzRunning command %sbackslashreplace)stdinstdoutstderrr7enverrorsz#Error %s while executing command %sT errordoner3)command_description exit_code output_linesz%srich)extraz*[bold magenta]full command[/]: [blue]%s[/]markupz[bold magenta]cwd[/]: %sz [inherit]warnz$Command "%s" had error code %s in %signorezInvalid value: on_returncode=)&rinfologgingINFOverbosergetEffectiveLevelosenvironcopyupdatepop subprocessPopenr2PIPESTDOUT ExceptioncriticalrJrIclosereadlinerstriprspinwaitr) communicate splitlines returncodefinishr rPr r+warning ValueError)r4r5r7r9r;r=r?rArCrErFlog_subprocess used_levelshowing_subprocess use_spinnerrLnameprocexc all_outputlineoutputouterrout_lineerr_lineproc_had_errorrPs rcall_subprocessr;s6#! .?.D\ +2 +<>>*L)(@WD-@KN'666 *//  C" =!!! d  $ $/?,7L:$$Z_%         &5    J #{{zz   ,,..D ;;==D   dTk * * * N4  w   $ IIKKK{ $ !!###{ $ !!#### $$$##%%S(( % %H N8 $ $ $ $#(( % %H N8 $ $ $ $#_T@T)TN#w  # NN7 # # # # NN6 " " "P G # #/$0//AKZZtE  !'eFD>JJJJ!)@.s3344#T* ").3-+..#T* K f $ $  %6      h & & N]NNOO O Ms%2AD D/D**D/H#H*messageCallable[..., None]c d d fd }|S) zProvide a subprocess_runner that shows a spinner message. Intended for use with for BuildBackendHookCaller. Thus, the runner has an API that matches what's expected by BuildBackendHookCaller.subprocess_runner. Nr4r,r7r8r=r>rNonect5}t||||ddddS#1swxYwYdS)N)rFr7r=rA)r r)r4r7r=rArs rrunnerz+runner_with_spinner_message..runners ' " " g $+                       s 377)NN)r4r,r7r8r=r>rrr/)rrs` rrunner_with_spinner_messagers526        Mr)rrrr)rrrr )rrrr,) FNr3NNNNTF)r4rr5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErDrFr rr )rr rr)" __future__rr[r_r$rdcollections.abcrrtypingrrrr pip._vendor.rich.markupr pip._internal.cli.spinnersr r pip._internal.exceptionsr pip._internal.utils.loggingrrpip._internal.utils.miscrrr rrr+r2rrr/rrrs"""""" --------000000000000******EEEEEEEE@@@@@@BBBBBBBB//////5j)* "    PPPP8?15.2*.'+"&$eeeeePr