h ddlZddlZddlmZmZddlmZddlm Z ddl m Z m Z ej eZdeededefd Zd eed ed edeededeef d Zd edededeedeededeefdZdS)N)ListOptional) open_spinner) make_setuptools_bdist_wheel_args)call_subprocessformat_command_args command_argscommand_outputreturnct|}d|d}|s|dz }nOttjkr|dz }n"|ds|dz }|d|z }|S)z'Format command information for logging.zCommand arguments:  zCommand output: Nonez'Command output: [use --verbose to show]zCommand output: )rloggergetEffectiveLevelloggingDEBUGendswith)r r command_desctexts /builddir/build/BUILD/imunify360-venv-2.5.2/opt/imunify360/venv/lib/python3.11/site-packages/pip/_internal/operations/build/wheel_legacy.pyformat_command_resultr s '|44L 1 1 1 1D 5 &&  ! ! # #gm 3 3 99&&t,, # d "N 4N444 Knamestemp_dirnameclt|}|s5d|d}|t||z }t|dSt |dkr6d|d|d}|t||z }t|t j||dS)z>Return the path to the wheel in the temporary build directory.zLegacy build of wheel for z created no files. Nz9 created more than one file. Filenames (choosing first): r r)sortedrrwarninglenospathjoin)rrrr r msgs rget_legacy_build_wheel_pathr$ s 5MME G4GGG $\>BBBst 5zzA~~ 5 5 5+0 5 5 5  $\>BBBs 7<<%( + ++r setup_py_path source_dirglobal_options build_optionstempdct||||}d|d}t|5}td| t |d||} nL#t $r?|dtd|Yd d d d SwxYwtj |} t| |||| } | cd d d S#1swxYwYd S) zBuild one unpacked package using the "legacy" build process. Returns path to wheel if successfully built. Otherwise, returns None. )r'r(destination_dirzBuilding wheel for z (setup.py)zDestination directory: %szpython setup.py bdist_wheel)rcwdspinnererrorzFailed building wheel for %sN)rrrr r ) rrrdebugr Exceptionfinishr.r listdirr$) rr%r&r'r(r) wheel_args spin_messager-outputr wheel_paths rbuild_wheel_legacyr7;s2%# J;:::L l # #w 0%888 $: FF     NN7 # # # LL7 > > >   5!!0#!    /s5CAC:B#C"B##,CC #C )ros.pathr typingrrpip._internal.cli.spinnersr$pip._internal.utils.setuptools_buildrpip._internal.utils.subprocessrr getLogger__name__rstrrr$r7rrrAss!!!!!!!!333333QQQQQQOOOOOOOO  8 $ $s) (, 9,, ,s) ,  , c] ,,,,6+ +++I + 9 +  +c]++++++r