ó
^ęWc           @@  s   d  d l  m Z d  d l Z d  d l m Z d  d l m Z m Z m Z d  d l	 m
 Z
 d  d l m Z d e
 f d     YZ d S(	   i    (   t   absolute_importN(   t
   WheelCache(   t   InstallRequirementt   RequirementSett   parse_requirements(   t   Command(   t   InstallationErrort   UninstallCommandc           B@  s2   e  Z d  Z d Z d Z d Z d   Z d   Z RS(   sB  
    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``.
    t	   uninstallsU   
      %prog [options] <package> ...
      %prog [options] -r <requirements file> ...s   Uninstall packages.c         O@  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(   Ns   -rs   --requirementt   destt   requirementst   actiont   appendt   defaultt   metavart   filet   helpsj   Uninstall all the packages listed in the given requirements file.  This option can be used multiple times.s   -ys   --yest   yest
   store_trues2   Don't ask for confirmation of uninstall deletions.i    (   t   superR   t   __init__t   cmd_optst
   add_optiont   parsert   insert_option_group(   t   selft   argst   kw(    (    sg   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/commands/uninstall.pyR      s    				c   
      C@  s4  |  j  |  } t j j t   t    } t | j |  } t d d  d d  d d  d | j	 d | d |  } x3 | D]+ } | j
 t j | d | j	 d |  qv WxG | j D]< } x3 t | d | d | d | D] }	 | j
 |	  qÔ WqŻ W| j st d t d	 |  j    n  | j d
 | j  Wd  QXd  S(   Nt	   build_dirt   src_dirt   download_dirt   isolatedt   sessiont   wheel_cachet   optionssL   You must give at least one requirement to %(name)s (see "pip help %(name)s")t   namet   auto_confirm(   t   _build_sessiont   pipt   indext   FormatControlt   setR   t	   cache_dirR   t   Nonet   isolated_modet   add_requirementR   t	   from_lineR
   R   t   has_requirementsR   t   dictR#   R   R   (
   R   R"   R   R    t   format_controlR!   t   requirement_setR#   t   filenamet   req(    (    sg   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/commands/uninstall.pyt   run-   s6    			(   t   __name__t
   __module__t   __doc__R#   t   usaget   summaryR   R5   (    (    (    sg   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/commands/uninstall.pyR   
   s   		(   t
   __future__R    R&   t	   pip.wheelR   t   pip.reqR   R   R   t   pip.basecommandR   t   pip.exceptionsR   R   (    (    (    sg   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/commands/uninstall.pyt   <module>   s   