ó
žS]c           @@ sg   d  Z  d d l m Z m Z d d l j j j Z d d l m	 Z	 d d l
 m Z d   Z d   Z d S(   s\   The ``prepare`` command configures a project to run, asking the user questions if necessary.i    (   t   absolute_importt   print_functionN(   t$   prepare_with_ui_mode_printing_errors(   t   load_projectc         C@ sA   t  |   } t j |  r t St | d | d | d | } | S(   sl   Configure the project to run.

    Returns:
        Prepare result (can be treated as True on success).
    t   env_spec_namet   ui_modet   command_name(   R   t   console_utilst   print_project_problemst   FalseR   (   t   project_dirR   t   conda_environmentR   t   projectt   result(    (    sD   lib/python2.7/site-packages/anaconda_project/internal/cli/prepare.pyt   prepare_command   s    c         C@ sA   t  |  j |  j |  j |  j  r9 t d  t d  d Sd Sd S(   s6   Start the prepare command and return exit status code.s%   The project is ready to run commands.s=   Use `anaconda-project list-commands` to see what's available.i    i   N(   R   t	   directoryt   modet   env_spect   commandt   print(   t   args(    (    sD   lib/python2.7/site-packages/anaconda_project/internal/cli/prepare.pyt   main   s
    !

(   t   __doc__t
   __future__R    R   t+   anaconda_project.internal.cli.console_utilst   internalt   cliR   t/   anaconda_project.internal.cli.prepare_with_modeR   t*   anaconda_project.internal.cli.project_loadR   R   R   (    (    (    sD   lib/python2.7/site-packages/anaconda_project/internal/cli/prepare.pyt   <module>   s   	