3 (\ @shddlmZddlmZddlmZddlmZddlm Z ddl m Z ddl m Z Gdd d eZd S) )absolute_import)canonicalize_name)Command)InstallationError)parse_requirements)install_req_from_line)(protect_pip_from_modification_on_windowscs4eZdZdZdZdZdZfddZddZZ S) 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``. uninstallzU %prog [options] ... %prog [options] -r ...zUninstall packages.c sVtt|j|||jjddddgddd|jjdd d d d d |jjd|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__cmd_opts add_optionparserinsert_option_group)selfargskw) __class__s/private/var/folders/pf/wv4htv3x0qs2c2mp0dnn0kchsvlck3/T/pip-build-k1a8l1r5/pip/pip/_internal/commands/uninstall.pyrszUninstallCommand.__init__c Cs|j|}i}x.|D]&}t||jd}|jr||t|j<qWx:|jD]0}x*t|||dD]}|jr\||t|j<q\WqHW|stdt|jdt d|kdx2|j D]&}|j |j |j dkd}|r|jqWWdQRXdS) N)isolated)optionssessionzLYou must give at least one requirement to %(name)s (see "pip help %(name)s"))namepip)Z modifying_pipr) auto_confirmverbose)_build_sessionr isolated_moder$rr rrdictrvaluesr r verbositycommit) rr"rr#Zreqs_to_uninstallr$reqfilenameZuninstall_pathsetrrr run/s2      zUninstallCommand.run) __name__ __module__ __qualname____doc__r$usagesummaryrr0 __classcell__rr)rr r s   r N) __future__rpip._vendor.packaging.utilsrZpip._internal.cli.base_commandrZpip._internal.exceptionsrZpip._internal.reqrZpip._internal.req.constructorsrZpip._internal.utils.miscrr rrrr s