id"pdZddlZddlZddlZddlZddlZddlZddlZddlmZddl m Z m Z m Z m Z mZddlmZddlmZddlmZddlmZmZdd lmZmZmZmZdd lmZmZm Z m!Z!m"Z"m#Z#m$Z$dd l%m&Z&dd l'm(Z(m)Z)dd l*m+Z+m,Z,ddl-m.Z/ddl-m0Z0m1Z1ddl2m3Z3dgZ4ej5e6Z7GddeZ8dS)z(Base Command class, and related routinesN)Values)AnyCallableListOptionalTuple) traceback) cmdoptions)CommandContextMixIn)ConfigOptionParserUpdatingDefaultsHelpFormatter)ERRORPREVIOUS_BUILD_DIR_ERROR UNKNOWN_ERRORVIRTUALENV_NOT_FOUND) BadCommand CommandErrorDiagnosticPipErrorInstallationErrorNetworkConnectionErrorPreviousBuildDirErrorUninstallationError)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 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 S/opt/cloudlinux/venv/lib/python3.11/site-packages/pip/_internal/cli/base_command.pyr2zCommand.__init__1s   (*JJ''''355!     <@ 9//11;;;  ,T[-HH /  $ K   $$X... cdSN)r=s rAr<zCommand.add_optionsOs rBoptionsc*t|drJdS)zf This is a no-op so that commands by default do not do the pip version check. no_indexN)hasattr)r=rFs rAhandle_pip_version_checkz Command.handle_pip_version_checkRs 7J///////rBargsctrD)NotImplementedError)r=rFrKs rArunz Command.run[s!!rBc6|j|SrD)r4 parse_argsr=rKs rArPzCommand.parse_args^s{%%d+++rBc |5||cdddtjS#1swxYwY tjdS#tjwxYwrD) main_context_mainloggingshutdownrQs rAmainz Command.mainbs ""$$ ( (zz$'' ( ( ( ( ( ( (       ( ( ( ( ( ( ( ( (       G     s-A,A  A, AA,AA,,Bc|t|_|t||\}}|j|jz |_t|j|j|j t|j ttj z}|r;tddt#||jrAdt&jvr3tdt-jt0|jrdt&jd<|jr'd|jt&jd <|jrH|jsAt;s3td t-jt<|jrTtA|j|_tC|js'td |jd|_d tDd tFfdtDd tFfffd } |j$s||j%}n|j%}tMj'd||||(|S#|(|wxYw)N) verbosityno_color 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.run_func.r*chtjdtdtffd }|S)NrKr*c |}t|tsJ|S#t$rH}td|tddt cYd}~Sd}~wt$rT}tt|tddtcYd}~Sd}~wttttf$rT}tt|tddt cYd}~Sd}~wt$rH}td|tddt cYd}~Sd}~wt $rTt#dt$jt(jkrt-jt$jt cYSt0$r@tdtddt cYSt2$r&td dt4cYSwxYw) Nz[present-rich] %szException information:T)exc_infoz%sz ERROR: Pipe to stdout was broken)filezOperation cancelled by userz Exception:) isinstanceintrloggererrordebugrrcriticalstrrrrrrrrprintsysstderrrUDEBUGr print_excKeyboardInterrupt BaseExceptionr)rKstatusexc level_numberr`s rAexc_logging_wrapperzLCommand._main..intercepts_unhandled_exc..exc_logging_wrapperse-)%Xt_F%fc22222!M)!!!LL!4c:::LL!9DLIII LLLLLL,444OOCHH---LL!9DLIII3333333%'*  ! ! ! OOCHH---LL!9DLIII LLLLLL#!!!OOD#...LL!9DLIII LLLLLL/!!!<3:NNNN#w}44!+<<<< LLL(!!!OO$ABBBLL!9DLIII LLL$)))OOL4O@@@(((()sf! I =A.(I . I ;A C I  I *A D93I 9 I =F I  AI )AI 1,I I ) functoolswrapsrrf)r`rvrus` rAintercepts_unhandled_excz/Command._main..intercepts_unhandled_excsU_X & &. )3. )3. ). ). ). ). ). )' &. )`' &rBT) show_locals)) enter_contextr rrPverbosequietrYrrZlogsetfeatures_enabledr ALWAYS_ENABLED_FEATURESrgwarningjoinsortedpythonosenvironrjrmexitrno_input exists_action require_venvr&r!r cache_dirrrrrf debug_moderNrich_tracebackinstallrJ)r=rKrFalways_enabled_featuresryrNrus @rArTz Command._mainis!% 2 23C3E3E F F 133444-- !7=8$n%!+   #&g&>"?"?#  .C C #  #  NNA &!899::    > :"*LL OOS    HUOOO   -),BJ~ &   N.1hhw7L.M.MBJ* +   /(@ /+-- / TUUU-...   ) .w/@ A AG #G$566 )* % %)!4 'sCx(4 ' c3h 4 '4 '4 '4 '4 '4 'l 3% 9..tx88h&488883w%%  ) )' 2 2 2 2D ) )' 2 2 2 2s &?J;;K)F)r*N)__name__ __module__ __qualname__r%rk__annotations__r&boolr2r<rrJrrfrNrrPrWrT __classcell__)r@s@rAr"r"-skE3OOO %%%%S3$4<    0040000"6"c"s"""",tCy,U6493D-E,,,,csC3$s)C3C3C3C3C3C3C3C3C3rB)9r3rwrUlogging.configr6rrmr rtypingrrrrrpip._vendor.richrpip._internal.clir !pip._internal.cli.command_contextr pip._internal.cli.parserr r pip._internal.cli.status_codesrrrrpip._internal.exceptionsrrrrrrrpip._internal.utils.filesystemrpip._internal.utils.loggingrrpip._internal.utils.miscrrpip._internal.utils.temp_dirrTempDirRegistryrr pip._internal.utils.virtualenvr!__all__ getLoggerrrgr"rErBrArsK.. 77777777777777888888((((((AAAAAAVVVVVVVV <;;;;;OOOOOOOO========UUUUUUQQQQQQQQCCCCCC +  8 $ $33333!33333rB