U .e @svddlmZddlmZddlmZddlmZddlm Z ddl m Z ddl m Z ddlmZGd d d eeZd S) )absolute_import)canonicalize_name)Command)SessionCommandMixin)InstallationError)parse_requirements)install_req_from_line)(protect_pip_from_modification_on_windowscs,eZdZdZdZfddZddZZS)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 ...c sVtt|j|||jjddddgddd|jjdd d d d d |jd|jdS)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)superr __init__Zcmd_optsZ add_optionparserZinsert_option_group)selfargskw __class__D/usr/lib/python3.8/site-packages/pip/_internal/commands/uninstall.pyrs$ zUninstallCommand.__init__c Cs||}i}|D]&}t||jd}|jr||t|j<q|jD],}t|||dD]}|jrR||t|j<qRq@|stdt|jdt d|kd| D]&}|j |j |j dkd}|r|qdS) N)isolated)optionssessionzLYou must give at least one requirement to %(name)s (see "pip help %(name)s"))nameZpip)Z modifying_pipr)Z auto_confirmverbose)Zget_default_sessionrZ isolated_moder"rr rrdictr valuesZ uninstallr verbosityZcommit) rr rr!Zreqs_to_uninstallr"ZreqfilenameZuninstall_pathsetrrrrun2sB     zUninstallCommand.run)__name__ __module__ __qualname____doc__Zusagerr( __classcell__rrrrr s  r N)Z __future__rZpip._vendor.packaging.utilsrZpip._internal.cli.base_commandrZpip._internal.cli.req_commandrZpip._internal.exceptionsrZpip._internal.reqrZpip._internal.req.constructorsrZpip._internal.utils.miscr r rrrrs