3 ]D @s`ddlmZddlZddlmZddlmZmZmZddl m Z ddl m Z Gddde Z dS) )absolute_importN) WheelCache)InstallRequirementRequirementSetparse_requirements)Command)InstallationErrorcs4eZdZdZdZdZdZfddZddZZ 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__5/tmp/pip-build-8jg9gmni/pip/pip/commands/uninstall.pyrszUninstallCommand.__init__c Cs|j|}tjjtt}t|j|}tddd|j||d}x$|D]}|j t j ||j|dqFWx2|j D](}x"t ||||dD]} |j | qWqnW|jstdt|jd|j|jdWdQRXdS)N) build_dirsrc_dir download_dirisolatedsession wheel_cache)r$r&)optionsr%r&zLYou must give at least one requirement to %(name)s (see "pip help %(name)s"))name) auto_confirm)_build_sessionpipindex FormatControlsetr cache_dirr isolated_modeadd_requirementr from_liner rhas_requirementsrdictr(r r) rr'rr%format_controlr&requirement_setr(filenamereqrrr run-s6     zUninstallCommand.run) __name__ __module__ __qualname____doc__r(usagesummaryrr9 __classcell__rr)rr r s   r ) __future__rr+ pip.wheelrpip.reqrrrpip.basecommandrpip.exceptionsrr rrrr s