MhKRiddlmZddlZddlZddlZddlZddlZddlZddlm Z m Z ddl m Z ddl mZddlmZddlmZddlZddlmZdd lmZdd lmZdd lmZmZdd lmZm Z dd l!m"Z"m#Z#m$Z$ddl%m&Z&ddl'm(Z(m)Z)ddl*m+Z+ddl,m-Z-ddl.m/Z/m0Z0ddl1m2Z2m3Z3ddl4m5Z5ddl6m7Z7ddl8m9Z9ddl:m;Z;ddlZ>m?Z?m@Z@mAZAmBZBddlCmDZDddlEmFZFmGZGddlHmIZIe;eJZKGddeZLdd.ZNd?d/ZO d@dAd6ZPdBd;ZQdS)C) annotationsN) SUPPRESS_HELPValues)Path)canonicalize_name)InvalidProxyURL) print_json) WheelCache) cmdoptions)make_target_python)RequirementCommand with_cleanup)ERRORSUCCESS) CommandErrorInstallationErrorInstallWheelBuildError) get_scheme)BaseEnvironmentget_environment)InstallationReport)get_build_tracker)ConflictDetailscheck_install_conflicts)InstallationResultinstall_given_reqs)InstallRequirement)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)buildcNeZdZdZdZddZedd ZddZddZ d dZ dS)!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] ...returnNonec~ |jtj|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|jd*dd+d,d-|jd.dd+d/0|jd1dd2d,d3|jd4dd5d,d6|jtj|jtj|jtjtjtj|j}tjtj|j}|jd7||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.)r4metavarr5r6z--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.))r4r3r6z --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).)r4r5choicesr6z--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)r3r4r6z--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 constraintsbuild_constraintsrequirements_from_scriptsno_depseditableadd_target_python_optionsrsrcignore_requires_pythonno_build_isolation use_pep517check_build_depsoverride_externally_managedconfig_settingsrequire_hashes progress_barroot_user_actionmake_option_group index_groupparserpackage_selection_groupinsert_option_group)self index_optsselection_optss ~/builddir/build/BUILD/imunify360-venv-2.6.2/opt/imunify360/venv/lib/python3.11/site-packages/pip/_internal/commands/install.py add_optionszInstallCommand.add_optionsVsr   !8!:!:;;;   !7!9!9:::   !=!?!?@@@   !E!G!GHHH   !3!5!5666   !4!6!6777   1 !     % !  ,T];;;    % !       !     P !       !     !1!1222    ) !    #$%w/G !     "N !       #4 !    !B!D!DEEE   !>!@!@AAA   !6!8!8999   !!>???   !G!I!IJJJ   !;!=!=>>>   : !       A !      ' 'C !      ! '8 !      !:!!>???1  " K  $5  . K   '':666 ''>::: ''4=999   #G !     optionsrargs list[str]intc  |jr|jtd|jo|j o|jduo|jduo|jdu}|r|jstd}|j r|j }tj |tj |dtj|tdt#t%|j|j|j|j|j|_d}d}|jrd|_t*j|j|_t*j|jr3t*j|jstdt5d }|j}||||}t;|}|||||j } |tA} t5|j! d d } |"||| |} tG|j$} | D] }d|_% |&| || || |j|j' }|(|| || |j|j|j|j)||j* }|+| |,| |j }|jrt[|j.}|jdkr#t_|0nYtc|jdd5}tej3|0|dddddn #1swxYwY|jrTtid|j.D}|r-tkdd6d|DtnS|8|j9: |;d}|j<du}n#tz$rd}YnwxYwt}|d|j.D}t|| d\}}|rt||A|}d}|jB o|jC}|r|D|}|jE}|js|jrd}t||j||j||j|jG|jH }t|j||j|j|j!}t|} |*|K||L|"t|| x}!rtk|!n[#t$rN}"|j'd#k}#t|"|#|j}$tP|$|#$tcYd}"~"Sd}"~"wwxYw|jr%|sJ|R|j||j |jSd%krttnS)&Nz'Can not combine '--user' and '--target'zto-satisfy-onlyT) check_targetzUsing %s)r=r7r< isolated_modez=Target path exists but is not a directory, will not continue.target)kind)rgsession target_pythonrSinstall)deleteroglobally_managed)temp_build_dirrg build_trackerrpfinderr: verbosity) preparerrwrg wheel_cacher:rCrSrBr?py_version_info)check_supported_wheels-)datawzutf-8)encodingF)indent ensure_asciic3JK|]}|jd|jdfVdS)nameversionN)metadata.0rs rd z%InstallCommand.run..sI--Z'I)>?------rfzWould install %s c3@K|]}d|VdS)r}N)join)ritems rdrz%InstallCommand.run..s, P PD$ P P P P P Prfpip) modifying_pipc g|] }|j | S)is_wheelrs rd z&InstallCommand.run..s/!*rf)rzverify)roothomeprefixrEr: pycompilerZ)userrrrisolated)resolver_variant)exc_infowarn)Ur:r7rr2rGr<r=rWr"r>r?r check_build_constraintscheck_dist_restrictioncheck_release_control_exclusiveloggerverboser$decide_user_installrmrCospathabspathexistsisdirr( enter_contextget_default_sessionr _build_package_finderrSrno_cleanget_requirementsr cache_dirpermit_editable_wheelsmake_requirement_preparerrx make_resolverrBpython_versiontrace_basic_inforesolverrequirements_to_installr to_dictopenjsondumpsortedr'rr prepare_linked_requirements_morerKvaluesget_requirement satisfied_byKeyErrorr%r+rget_installation_orderignore_dependenciesrF_determine_conflictsrErrDrZget_lib_location_guessesr_warn_about_conflictsdetermine_resolver_variantinstalled_packages_summaryOSErrorcreate_os_error_messageerrorr_handle_target_dirr[r&)%rargrh#installing_into_current_environmentr?target_temp_dirtarget_temp_dir_pathrprqrwrv directoryreqsrzreqryresolverrequirement_setreportfwould_install_itemspip_reqr reqs_to_build_build_failures to_install conflictsshould_warn_about_conflictsrE installed lib_locationsenvsummaryrshow_tracebackmessages% rdrunzInstallCommand.runs   JW%7%CHII I=W%= > ,!T) ,"d* ,#t+ , 0 '7 ' % & & &, ? 8&7 *7333)'EEEE27;;;z?#4#4555 3  !+)'!/ ! ! ! 15+/   0'+G $!#1C!D!DG w122 GMM'"455  #S ,:::O#2#7    / / /**733*733 ++'#*#A ,   **+<+>+>?? !''!   N ((wHHD$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 PL : : :LLLLLL    " " "?  # #"OW_     #v - -  ! ! !spD(V3(+N V3N##V3&N#'AV3,V32Q V3 Q V3Q  EV33 X =AXX X r7strrr(r>boolc 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|]}|VdSN) startswith)rsddirs rdrz4InstallCommand._handle_target_dir..s/II!1<<--IIIIIIrfzKTarget 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~rrappendlistdirranyrwarningislinkrshutilrmtreeremovemove) rar7rr> lib_dir_listscheme purelib_dir platlib_dirdata_dirlib_dirrtarget_item_dirrs @rdrz!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 Jrfrlist[InstallRequirement]ConflictDetails | Nonecx 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 rdrz#InstallCommand._determine_conflicts4sW *:66 6      N   44  s $99conflict_detailsrrc .|\}\}}|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  )rformatrcriticalr)rarr package_setmissing conflictingparts project_namer dependencyrrrrs rdrz$InstallCommand._warn_about_conflicts@s/?+ +g{ {  F x ' ' LL@     $|3333 LL@   $ & &L!,/2G%l3 & & #..g..A... W%%%%  &( & &L!,/2G.9,.G & &*+sF&%# #% +"2l"B"B  W%%%% &  %(()))))rfN)r.r/)rgrrhrir.rj)r7rrr(r>rr.r/)rrr.r)rrrrr.r/) __name__ __module__ __qualname____doc__usagererrrrrrrfrdr-r-Bs   0EA A A A Fbbb\bH4J4J4J4Jl    0*0*0*0*0*0*rfr-rlist[InstallationResult]rrr.rc~|tjdg}i}|D]}|j||j<|D]M}|j}|t|d}|r|d|}n|}| |N|sdSdd |S)Nr)keyr}rzSuccessfully installed r) sortoperator attrgetteriter_all_distributionsrcanonical_namergetrrr) rrrinstalled_versions distributionpackage display_namertexts rdrrss NNx*622N333G2244OO :F:N<677| $(():<)H)H$OO  "..W..DDDt r 8SXXg%6%6 8 88rfFrrr str | NonerrrricHtd|||||}|j|jgS)Nr)rrrrr)rrr)rrrrrrs rdrrs;    F NFN ++rfc ltdtt||DS)Nc34K|]}t|VdSrr)rds rdrz)site_packages_writable..s>  !rfrr)allsetrr1s rdsite_packages_writabler4sF -4(KKKLL  rfr: bool | Noner=r7r<rmc:||stddS|re|rtdtrt dt jst dtddS|J|s|rtd dSt 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.zTCan not perform a '--user' install. User site-packages are disabled for this Python.z User install by explicit requestTz3Non-user install due to --prefix or --target optionz4Non-user install because user site-packages disabledr1z0Non-user install because site-packages writeablezMDefaulting to user installation because normal site-packages is not writeable) rdebugrr*rsiteENABLE_USER_SITEr4info)r:r=r7r<rms rdrrsb" !M! ;<<<u  3  ! ! #6  $ #0   7888t  j JKKKu   KLLLu9}EEE GHHHu KK  4rfrrrusing_user_sitecg}|d|s8|d|t|n|d|dxxdz cc<|jtjkrid}d}t s-|s+||d|gn|||d t|tur*|d |d tr|jtj tj fvry|j rrtd t|j jDr|d t!|j d kr|dd|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. zHConsider checking your local proxy configuration with "pip config debug"c3<K|]}t|dkVdS)N)len)rparts rdrz*create_os_error_message..s,FF4s4yy3FFFFFFrfzHINT: This error might be caused by a file or folder name exceeding 255 characters, which is a Windows limitation even if long paths are enabled. 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)rrerrnoEACCESr)extendlowertyperrEINVALENOENTfilenamerrrr@rstrip)rrr;ruser_option_partpermissions_parts rdrrs E LL?@@@  T SZZ     S "IIIIII {el""?2')) +/ + LL$$**,,     LL) * * * U E{{o%% V     U5;5<">>>5>> FF4+?+?+EFFF F F  LL"    u~   $ $ LLC    775>>   ! !D ((rf)rrrrr.r)FNNFN) rrrr,rr,rrrr,r.ri)rr,rrr.r)NNNF) r:r5r=r,r7r,r<r,rmrr.r)rrrrr;rr.r)R __future__rrBrr"rrr8optparserrpathlibrpip._vendor.packaging.utilsrpip._vendor.requests.exceptionsrpip._vendor.richr !pip._internal.self_outdated_checkrpip._internal.cacher pip._internal.clir pip._internal.cli.cmdoptionsr pip._internal.cli.req_commandr rpip._internal.cli.status_codesrrpip._internal.exceptionsrrrpip._internal.locationsrpip._internal.metadatarr(pip._internal.models.installation_reportr,pip._internal.operations.build.build_trackerrpip._internal.operations.checkrrpip._internal.reqrrpip._internal.req.req_installrpip._internal.utils.compatrpip._internal.utils.filesystemr pip._internal.utils.loggingr!pip._internal.utils.miscr"r#r$r%r&r'pip._internal.utils.temp_dirr(pip._internal.utils.virtualenvr)r*pip._internal.wheel_builderr+rrr-rrr4rrrrfrdrhs""""""  ********999999;;;;;;'''''')(((******((((((;;;;;;:9999999 /.....CCCCCCCCGGGGGGJJJJJJSSSSSSSSDDDDDDDD/.....<<<<<<111111766666.----- 8  n*n*n*n*n*'n*n*n*b99992 ,,,,,$#!  BBBBBJA)A)A)A)A)A)rf