
    ch                     X    d Z ddlmZmZ ddlmc mc mZ ddlm	Z	 ddl
mZ d	dZd ZdS )
z\The ``prepare`` command configures a project to run, asking the user questions if necessary.    )absolute_importprint_functionN)$prepare_with_ui_mode_printing_errors)load_projectFc                    t          |           }|j        } t          j        |          rdS |r|j        }n||j                            |          i}d}|                                D ]\  }	}
t          ||	|||          sd}|S )zlConfigure the project to run.

    Returns:
        Prepare result (can be treated as True on success).
    FT)env_spec_nameui_modecommand_namerefresh)r   directory_pathconsole_utilsprint_project_problems	env_specsgetitemsr   )project_dirr	   conda_environmentr
   allr   projectspecsresultkvs              Elib/python3.11/site-packages/anaconda_project/internal/cli/prepare.pyprepare_commandr      s     ;''G(K+G44 u
 N!"G$5$9$9:K$L$LMF  13q'^eg g g 	FM    c                     t          | j        | j        | j        | j        | j        | j                  r t          d           t          d           dS dS )z6Start the prepare command and return exit status code.z%The project is ready to run commands.z=Use `anaconda-project list-commands` to see what's available.r      )r   	directorymodeenv_speccommandr   r   print)argss    r   mainr%   &   sR    t~ty$-txY]Yeff 5666MNNNqqr   )FF)__doc__
__future__r   r   +anaconda_project.internal.cli.console_utilsinternalclir   /anaconda_project.internal.cli.prepare_with_moder   *anaconda_project.internal.cli.project_loadr   r   r%    r   r   <module>r.      s    c b 6 6 6 6 6 6 6 6 C C C C C C C C C C C C ` ` ` ` ` ` C C C C C C   ,    r   