관리-도구
편집 파일: uninstall.cpython-34.pyc
� �Re� � @ sV d d l m Z m Z m Z d d l m Z d d l m Z Gd d � d e � Z d S)� )�InstallRequirement�RequirementSet�parse_requirements)�Command)�InstallationErrorc sF e Z d Z d Z d Z d Z d Z � f d d � Z d d � Z � 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] <package> ... %prog [options] -r <requirements file> ...zUninstall packages.c s� t t | � j | | � | j j d d d d d d d g d d d d �| j j d d d d d d d d �| j j d | j � d S)Nz-rz --requirement�dest�requirements�action�append�default�metavar�file�helpzjUninstall all the packages listed in the given requirements file. This option can be used multiple times.z-yz--yes�yes� store_truez2Don't ask for confirmation of uninstall deletions.r )�superr �__init__�cmd_opts� add_option�parser�insert_option_group)�self�args�kw)� __class__� �1/tmp/pip-ztkk0jow-build/pip/commands/uninstall.pyr s zUninstallCommand.__init__c C s� | j | � } t d d d d d d d | � } x$ | D] } | j t j | � � q7 WxA | j D]6 } x- t | d | d | �D] } | j | � q� Wqa W| j s� t d t d | j � � � n | j d | j � d S) N� build_dir�src_dir�download_dir�session�optionszLYou must give at least one requirement to %(name)s (see "pip help %(name)s")�name�auto_confirm) �_build_sessionr �add_requirementr � from_liner r �has_requirementsr �dictr$ r r )r r# r r"