RelddlZddlZddlZddlZddlZddlmZmZddlm Z m Z m Z ddl m Z ddlmZddlmZddlmZddlmZmZmZdd lmZmZdd lmZmZdd lmZdd l m!Z!dd l"m#Z#ddl$m%Z%m&Z&ddl'm(Z(ddl)m*Z*ddl+m,Z,ddl-m.Z.ddl/m0Z0ddl1m2Z2ddl3m4Z4ddl5m6Z6m7Z7m8Z8m9Z9ddl:m;Z;ddlZ>ddl?m@Z@mAZAmBZBe4eCZDde#de@fdZEGddeZF d4d eGd!e eHd"e eHd#eGd$e eHde eHf d%ZId"e eHd#eGdeGfd&ZJ d5d'e eGd(e eHd)e eHd*e eHd+eGdeGf d,ZKd-e e*d.e e eHddfd/ZLd0eMd1eGd2eGdeHfd3ZNdS)6N) SUPPRESS_HELPValues)IterableListOptional)canonicalize_name) WheelCache) cmdoptions)make_target_python)RequirementCommandwarn_if_run_as_root with_cleanup)ERRORSUCCESS) CommandErrorInstallationError) get_scheme)get_environment) FormatControl)ConflictDetailscheck_install_conflicts)install_given_reqs)InstallRequirement)get_requirement_tracker)WINDOWS)parse_distutils_argstest_writable_dir) getLogger) ensure_dirget_pip_version(protect_pip_from_modification_on_windows write_output) TempDirectory)running_under_virtualenvvirtualenv_no_global)BinaryAllowedPredicatebuild should_build_for_install_commandformat_controlreturnc0dtdtffd }|S)Nreqr+cbt|jpd}|}d|vS)Nbinary)rnameget_allowed_formats)r-canonical_nameallowed_formatsr*s /builddir/build/BUILDROOT/alt-python311-pip-21.3.1-3.el8.x86_64/opt/alt/python311/lib/python3.11/site-packages/pip/_internal/commands/install.pycheck_binary_allowedz6get_check_binary_allowed..check_binary_allowed5s4*38>r::(<<^LL?**)rbool)r*r6s` r5get_check_binary_allowedr94s8+"4+++++++ r7ceZdZdZdZddZededee 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] ...r+Nc |jtj|jtj|jtj|jtj|jtj|jddddddtj|j|jddd d |jd dd t |jddddd|jddddd|jtj |jdddd d |jdddddgd|jddd d |jd!d"d#d d$ |jtj |jtj |jtj |jtj|jtj|jtj|jd%d d&d'd()|jd*d d&d+,|jd-d d.d'd/)|jd0d d1d'd2)|jtj|jtj|jtj|jtj|jtjtjtj|j}|jd3||jd3|jdS)4Nz-tz--target target_dirdirzInstall packages into . By default this will not replace existing files/folders in . Use --upgrade to replace existing packages in with new versions.)destmetavardefaulthelpz--user use_user_site store_truezInstall 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.))r?actionrBz --no-user store_falsez--root root_pathz=Install everything relative to this alternate root directory.z--prefix prefix_pathzIInstallation prefix where lib, bin and other top-level folders are placedz-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).)r?rAchoicesrBz--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 bytecode)rEr?rArBz --no-compilez.Do not compile Python source files to bytecode)rEr?rBz--no-warn-script-locationwarn_script_locationz0Do not warn when installing scripts outside PATHz--no-warn-conflictswarn_about_conflictsz%Do not warn about broken dependenciesr)cmd_opts add_optionr requirements constraintsno_depspreeditableadd_target_python_optionsrsrcignore_requires_pythonno_build_isolation use_pep517 no_use_pep517install_optionsglobal_options no_binary only_binary prefer_binaryrequire_hashes progress_barmake_option_group index_groupparserinsert_option_group)self index_optss r5 add_optionszInstallCommand.add_optionsQs   !8!:!:;;;   !7!9!9:::   !3!5!5666   !1!1222   !4!6!6777    % !  ,T];;;    % !       !     P !      % !    !1!1222    ) !    #$%w/G !     "N !       #4 !    !B!D!DEEE   !>!@!@AAA   !6!8!8999   !9!;!;<<<   !;!=!=>>>   !:!z&InstallCommand.run..bs:3A7KLLr7)r}verify build_optionsr`c*g|]}|j |jSr)r]r1)rrs r5rz&InstallCommand.run..rs1555!,5555r7zYCould not build wheels for {}, which is required to install pyproject.toml-based projectsz, i )roothomeprefixrPrC pycompile)userrrrisolatedr1)key-)resolver_variant zSuccessfully installed %s)exc_info)SrCr=rr check_install_build_globalrIrJcheck_dist_restrictionr_loggerverboser!decide_user_installrHrGrqrNospathabspathexistsisdirr$ enter_contextr`get_default_sessionr _build_package_finderr[r cache_dirr*rno_cleanget_requirementspermit_editable_wheels'reject_location_related_install_optionsmake_requirement_preparer make_resolverrMr]trace_basic_inforesolveget_requirement satisfied_byKeyErrorr"r9rTvaluesr(rformatjoinlegacy_install_reasonget_installation_orderignore_dependenciesrQ_determine_conflictsrPrrOget_lib_location_guessesrsortoperator attrgetterr1get_distributionversion Exceptionappend_warn_about_conflictsdetermine_resolver_variantr#OSError verbositycreate_os_error_messageerrorr_handle_target_dirr r)*rjrmrnrJr_target_temp_dirtarget_temp_dir_pathr`rtrur{r}rz directoryreqsr-r|resolverrequirement_setpip_reqr reqs_to_build_build_failurespep517_build_failure_namesr to_install conflictsshould_warn_about_conflictsrP installed lib_locationsenvitemsresultiteminstalled_distinstalled_descrshow_tracebackmessager6s* @r5runzInstallCommand.runs3   JW%7%CHII I-g666, ? 8&7 )'EEEE!17Rz?#4#4555 3  !+)'!/ ! ! ! 48.2   0'+G $!#1C!D!DG w122 GMM'"455  #S ,:::O#2#7    / / / /52**733*733 ++'#*#A ,   !!2G4JKK (()@)B)BCC !''!   [ ((wHHD  2 2-1** 3D':Q R R R55('%3 6H))!'%3!(!9'.'E ' 7!1"-*  H  ! !& ) ) )&..1C-C/O =)99%@@ !( 4 <  & & & %  & 5= Q Q Q Q#;F>M !&' ! !!! A~55 .555 &* '<L : : :LLLLLL    " " " "  # #"OW_    sjCUK;1 U; L U L  F%U0#SU S!U S!!A,U V&AV!V&!V&r=rrIc 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)Nr/)rc3BK|]}|VdSN) startswith)rsddirs r5 z4InstallCommand._handle_target_dir..s/II!1<<--IIIIIIr7zKTarget 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 rrpurelibplatlibdatarrrlistdirranyrwarningislinkrshutilrmtreeremovemove) rjr=rrI lib_dir_listscheme purelib_dir platlib_dirdata_dirlib_dirrtarget_item_dirrs @r5rz!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 Jr7rcx 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)rrr exception)rjrs r5rz#InstallCommand._determine_conflicts sW *:66 6      N   44  s $99conflict_detailsrc H|\}\}}|s|sdSg}|dkr|dn|dksJ|d|D]N}||d}||D]5} d||| d} || 6O|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.z 2020-resolverzpip'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.rz@{name} {version} requires {requirement}, which is not installed.r)r1r requirementzg{name} {version} requires {requirement}, but {you} have {dep_name} {dep_version} which is incompatible.youzyou'll)r1rrdep_name dep_versionr )rrrcriticalr)rjrr package_setmissing conflictingparts project_namer dependencyrrrr-s r5rz$InstallCommand._warn_about_conflictss/?+ +g{ {  F x ' ' LL@     $6666 LL@   $ & &L!,/2G%l3 & & .&%# *1  W%%%% &( & &L!,/2G.9,.G & &*+sF&%# #% +"2o"E"E8  W%%%% &  %(()))))r7)r+N)__name__ __module__ __qualname____doc__usagerlrrrstrintrr$r8rrrrrrrr7r5r;r;=s   0E]:]:]:]:~c6cccsccc\cJ4J4J0=4JHL4J 4J4J4J4Jl 12  / "    4* /4*CF4* 4*4*4*4*4*4*r7r;FrrrrrcHtd|||||}|j|jgS)Nr/)rrrrr)rrr)rrrrrrs r5rrOs;    F NFN ++r7c ltdtt||DS)Nc34K|]}t|VdSrr)rds r5rz)site_packages_writable..bs>  !r7rr)allsetrrs r5site_packages_writablerasF -4(KKKLL  r7rCrHr=rGrqc||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 disabledrz0Non-user install because site-packages writeablezMDefaulting to user installation because normal site-packages is not writeable) rdebugrr&rsiteENABLE_USER_SITErinfo)rCrHr=rGrqs r5rrhs<" !M! ;<<<u   3  ! ! #6   7888t  j JKKKu   KLLLu9}EEE GHHHu KK  4r7rTrmc 6dttdttfd}g}|D]^}|j}t |}|rD|d|||_|rTt |}|rC|d|||sdStdd |) zIf any location-changing --install-option arguments were passed for requirements or on the command-line, then show a deprecation warning. option_namesr+cd|DS)Nc`g|]+}d|dd,S)z--{}rr)rreplace)rr1s r5rzSreject_location_related_install_options..format_options..s2OOO$ dll34455OOOr7r)rs r5format_optionsz?reject_location_related_install_options..format_optionssOO,OOOOr7z {!r} from {}z{!r} from command lineNzLocation-changing options found in --install-option: {}. This is unsupported, use pip-level options like --user, --prefix, --root, and --target instead.z; ) rr rr_rrrkeysrr)rTrmr! offendersrr_location_optionss r5rrsMPXc]PtCyPPPPI# %5/@@     %%"N#3#8#8#:#:;;[    /88     (//?O?T?T?V?V0W0WXX      3396$))I:N:N3O3O  r7rrusing_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)rrr%ruser_option_partpermissions_parts r5rrs E LL?@@@  T SZZ     S "IIIIII {el""?2')) +/ + LL$$**,,     LL) * * * U   K5< ' ' N (   # % %  ?    775>>   ! !D ((r7)FNNFN)NNNF)Or(rrrroptparserrtypingrrrpip._vendor.packaging.utilsrpip._internal.cacher pip._internal.clir pip._internal.cli.cmdoptionsr pip._internal.cli.req_commandr r rpip._internal.cli.status_codesrrpip._internal.exceptionsrrpip._internal.locationsrpip._internal.metadatar#pip._internal.models.format_controlrpip._internal.operations.checkrrpip._internal.reqrpip._internal.req.req_installrpip._internal.req.req_trackerrpip._internal.utils.compatr"pip._internal.utils.distutils_argsrpip._internal.utils.filesystemrpip._internal.utils.loggingrpip._internal.utils.miscr r!r"r#pip._internal.utils.temp_dirr$pip._internal.utils.virtualenvr%r&pip._internal.wheel_builderr'r(r)rrr9r;r8r rrrrrrrr7r5rJs{  ********++++++++++999999******((((((;;;;;; :9999999DDDDDDDD......222222======SSSSSSSS000000<<<<<<AAAAAA......CCCCCC<<<<<<111111 766666 8   ] ?U    O*O*O*O*O*'O*O*O*f ,, , 3-, 3-, , SM ,  #Y ,,,,$#$4"& $# ::D>:#: :} :  :  ::::z$)*$5=d3i5H$ $$$$N6) 6)$(6);?6)6)6)6)6)6)6)r7