U
    b
                  
   @   s<  d dl mZmZmZ d dlZd dlZd dlZd dlm	Z	 d dl
mZ d dlmZ d dlmZ zd dlmZ W nL ek
r Z z.dejkrejd	  ed
 neW 5 dZ[X Y nX 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 Z dd Z!dd Z"dd Z#e$dkr8ee#  dS )    )absolute_importdivisionprint_functionN)context)ArgumentParser)init_loggers)initialize_logging)conda_exception_handlerZCONDA_DEFAULT_ENVa  
There was an error importing conda.

It appears this was caused by installing conda-env into a conda
environment.  Like conda, conda-env needs to be installed into your
base conda/Anaconda environment.

Please deactivate your current environment, then re-install conda-env
using this command:

    conda install -c conda conda-env

If you are seeing this error and have not installed conda-env into an
environment, please open a bug report at:
    https://github.com/conda/conda-env

   )main_create)main_export)	main_list)main_remove)main_update)main_configc                   C   s   t tjdkrtjd d S )Nr   z--help)lensysargvappend r   r   1lib/python3.8/site-packages/conda_env/cli/main.pyshow_help_on_empty_command7   s    r   c                  C   sT   t  } |  }t| t| t| t| t| t| t	  | S )N)
r   Zadd_subparsersr   Zconfigure_parserr   r   r   r   r   r   )pZsub_parsersr   r   r   create_parser<   s    





r   c                 C   sH   | j dd\}}ddlm} ||tddd }t||| |}|S )N.r   r   )import_module)funcrsplit	importlibr   __name__getattr)argsparserZrelative_modZ	func_namer   moduleZ	exit_coder   r   r   do_callK   s
    r%   c                  C   s>   t   t } |  }dtjd< tj|d tt tt	|| S )NZfalseZCONDA_AUTO_UPDATE_CONDA)Zargparse_args)
r   r   
parse_argsosenvironr   __init__r   r	   r%   )r#   r"   r   r   r   mainT   s    
r*   __main__)%Z
__future__r   r   r   r'   r   Zconda.exportsZcondaZconda.base.contextr   Zconda.cli.conda_argparser   Zconda.cli.mainr   Zconda.gateways.loggingr   Zconda.exceptionsr	   ImportErrorer(   stderrwritelstripexit r   r   r   r   r   r   r   r   r%   r*   r    r   r   r   r   <module>   s4   
	

