7i.ddlZddlmZddlmZddlmZddlmZddl m Z ddl m Z m Z ddlmZdd lmZdd lmZdd lmZmZdd lmZmZej4eZGd de e Zy)N)Values)List)canonicalize_name) cmdoptions)Command)SessionCommandMixinwarn_if_run_as_root)SUCCESS)InstallationError)parse_requirements)install_req_from_line#install_req_from_parsed_requirement)check_externally_managed(protect_pip_from_modification_on_windowsc6eZdZdZdZd dZdedeede fdZ y) UninstallCommandaB Uninstall packages. pip is able to uninstall most installed packages. Known exceptions are: - Pure distutils packages installed with ``python setup.py install``, which leave behind no metadata to determine what files were installed. - Script wrappers installed by ``python setup.py develop``. zU %prog [options] ... %prog [options] -r ...returnNc |jjddddgdd|jjdd d d d |jjtj|jjtj|j j d|jy)Nz-rz --requirement requirementsappendfilezjUninstall all the packages listed in the given requirements file. This option can be used multiple times.)destactiondefaultmetavarhelpz-yz--yesyes store_truez2Don't ask for confirmation of uninstall deletions.)rrrr)cmd_opts add_optionrroot_user_actionoverride_externally_managedparserinsert_option_group)selfs i/mnt/ssd/data/python-lab/ChefSystem/venv/lib/python3.12/site-packages/pip/_internal/commands/uninstall.py add_optionszUninstallCommand.add_options(s    A !     E !    !?   !G!G!IJ ''4==9optionsargsc|j|}i}|D]T}t||j}|jr||t |j<?t j d|V|jD]Q}t|||D]>}t||j}|js'||t |j<@S|s&td|jd|jd|js ttd|v|jD]?}|j|j |j"d kD } | s0| j%A|j&d k(r t)t*S) N)isolatedzSInvalid requirement: %r ignored - the uninstall command expects named requirements.)r)sessionz*You must give at least one requirement to z (see "pip help z")pip) modifying_pipr) auto_confirmverbosewarn)get_default_sessionr isolated_modenamerloggerwarningrr rr r"rrvalues uninstallr verbositycommitr!r r ) r%r)r*r-reqs_to_uninstallr5reqfilename parsed_requninstall_pathsets r&runzUninstallCommand.run@s**73 D' ..CxxAD!"3CHH"=>%   ,, IH0'7 I :)>)>88EH%&7&AB I I!#rWsR9(2R260   8 $Xw 3Xr(