YD @sddlmZddlZddlmZddlmZmZmZddl m Z ddl m Z Gddde Z dS) )absolute_importN) WheelCache)InstallRequirementRequirementSetparse_requirements)Command)InstallationErrorcsFeZdZdZdZdZdZfddZddZS) 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 stt|j|||jjdddddddgdd d d |jjd d ddddd d|jjd|jdS)Nz-rz --requirementdest requirementsactionappenddefaultmetavarfilehelpzjUninstall all the packages listed in the given requirements file. This option can be used multiple times.z-yz--yesyes store_truez2Don't ask for confirmation of uninstall deletions.r)superr __init__cmd_opts add_optionparserinsert_option_group)selfargskw) __class__5/tmp/pip-build-3puug3g5/pip/pip/commands/uninstall.pyrs    zUninstallCommand.__init__c Cs2|j|}tjjtt}t|j|}tddddddd|jd|d|}x3|D]+}|j t j |d|jd|qvWxG|j D]<}x3t |d|d|d|D]} |j | qWqW|jstdtd |j|jd |jWdQRXdS) N build_dirsrc_dir download_dirisolatedsession wheel_cacheoptionszLYou 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(usagesummaryrr9rr)rr r s r ) __future__rr+ pip.wheelrpip.reqrrrpip.basecommandrpip.exceptionsrr rrrr s