U ÀÒ.e§ ã@svddlmZddlmZddlmZddlmZddlm Z ddl m Z ddl m Z ddlmZGd d „d eeƒZd S) é)Úabsolute_import)Úcanonicalize_name)ÚCommand)ÚSessionCommandMixin)ÚInstallationError)Úparse_requirements)Úinstall_req_from_line)Ú(protect_pip_from_modification_on_windowscs,eZdZdZdZ‡fdd„Zdd„Z‡ZS)Ú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 �|j d|j¡dS)Nz-rz --requirementÚ requirementsÚappendÚfilezjUninstall all the packages listed in the given requirements file. This option can be used multiple times.)ÚdestÚactionÚdefaultÚmetavarÚhelpz-yz--yesÚyesÚ store_truez2Don't ask for confirmation of uninstall deletions.)rrrr)Úsuperr Ú__init__Zcmd_optsZ add_optionÚparserZinsert_option_group)ÚselfÚargsÚkw©Ú __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|||d�D]}|jrR||t|jƒ<qRq@|s†tdt|jd�ƒ‚t d|kd�|  ¡D]&}|j |j |j dkd�}|rœ| ¡qœdS) N)Úisolated)ÚoptionsÚsessionzLYou must give at least one requirement to %(name)s (see "pip help %(name)s"))ÚnameZpip)Z modifying_pipr)Z auto_confirmÚverbose)Zget_default_sessionrZ isolated_moder"rr rrÚdictr ÚvaluesZ uninstallrÚ verbosityZcommit) rr rr!Zreqs_to_uninstallr"ZreqÚfilenameZuninstall_pathsetrrrÚrun2sB ÿ ý  ÿÿÿ ÿ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 rrrrÚs