ó
Ð²Ebc           @@  sì   d  d l  m Z d  d l m Z d  d l m Z d  d l m Z d  d l m	 Z	 d  d l
 m Z d  d l m Z d  d l m Z m Z d  d	 l m Z d  d
 l m Z e rÏ d  d l m Z d  d l m Z n  d e e f d „  ƒ  YZ d S(   i    (   t   absolute_import(   t   canonicalize_name(   t   Command(   t   SessionCommandMixin(   t   SUCCESS(   t   InstallationError(   t   parse_requirements(   t   install_req_from_linet#   install_req_from_parsed_requirement(   t(   protect_pip_from_modification_on_windows(   t   MYPY_CHECK_RUNNING(   t   Values(   t   Listt   UninstallCommandc           B@  s&   e  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``.
    sU   
      %prog [options] <package> ...
      %prog [options] -r <requirements file> ...c         C@  sp   |  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   cmd_optst
   add_optiont   parsert   insert_option_group(   t   self(    (    s=   /tmp/pip-build-UPPWic/pip/pip/_internal/commands/uninstall.pyt   add_options%   s    				c   
      C@  sK  |  j  | ƒ } i  } xB | D]: } t | d | j ƒ} | j r | | t | j ƒ <q q Wxh | j D]] } xT t | d | d | ƒD]: } t | d | j ƒ} | j rƒ | | t | j ƒ <qƒ qƒ Wqd W| sæ t d j	 t
 ƒ    ƒ ‚ n  t d d | k ƒ xK | j ƒ  D]= } | j d | j d |  j d	 k ƒ }	 |	 r|	 j ƒ  qqWt S(
   Nt   isolatedt   optionst   sessionsR   You must give at least one requirement to {self.name} (see "pip help {self.name}")t   modifying_pipt   pipt   auto_confirmt   verbosei    (   t   get_default_sessionR   t   isolated_modet   nameR   R   R   R   R   t   formatt   localsR	   t   valuest	   uninstallR   t	   verbosityt   commitR   (
   R   R   t   argsR    t   reqs_to_uninstallR'   t   reqt   filenamet
   parsed_reqt   uninstall_pathset(    (    s=   /tmp/pip-build-UPPWic/pip/pip/_internal/commands/uninstall.pyt   run8   s:    			(   t   __name__t
   __module__t   __doc__t   usageR   R4   (    (    (    s=   /tmp/pip-build-UPPWic/pip/pip/_internal/commands/uninstall.pyR      s   		N(   t
   __future__R    t   pip._vendor.packaging.utilsR   t   pip._internal.cli.base_commandR   t   pip._internal.cli.req_commandR   t   pip._internal.cli.status_codesR   t   pip._internal.exceptionsR   t   pip._internal.reqR   t   pip._internal.req.constructorsR   R   t   pip._internal.utils.miscR	   t   pip._internal.utils.typingR
   t   optparseR   t   typingR   R   (    (    (    s=   /tmp/pip-build-UPPWic/pip/pip/_internal/commands/uninstall.pyt   <module>   s   