7fa hdZddlZddlZddlZddlZddlZddlZddlmZddlm Z m Z m Z ddl m Z ddl mZddlmZddlmZdd lmZmZdd lmZmZmZmZdd lmZmZmZmZm Z m!Z!dd l"m#Z#dd l$m%Z%m&Z&ddl'm(Z(m)Z)ddl*m+Z,ddl*m-Z-m.Z.ddl/m0Z0dgZ1ej2e3Z4GddeZ5dS)z(Base Command class, and related routinesN)Values)ListOptionalTuple) reconfigure) traceback) cmdoptions)CommandContextMixIn)ConfigOptionParserUpdatingDefaultsHelpFormatter)ERRORPREVIOUS_BUILD_DIR_ERROR UNKNOWN_ERRORVIRTUALENV_NOT_FOUND) BadCommand CommandErrorDiagnosticPipErrorInstallationErrorNetworkConnectionErrorPreviousBuildDirError)check_path_owner)BrokenStdoutLoggingError setup_logging)get_prognormalize_path)TempDirectoryTypeRegistry)global_tempdir_managertempdir_registry)running_under_virtualenvCommandc eZdZUdZeed<dZeed<ddedededd ffd Zdd Z d e dd fd Z d e de ede fdZde d e de ede fdZde edee e effdZde ede fdZde ede fdZxZS)r usageFignore_require_venvnamesummaryisolatedreturnNc t||_||_t |jt d|td||j||_ d|_ |j d}tj |j ||_tjtj|j }|j ||dS)N F)r#prog formatteradd_help_optionr% descriptionr'z Options)super__init__r%r&r r#rr __doc__parserr capitalizeoptparse OptionGroupcmd_optsr make_option_group general_groupadd_option_group add_options)selfr%r&r' optgroup_namegen_opts __class__s ~/builddir/build/BUILD/imunify360-venv-2.3.5/opt/imunify360/venv/lib/python3.11/site-packages/pip/_internal/cli/base_command.pyr0zCommand.__init__0s   (*JJ''''355!     <@ 9//11;;;  ,T[-HH /  $ K   $$X... cdSN)r;s r?r:zCommand.add_optionsNs r@optionsc*t|drJdS)zf This is a no-op so that commands by default do not do the pip version check. no_indexN)hasattr)r;rDs r?handle_pip_version_checkz Command.handle_pip_version_checkQs 7J///////r@argsctrB)NotImplementedError)r;rDrIs r?runz Command.runZs!!r@ level_numberc:dtffd }jrtjd|S |}t |tsJ|S#t $rL}t d|ddit dd tcYd}~Sd}~wt$rT}t t|t dd tcYd}~Sd}~wttt f$rT}t t|t dd tcYd}~Sd}~wt"$rH}t d|t dd tcYd}~Sd}~wt$$rTt'd t(j |t,jkrt1jt(j tcYSt4$r@t d t dd tcYSt6$r&t d d t8cYSwxYw)Nr(c S#wxYwrB)rLrH)rIrDr;sr? _inner_runz(Command._run_wrapper.._inner_run^sJ 7xx..--g6666--g6666s .AT) show_localsz%srich)extrazException information:)exc_infoz ERROR: Pipe to stdout was broken)filezOperation cancelled by userz Exception:)int debug_moderich_tracebackinstall isinstancerloggererrordebugr rcriticalstrrrrrrrprintsysstderrloggingDEBUGr print_excKeyboardInterrupt BaseExceptionr)r;rMrDrIrPstatusexcs` `` r? _run_wrapperzCommand._run_wrapper]s 7C 7 7 7 7 7 7 7 7    "t 4 4 4 4:<< , !Z\\Ffc** * **M!    LLs64.L 9 9 9 LL1DL A A ALLLLLL$ , , , OOCHH % % % LL1DL A A A+ + + + + + +   "     OOCHH % % % LL1DL A A ALLLLLL    OOD# & & & LL1DL A A ALLLLLL'    43: F F F Fw},,#4444LLL     OO9 : : : LL1DL A A ALLL ! ! ! OOL4O 8 8 8  !sj"A J'AB.(J. J;A D J J$A E3-J3 J=G=JAJ#AJ+,JJc6|j|SrB)r2 parse_argsr;rIs r?rlzCommand.parse_argss{%%d+++r@c |5||cdddtjS#1swxYwY tjdS#tjwxYwrB) main_context_mainrcshutdownrms r?mainz Command.mains ""$$ ( (zz$'' ( ( ( ( ( ( (       ( ( ( ( ( ( ( ( (       G     s-A,A  A, AA,AA,,Bc|t|_|t||\}}|j|jz |_t|jt|j|j|j }t|j ttjz}|r;tddt%||jrAdt(jvr3tdt/jt2|jrdt(jd<|jr'd |jt(jd <|jrH|jsAt=s3td t/jt>|j rTtC|j |_ tE|j s'td |j d|_ |#|||S) N)no_color) verbosityrt user_log_filez/The following features are always enabled: %s. z, _PIP_RUNNING_IN_SUBPROCESSzAThe --python option must be placed before the pip subcommand name1 PIP_NO_INPUTr*PIP_EXISTS_ACTIONz2Could not find an activated virtualenv (required).zThe directory '%s' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag.)$ enter_contextrrrlverbosequietrurrtrlogsetfeatures_enabledr ALWAYS_ENABLED_FEATURESr[warningjoinsortedpythonosenvironr^raexitr no_input exists_action require_venvr$rr cache_dirrrrj)r;rIrDrMalways_enabled_featuress r?rpz Command._mainsC!% 2 23C3E3E F F 133444-- !7=8W-....$n%!+   #&g&>"?"?#  .C C #  #  NNA &!899::    > :"*LL OOS    HUOOO   -),BJ~ &   N.1hhw7L.M.MBJ* +   /(@ /+-- / TUUU-...   ) .w/@ A AG #G$566 )* % %)!  w===r@)F)r(N)__name__ __module__ __qualname__r#r___annotations__r$boolr0r:rrHrrVrLrjrrlrrrp __classcell__)r>s@r?r r ,sE3OOO %%%%S3$4<    0040000"6"c"s""""7!7!v7!T#Y7!SV7!7!7!7!r,tCy,U6493D-E,,,,csF>$s)F>F>F>F>F>F>F>F>F>r@)6r1rclogging.configr4rrarrtypingrrrpip._vendor.richrrXpip._internal.clir !pip._internal.cli.command_contextr pip._internal.cli.parserr r pip._internal.cli.status_codesr rrrpip._internal.exceptionsrrrrrrpip._internal.utils.filesystemrpip._internal.utils.loggingrrpip._internal.utils.miscrrpip._internal.utils.temp_dirrTempDirRegistryrrpip._internal.utils.virtualenvr__all__ getLoggerrr[r rCr@r?rs;.. ((((((((((((((((888888((((((AAAAAAVVVVVVVV <;;;;;OOOOOOOO========UUUUUUQQQQQQQQCCCCCC +  8 $ ${>{>{>{>{>!{>{>{>{>{>r@