î
É X›  ã               @   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> ...zUninstall 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__© úA/home/ubuntu/projects/ifolica/build/pip/pip/commands/uninstall.pyr      s    				zUninstallCommand.__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"   Úrequirement_setr$   ÚfilenameÚreqr   r   r   Úrun(   s"    		zUninstallCommand.run)	Ú__name__Ú
__module__Ú__qualname__Ú__doc__r$   ÚusageÚsummaryr   r.   r   r   )r   r   r      s   	r   N)	Úpip.reqr   r   r   Úpip.basecommandr   Úpip.exceptionsr   r   r   r   r   r   Ú<module>   s   