hrddlZddlZddlZddlZddlZddlZddlmZmZddl m Z m Z ddl m Z ddlmZddlZddlmZddlmZddlmZdd lmZmZdd lmZmZdd lmZm Z dd l!m"Z"dd l#m$Z$ddl%m&Z&ddl'm(Z(ddl)m*Z*m+Z+ddl,m-Z-ddl.m/Z/m0Z0ddl1m2Z2ddl3m4Z4ddl5m6Z6ddl7m8Z8m9Z9m:Z:m;Z;mm?Z?ddl@mAZAmBZBddlCmDZDmEZEe6eFZGGddeZH d/deIde eJde eJd eId!e eJd"e eJf d#ZKde eJd eId"eIfd$ZL d0d%e eId&e eJd'e eJd(e eJd)eId"eIf d*ZMd+eNd,eId-eId"eJfd.ZOdS)1N) SUPPRESS_HELPValues)ListOptional)canonicalize_name) print_json) WheelCache) cmdoptions)make_target_python)RequirementCommand with_cleanup)ERRORSUCCESS) CommandErrorInstallationError) get_scheme)get_environment)InstallationReport)get_build_tracker)ConflictDetailscheck_install_conflicts)install_given_reqs)InstallRequirementcheck_legacy_setup_py_options)WINDOWStest_writable_dir) getLogger)check_externally_managed ensure_dirget_pip_version(protect_pip_from_modification_on_windowswarn_if_run_as_root write_output) TempDirectory)running_under_virtualenvvirtualenv_no_global)build should_build_for_install_commandceZdZdZdZddZededee de fdZ d e d e d e ddfd Zd eedeefdZdede ddfdZdS)InstallCommandaI Install packages from: - PyPI (and other indexes) using requirement specifiers. - VCS project urls. - Local project directories. - Local or remote source archives. pip also supports installing from "requirements files", which provide an easy way to specify a whole environment to be installed. a% %prog [options] [package-index-options] ... %prog [options] -r [package-index-options] ... %prog [options] [-e] ... %prog [options] [-e] ... %prog [options] ...returnNcX |jtj|jtj|jtj|jtj|jtj|jddddd|jddd d dd tj|j|jd ddd|jdddt|jddd dd |jddd dd |jtj |jddddd|jddddd gd!"|jd#d$dd%|jd&d'd(dd)|jtj |jtj |jtj |jtj|jtj|jtj|jtj|jtj|jd*dd+d,d-|jd.dd+d/0|jd1dd2d,d3|jd4dd5d,d6|jtj|jtj|jtj|jtj|jtj|jtjtjtj|j}|jd7||jd7|j|jd8d9d:dd; dS). By default this will not replace existing files/folders in . Use --upgrade to replace existing packages in with new versions.)r1metavarr2r3z--user use_user_sitezInstall to the Python user install directory for your platform. Typically ~/.local/, or %APPDATA%\Python on Windows. (See the Python documentation for site.USER_BASE for full details.))r1r0r3z --no-user store_falsez--root root_pathz=Install everything relative to this alternate root directory.z--prefix prefix_patha[Installation prefix where lib, bin and other top-level folders are placed. Note that the resulting installation may contain scripts and other resources which reference the Python interpreter of pip, and not that of ``--prefix``. See also the ``--python`` option if the intention is to install packages into another (possibly pip-free) environment.z-Uz --upgradeupgradezUpgrade all specified packages to the newest available version. The handling of dependencies depends on the upgrade-strategy used.z--upgrade-strategyupgrade_strategyzonly-if-neededeageraGDetermines how dependency upgrading should be handled [default: %default]. "eager" - dependencies are upgraded regardless of whether the currently installed version satisfies the requirements of the upgraded package(s). "only-if-needed" - are upgraded only when they do not satisfy the requirements of the upgraded package(s).)r1r2choicesr3z--force-reinstallforce_reinstallz;Reinstall all packages even if they are already up-to-date.z-Iz--ignore-installedignore_installedzIgnore the installed packages, overwriting them. This can break your system if the existing package is of a different version or was installed with a different package manager!z --compilecompileTz'Compile Python source files to bytecodez --no-compilez.Do not compile Python source files to bytecode)r0r1r3z--no-warn-script-locationwarn_script_locationz0Do not warn when installing scripts outside PATHz--no-warn-conflictswarn_about_conflictsz%Do not warn about broken dependenciesrz--reportjson_report_filefileaWGenerate a JSON file describing what pip did to install the provided requirements. Can be used in combination with --dry-run and --ignore-installed to 'resolve' the requirements. When - is used as file name it writes to stdout. When writing to stdout, please combine with the --quiet option to avoid mixing pip logging output with JSON output.)cmd_opts add_optionr requirements constraintsno_depspreeditableadd_target_python_optionsrsrcignore_requires_pythonno_build_isolation use_pep517 no_use_pep517check_build_depsoverride_externally_managedconfig_settingsglobal_options no_binary only_binary prefer_binaryrequire_hashes progress_barroot_user_actionmake_option_group index_groupparserinsert_option_group)self index_optss ~/builddir/build/BUILD/imunify360-venv-2.5.2/opt/imunify360/venv/lib/python3.11/site-packages/pip/_internal/commands/install.py add_optionszInstallCommand.add_optionsPs   !8!:!:;;;   !7!9!9:::   !3!5!5666   !1!1222   !4!6!6777   1 !     % !  ,T];;;    % !       !     P !       !     !1!1222    ) !    #$%w/G !     "N !       #4 !    !B!D!DEEE   !>!@!@AAA   !6!8!8999   !9!;!;<<<   !!>???   !G!I!IJJJ   !;!=!=>>>   !:!!>???1  " K  '':666 ''4=999   #G !     optionsargsc |jr|jtd|jo|j o|jduo|jduo|jdu}|r|jstd}|j r|j }tj |dtdtt!|j|j|j|j|j|_d}d}|jrd|_t&j|j|_t&j|jr3t&j|jstdt1d }|j}|||jpg}||}t9|} |||| |j } |t?} t1|j d d } |!||| |} tE|| tG|j$}| D] }d|_% |&| || || |j|j' }|(|| |||j|j|j|j)||j*|j+ }|,| |-| |j }|jrt]|j/}|jdkr#ta|1nYte|jdd5}tgj4|1|dddddn #1swxYwY|jrTtkd|j/D}|r-tmdd7d|DtpS |9d}|j:du}n#tv$rd}YnwxYwty|d|j=>D}t||dg|\}}|r?td Ad!7d"|D|B|}d}|jC o|jD}|r|E|}|jF}|js|jrd}t|||j||j||j|jH#}t|j||j|j|j$} t| }!|KtjMd%&g}"i}#|!ND]}$|$jO|#|$jP<|D]M}%|%jQ}&|#Rt|&d}'|'r|&d|'}(n|&}(|"T|(N|*|U||V|'d7|"})|)rtmd(|)n[#t$rN}*|j'd)k}+t|*|+|j},tY|,|+*tcYd}*~*Sd}*~*wwxYw|jr%|sJ|[|j||j |j\d+krttpS),Nz'Can not combine '--user' and '--target'zto-satisfy-onlyT) check_targetzUsing %s)r:r4r9 isolated_modez=Target path exists but is not a directory, will not continue.target)kind)rfsession target_pythonrOinstall)deleterlglobally_managed)temp_build_dirrf build_trackerrmfinderr7 verbosity) preparerrtrf wheel_cacher7r@rOr?r<rQpy_version_info)check_supported_wheels-)datawzutf-8)encodingF)indent ensure_asciic3JK|]}|jd|jdfVdS)nameversionN)metadata.0rs rc z%InstallCommand.run..sI--Z'I)>?------rezWould install %s c3@K|]}d|VdS)rzN)join)ritems rcrz%InstallCommand.run..s, P PD$ P P P P P Prepip) modifying_pipc0g|]}t||S)r)rs rc z&InstallCommand.run..s63A66re)rwverify build_optionsrVzNFailed to build installable wheels for some pyproject.toml based projects ({})z, c3$K|] }|jV dSN)rrs rcrz%InstallCommand.run..s$!A!AQ!&!A!A!A!A!A!Are)roothomeprefixrBr7 pycompile)userrrrisolatedr)key)resolver_variantzSuccessfully installed %s)exc_infowarn)^r7r4rr/rDr9r:rTrr;r<r check_dist_restrictionloggerverboser!decide_user_installrjr@ospathabspathexistsisdirr% enter_contextrVget_default_sessionr _build_package_finderrOrno_cleanget_requirementsrr cache_dirpermit_editable_wheelsmake_requirement_preparerru make_resolverr?rQpython_versiontrace_basic_inforesolverrequirements_to_installrto_dictopenjsondumpsortedr$rrget_requirement satisfied_byKeyErrorr"rHvaluesr(rformatget_installation_orderignore_dependenciesrC_determine_conflictsrBrrAget_lib_location_guessesrsortoperator attrgetteriter_all_distributionsrcanonical_namergetrappend_warn_about_conflictsdetermine_resolver_variantOSErrorcreate_os_error_messageerrorr_handle_target_dirr\r#)-rarfrg#installing_into_current_environmentr<target_temp_dirtarget_temp_dir_pathrVrmrnrtrs directoryreqsrwreqrvresolverrequirement_setreportfwould_install_itemspip_reqr reqs_to_build_build_failures to_install conflictsshould_warn_about_conflictsrB installed lib_locationsenvsummaryinstalled_versions distributionpackage display_namertextinstalled_descrshow_tracebackmessages- rcrunzInstallCommand.runs   JW%7%CHII I=W%= > ,!T) ,"d* ,#t+ , 0 '7 ' % & & &, ? 8&7 )'EEEEz?#4#4555 3  !+)'!/ ! ! ! 48.2   0'+G $!#1C!D!DG w122 GMM'"455  #S ,:::O#2#7    / / / /52**733*733 ++'#*#A ,   **+<+>+>?? !''!   g ((wHHD )'4 8 8 8$W%677K  2 2-1**55(+%3.6H))!'%3!(!9'.'E ' 7!1"- ' 6*  H  ! !& ) ) )&..1C-C/O' U+O,STT+s22FNN$4$455555g6gNNNURS &.."2"2AaeTTTTUUUUUUUUUUUUUUU &,--,D---''#' * P P>M !&' - !!! A~ '99? !A!A.!A!A!AAA::"88IIJ48I//PG4P (+ B 55jAA $+#? ! -W%8 -',$*&)*%9%3!/   I5*)&* . M"-00C NNx26::N ; ; ;G!#  # : : < < W W BNBV"<#>??$ % %&| ,001B<1P1PRVWW(*66W66DD'Dt$$$$$**%)%D%DW%M%M+ !XXg..N /"   !^q0N-%G LL>L : : :LLLLLL    " " "?  # #"OW_     #v - -  ! ! !sj!D>Y%+N Y%NY%NAY%=P Y% P+(Y%*P++H9Y%% Z=/AZ82Z=8Z=r4rr;c t|g}td|j}|j}|j}|j}t j|r||t j|r||kr||t j|r|||D]y} t j | D]`} | |krDt j ||  t fd|ddDrMt j || } t j| r|st d| t j| rt d| t j| rt!j| nt j| t!jt j | | | b{dS)N)rc3BK|]}|VdSr) startswith)rsddirs rcrz4InstallCommand._handle_target_dir..*s/II!1<<--IIIIIIrezKTarget directory %s already exists. Specify --upgrade to force replacement.zTarget directory %s already exists and is a link. pip will not automatically replace links, please remove if replacement is desired.)r rrpurelibplatlibr{rrrlistdirranyrwarningislinkrshutilrmtreeremovemove) rar4rr; lib_dir_listscheme purelib_dir platlib_dirdata_dirlib_dirrtarget_item_dirrs @rcrz!InstallCommand._handle_target_dirsL : B_%9:::n n ; 7>>+ & & -    , , , 7>>+ & & -;++E+E    , , , 7>>( # # *    ) ) )# J JG 7++ J Jh&&7<<$77DIIII|CRC7HIIIII! "$',,z4"@"@7>>/223"!>+ !w~~o66!', !w}}_553 o6666 /222 BGLL$77IIII9 J J Jrercx t|S#t$rtdYdSwxYw)NzwError while checking for conflicts. Please file an issue on pip's issue tracker: https://github.com/pypa/pip/issues/new)r Exceptionr exception)rars rcrz#InstallCommand._determine_conflictsEsW *:66 6      N   44  s $99conflict_detailsrc .|\}\}}|s|sdSg}|dkr|dn|dksJ|d|D]A}||d}||D](} |d|d| dd } || )B|D]W}||d}||D]>\} } } d ||| | | |dkrd nd } || ?Xtd|dS)Nlegacyzpip's legacy dependency resolver does not consider dependency conflicts when selecting packages. This behaviour is the source of the following dependency conflicts. resolvelibzpip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.rrz requires rz, which is not installed.zg{name} {version} requires {requirement}, but {you} have {dep_name} {dep_version} which is incompatible.youzyou'll)rr requirementdep_name dep_versionr )rrrcriticalr)rar r package_setmissing conflictingparts project_namer dependencyrrrrs rcrz$InstallCommand._warn_about_conflictsQs/?+ +g{ {  F x ' ' LL@     $|3333 LL@   $ & &L!,/2G%l3 & & #..g..A... W%%%%  &( & &L!,/2G.9,.G & &*+sF&%# #% +"2l"B"B  W%%%% &  %(()))))re)r,N)__name__ __module__ __qualname____doc__usagerdr rrstrintrr%boolrrrrrrrrercr+r+<s   0E    B{6{c{s{{{\{z4J4J0=4JHL4J 4J4J4J4Jl 12  / "    0* /0*CF0* 0*0*0*0*0*0*rer+Frrrrrr,cHtd|||||}|j|jgS)Nr)rrrrr)rrr)rrrrrrs rcrrs;    F NFN ++rec ltdtt||DS)Nc34K|]}t|VdSrr)rds rcrz)site_packages_writable..s>  !rerr)allsetrr(s rcsite_packages_writabler+sF -4(KKKLL  rer7r:r4r9rjc||stddS|rJ|rtdtrt dtddS|J|s|rtddSt jstd dSt|| rtd dStd dS) aZDetermine whether to do a user install based on the input options. If use_user_site is False, no additional checks are done. If use_user_site is True, it is checked for compatibility with other options. If use_user_site is None, the default behaviour depends on the environment, which is provided by the other arguments. Nz$Non-user install by explicit requestFzVCan not combine '--user' and '--prefix' as they imply different installation locationszZCan not perform a '--user' install. User site-packages are not visible in this virtualenv.z User install by explicit requestTz3Non-user install due to --prefix or --target optionz4Non-user install because user site-packages disabledr(z0Non-user install because site-packages writeablezMDefaulting to user installation because normal site-packages is not writeable) rdebugrr'rsiteENABLE_USER_SITEr+info)r7r:r4r9rjs rcrrs<" !M! ;<<<u   3  ! ! #6   7888t  j JKKKu   KLLLu9}EEE GHHHu KK  4rerrusing_user_sitecg}|d|s8|d|t|n|d|dxxdz cc<|jtjkrid}d}t s-|s+||d|gn|||d trI|jtjkr4|j r-t|j d kr|d d | dzS) zrFormat an error message for an OSError It may occur anytime during the execution of the install command. z,Could not install packages due to an OSErrorz: .rrz"Consider using the `--user` optionzCheck the permissionsz or z. izHINT: This error might have occurred since this system does not have Windows Long Path support enabled. You can find information on how to enable this at https://pip.pypa.io/warnings/enable-long-paths r) rr!errnoEACCESr&extendlowerrENOENTfilenamelenrstrip)rrr1ruser_option_partpermissions_parts rcrrs E LL?@@@  T SZZ     S "IIIIII {el""?2')) +/ + LL$$**,,     LL) * * * U   K5< ' ' N (   # % %  ?    775>>   ! !D ((re)FNNFN)NNNF)Pr4rrrrr.optparserrtypingrrpip._vendor.packaging.utilsrpip._vendor.richr!pip._internal.self_outdated_checkrpip._internal.cacher pip._internal.clir pip._internal.cli.cmdoptionsr pip._internal.cli.req_commandr r pip._internal.cli.status_codesrrpip._internal.exceptionsrrpip._internal.locationsrpip._internal.metadatar(pip._internal.models.installation_reportr,pip._internal.operations.build.build_trackerrpip._internal.operations.checkrrpip._internal.reqrpip._internal.req.req_installrrpip._internal.utils.compatrpip._internal.utils.filesystemrpip._internal.utils.loggingrpip._internal.utils.miscrr r!r"r#r$pip._internal.utils.temp_dirr%pip._internal.utils.virtualenvr&r'pip._internal.wheel_builderr(r)rrr+r#r!rr+rrrrrercrWs6  ********!!!!!!!!999999'''''')(((******((((((;;;;;;:9999999DDDDDDDD......222222GGGGGGJJJJJJSSSSSSSS000000/.....<<<<<<111111766666POOOOOOO 8  E *E *E *E *E *'E *E *E *R ,, , 3-, 3-, , SM ,  #Y ,,,,$#$4"& $# ::D>:#: :} :  :  ::::z6) 6)$(6);?6)6)6)6)6)6)6)re