
    =e
                     j    d Z ddlZddlmZ ddlmZ ddlmZmZm	Z	  ej
        d          Zd Zd ZdS )	zn
Remove an object from your Anaconda repository.

example::

    anaconda remove sean/meta/1.2.0/meta.tar.gz

    N)RawTextHelpFormatter)errors)get_server_apiparse_specs
bool_inputzbinstar.removec                 h   t          | j        | j                  }| j        D ]}	 |j        rfd|d}| j        st          |d          r-|                    |j        |j	        |j
        |j                   nt                              d|           n|j        r`d|d}| j        st          |d          r'|                    |j        |j	        |j
                   nt                              d|           n||j        rZd|d	}| j        st          |d          r!|                    |j        |j	                   n7t                              d|           nt                              d
|           V# t&          j        $ r( | j        rt                              dd           Y  w xY wd S )Nz%Are you sure you want to remove file z ?FzNot removing file %sz4Are you sure you want to remove the package release z ? (and all files under it?)zNot removing release %sz,Are you sure you want to remove the package z ? (and all data with it?)z!Invalid package specification: %s T)exc_info)r   tokensitespecs	_basenameforcer   remove_distuserpackageversionbasenameloggerwarning_versionremove_release_packageremove_packageerrorr   NotFound)argsaserver_apispecmsgs       >lib/python3.11/site-packages/binstar_client/commands/remove.pymainr"      s    TY77K
  	~ H HEITTK: AC!7!7 A++DIt|T\SWS`aaaaNN#94@@@@ H Hnrnrnrt: DC!7!7 D..ty$,UUUUNN#<dCCCC H Hdhdhdhj: DC!7!7 D..ty$,GGGGNN#<dCCCC@$GGG 	 	 	z rD111		/ s   EE882F/-F/c                     |                      ddt          t                    }|                    ddt          d           |                    dd	d
d           |                    t                     d S )NremovezRemove an object from your Anaconda repository. Must refer to the formal package name as it appears in the URL of the package. Also use anaconda show <USERNAME> to see list of package names. Example: anaconda remove continuumio/empty-example-notebook)helpdescriptionformatter_classr   z>Package written as <user>[/<package>[/<version>[/<filename>]]]+)r%   typenargsz-fz--forcezDo not prompt removal
store_true)r%   action)r"   )
add_parser__doc__r   add_argumentr   set_defaultsr"   )
subparsersparsers     r!   r-   r-   8   s    ""J
 , # 
 
F M	     i$     T"""""    )r.   loggingargparser   binstar_clientr   binstar_client.utilsr   r   r   	getLoggerr   r"   r-    r3   r!   <module>r:      s      ) ) ) ) ) ) ! ! ! ! ! !          
	+	,	,  D# # # # #r3   