7inp^ddlZddlZddlZddlZddlZddlZddlmZmZddl m Z m Z ddl m Z ddlmZddlmZddlmZddlmZmZmZdd lmZmZdd lmZmZdd lmZdd l m!Z!dd l"m#Z#ddl$m%Z%ddl&m'Z'm(Z(ddl)m*Z*ddl+m,Z,m-Z-ddl.m/Z/ddl0m1Z1ddl2m3Z3ddl4m5Z5m6Z6m7Z7m8Z8m9Z9ddl:m;Z;ddlZ>ddl?m@Z@mAZAe3eBZCGddeZD d-deEde eFde eFdeEde eFd e eFf d!ZGde eFdeEd eEfd"ZH d.d#e eEd$e eFd%e eFd&e eFd'eEd eEf d(ZId)eJd*eEd+eEd eFfd,ZKy)/N) SUPPRESS_HELPValues)ListOptional) print_json) WheelCache) cmdoptions)make_target_python)RequirementCommandwarn_if_run_as_root 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_windows 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 ddfdZy)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] ...returnNc |jjtj|jjtj|jjtj |jjtj |jjtj|jjddddd|jjddd d dd tj|j|jjd ddd|jjdddt|jjddd dd |jjddd dd |jjtj|jjddddd|jjddddd gd!"|jjd#d$dd%|jjd&d'd(dd)|jjtj|jjtj|jjtj|jjtj|jjtj|jjtj |jjtj"|jjtj$|jjd*dd+d,d-|jjd.dd+d/0|jjd1dd2d,d3|jjd4dd5d,d6|jjtj&|jjtj(|jjtj*|jjtj,|jjtj.|jjtj0tj2tj4|j6}|j6j9d7||j6j9d7|j|jjd8d9d:dd; y). By default this will not replace existing files/folders in . Use --upgrade to replace existing packages in with new versions.)r0metavarr1r2z--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.))r0r/r2z --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).)r0r1choicesr2z--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)r/r0r2z--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 g/mnt/ssd/data/python-lab/ChefSystem/venv/lib/python3.12/site-packages/pip/_internal/commands/install.py add_optionszInstallCommand.add_optionsHs   !8!8!:;   !7!7!9:   !3!3!56   !12   !4!4!67   1 !     % !  ,,T]];    % !       !   P !     !   !12    ) !    #$%w/G !   "N !     #4 !    !B!B!DE   !>!>!@A   !6!6!89   !9!9!;<   !?   !G!G!IJ   !;!;!=>   !:!:!<=   : !     A !    ' 'C !    ! '8 !    !5!5!78   !7!7!9:   !9!9!;<   !:!:!<=   !8!8!:;   !?11  " " KK '':6 ''4==9   #G ! optionsargsc |jr|j td|jxr |j xr.|j duxr|jduxr|j du}|r|js td}|jr |j}tj|dtjdtt!|j|j |j|j |j"|_d}d}|jrd|_t&j(j+|j|_t&j(j-|jr4t&j(j/|js tdt1d }|j(}|j3||j4xsg}|j7|}t9|} |j;||| |j< } |j3t?} t1|j@ d d } |jC||| |} tE|| tG|jH}| D] }d|_% |jM| || || |j|jN }|jQ|| |||j|j$|j<|jR||jT }|jW| |jY| |j }|jrt[|j\}|jdk(rt_|janHtc|jdd5}tejf|ja|ddddd|jrV|jitkd|j\D}|r"tmddjod|DtpS |jsd}|jtdu}ty||jzj}Dcgc]}t|r|}}t||dg|\}}|r0tdjd jod!|D|j|}d}|j xr |j}|r|j|}|j}|js |j rd}t|||j ||j ||j|j"} t|j||j |j |j"#}!t|!}"| jtjd$%g}#| D]D}$|$j}% |"j|%}&|&|%d|&j}%|#j|%F|"|j||j|&djo|#}'|'r tmd'|'|jr+|sJ|j|j||j|jd*k(r ttpS#1swYxYw#tv$rd}YwxYwcc}w#t$rYwxYw#t$rM}(|jNd(k\})t|(|)|j}*tj|*|))tcYd}(~(Sd}(~(wwxYw)+Nz'Can not combine '--user' and '--target'zto-satisfy-onlyT) check_targetzUsing %s)r9r3r8 isolated_modez=Target path exists but is not a directory, will not continue.target)kind)resession target_pythonrNinstall)deleterkglobally_managed)temp_build_dirre build_trackerrlfinderr6 verbosity) preparerrsre wheel_cacher6r?rNr>r;rP)check_supported_wheels-)datawzutf-8)encodingF)indent ensure_asciic3XK|]"}|jd|jdf$yw)nameversionN)metadata.0rs rb z%InstallCommand.run..s/-ZZ'I)>?-s(*zWould install %s c3>K|]}dj|yw)rxN)join)ritems rbrz%InstallCommand.run..s PD$ Pspip) modifying_pip)rvverify build_optionsrUzYCould not build wheels for {}, which is required to install pyproject.toml-based projectsz, c34K|]}|jywN)rrs rbrz%InstallCommand.run..s!AQ!&&!As)roothomeprefixrAr6 pycompile)userrrrisolatedr)key)resolver_variantzSuccessfully installed %s)exc_infowarn)]r6r3rr.rCr8r9rSrr:r;r check_dist_restrictionloggerverboser!decide_user_installrir?ospathabspathexistsisdirr$ enter_contextrUget_default_sessionr _build_package_finderrNrno_cleanget_requirementsrr cache_dirpermit_editable_wheelsmake_requirement_preparerrt make_resolverr>rPtrace_basic_inforesolverrequirements_to_installrto_dictopenjsondump#warn_legacy_versions_and_specifierssortedr#rrget_requirement satisfied_byKeyErrorr"rGvaluesr(r'rformatget_installation_orderignore_dependenciesrB_determine_conflictsrArr@get_lib_location_guessesrsortoperator attrgetterrget_distributionr Exceptionappend_warn_about_conflictsdetermine_resolver_variantOSErrorcreate_os_error_messageerrorr_handle_target_dirr[r )+r`rerf#installing_into_current_environmentr;target_temp_dirtarget_temp_dir_pathrUrlrmrsrr directoryreqsrvreqruresolverrequirement_setreportfwould_install_itemspip_reqrr reqs_to_build_build_failures to_install conflictsshould_warn_about_conflictsrA installed lib_locationsenvitemsresultrinstalled_distinstalled_descrshow_tracebackmessages+ rbrunzInstallCommand.run s7  W%7%7%CHI I=W%=%= > ,!!T) ,""d* ,##t+ , 077 $ &, ??&77 ))'Ez?#45 3  ! !++))''!// ! 48.2   '+G $!#1C1C!DG w112GGMM'"4"45#S ,:O#2#7#7    / //52**73*73 ++'#*#A#A ,  **+<+>? !'''! e ((wHD )'4 8$W%6%67K  2-1* 255(+%33..6H))!'%33!(!9!9'.'E'E ' 7 7!1"--* H  ! !& )&..1C1C-C/O''+O,S,ST++s2FNN$45g66gNURS &.."2AaeTU CCE&,-,DD-'#' * P3A6M !&' - ! A~'<L :L s&E\ 4([A)\ [$6\ [6"E$\ $[;+A\ [!\ $ [3/\ 2[33\ ; \\ \\ ] A]] ] r3rr:c t|g}td|j}|j}|j}|j }t jj|r|j|t jj|r||k7r|j|t jj|r|j||D]h} t j| D]L} | |k(r8t jj||  t fd|ddDrAt jj|| } t jj| r|stjd| t jj| rtjd| t jj| rt!j"| nt j$| t!j&t jj| | | Oky)N)rc3@K|]}|jywr) startswith)rsddirs rbrz4InstallCommand._handle_target_dir.. sI!1<<-IszKTarget 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 rrpurelibplatlibryrrrlistdirranyrwarningislinkrshutilrmtreeremovemove) r`r3rr: lib_dir_listscheme purelib_dir platlib_dirdata_dirlib_dirrtarget_item_dirrs @rbrz!InstallCommand._handle_target_dirs : B_%9%9:nn nn ;; 77>>+ &    , 77>>+ &;++E    , 77>>( #    )# JG 7+ Jh&77<<$7DI|CR7HII "$'',,z4"@77>>/2">+ !ww~~o6', !ww}}_5 o6 /2 BGGLL$7I9 J Jrdrcb t|S#t$rtjdYywxYw)NzwError while checking for conflicts. Please file an issue on pip's issue tracker: https://github.com/pypa/pip/issues/new)rrr exception)r`rs rbrz#InstallCommand._determine_conflicts;s: *:6 6    N   s ..conflict_detailsrc |\}\}}|s|syg}|dk(r|jdn|dk(sJ|jd|D]3}||d}||D]!} |d|d| dd } |j| #5|D]G}||d}||D]5\} } } d j||| | | |dk(rd nd } |j| 7Itjdj |y)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)r`rr package_setmissing conflictingparts project_namer dependencyrrr rs rbrz$InstallCommand._warn_about_conflictsGsX/?+ +g{{  x ' LL@  $|3 33 LL@ $ &L!,/2G%l3 & #nAgYjAH.. W%  & &( &L!,/2G.9,.G &*+sF&%# #% +"2l"B  W% & &  %()rd)r+N)__name__ __module__ __qualname____doc__usagercr rrstrintrr$boolrrrrrrrdrbr*r*4s  0E By6ycysyyv4J4J0=4JHL4J 4Jl 12  / " 0* /0*CF0* 0*rdr*rrrrrr+cTtd|||||}|j|jgS)Nr)rrrrr)rrr)rrrrrrs rbrrzs5    F NNFNN ++rdc Ntdtt||DS)Nc32K|]}t|ywrr)rds rbrz)site_packages_writable..s  !srr)allsetrrs rbsite_packages_writabler"s) -4(KL rdr6r9r3r8ric||stjdy|r8|r tdtr t dtjdy|J|s|rtjdyt j stjdyt|| rtjd ytjd y) 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. z$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 disabledrz0Non-user install because site-packages writeablezMDefaulting to user installation because normal site-packages is not writeable) rdebugrr&rsiteENABLE_USER_SITEr"info)r6r9r3r8ris rbrrs" !M ;< 3  !#6   78   j JK   KL9}E GH KK  rdrrusing_user_sitecg}|jd|s,|jd|jt|n|jd|dxxdz cc<|jtjk(rUd}d}t s%|s#|j |d|j gn|j||jd trR|jtjk(r5|jr)t|jd kDr|jd d j|jdzS) 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: .rr z"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) rrerrnoEACCESr%extendlowerrENOENTfilenamelenrstrip)rrr(ruser_option_partpermissions_parts rbrrs E LL?@  T SZ  S "II {{ell"?2')/ LL$$**,  LL) * U  KK5<< ' NN  # %  ?  775>   !D ((rd)FNNFN)NNNF)Lr+rrrrr%optparserrtypingrrpip._vendor.richrpip._internal.cacherpip._internal.clir pip._internal.cli.cmdoptionsr pip._internal.cli.req_commandr r 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#pip._internal.utils.temp_dirr$pip._internal.utils.virtualenvr%r&pip._internal.wheel_builderr'r(rrr*rrrr"rrrrrdrbrLs  *!'*(; :D.2GJS0/<17P 8 C *'C *N , , 3-, 3-, , SM ,  #Y ,$#$4"& $# :D>:#: :} :  :  :z6) 6)$(6);?6)6)rd