ó
Ý²k^c           @` s²   d  Z  d d l m Z m Z m Z m Z d d l Z d a d „  Z	 d d „ Z
 d „  Z e j d k r† e j d d k r† d	 „  Z n  d
 „  Z e d k r® e j e ƒ  ƒ n  d S(   up  conda is a tool for managing environments and packages.

conda provides the following commands:

    Information
    ===========

    info       : display information about the current install
    list       : list packages linked into a specified environment
    search     : print information about a specified package
    help       : display a list of available conda commands and their help
                 strings

    Package Management
    ==================

    create     : create a new conda environment from a list of specified
                 packages
    install    : install new packages into an existing conda environment
    update     : update packages in a specified conda environment


    Packaging
    =========

    package    : create a conda package in an environment

Additional help for each command can be accessed by using:

    conda <command> -h
i    (   t   absolute_importt   divisiont   print_functiont   unicode_literalsNc          C` s-   t  d  k	 r t  Sd d l m }  |  ƒ  a  t  S(   Ni   (   t   generate_parser(   t   PARSERt   Nonet   conda_argparseR   (   R   (    (    s-   lib/python2.7/site-packages/conda/cli/main.pyR   *   s
    	c         C` s   d d l  m } m } d d l m } m } | ƒ  |  rm |  j rm x( d	 D] } | | ƒ j | d ƒ qI Wn  |  rŒ |  j rŒ | |  j ƒ n  d  S(
   Ni    (   t   CRITICALt	   getLoggeri   (   t   initialize_loggingt   set_verbosityu   conda.stdout.verboseu   conda.stdoutlogu   conda.stderrlogi   (   u   conda.stdout.verboseu   conda.stdoutlogu   conda.stderrlog(	   t   loggingR   R	   t   gateways.loggingR
   R   t   jsont   setLevelt	   verbosity(   t   contextR   R	   R
   R   t   logger(    (    s-   lib/python2.7/site-packages/conda/cli/main.pyt   init_loggers6   s    c          O` sÃ   t  |  ƒ d k r |  d }  n  t ƒ  } | j |  d ƒ }  d d l m } | j d |  ƒ t | ƒ | j d d  ƒ } | r | |  | ƒ n  d d l	 m
 } | |  | ƒ } t | t ƒ r¿ | Sd  S(	   Ni   u   -hi   (   R   t   argparse_argsu   post_parse_hook(   t   do_call(   u   -h(   t   lenR   t
   parse_argst   base.contextR   t   __init__R   t   popR   R   R   t
   isinstancet   int(   t   argst   kwargst   pR   t   post_parse_hookR   t	   exit_code(    (    s-   lib/python2.7/site-packages/conda/cli/main.pyt   _mainC   s    	
u   win32i   c          C` s  d d l  m }  m } m } m } m } d d l m } m } | j	 j
 } g  | _ | | _ | j j } | |  | ƒ g | _ |  | ƒ | _ | ƒ  }	 | d ƒ }
 | |	 | |
 ƒ ƒ } |
 j d k r|
 j t t j ƒ } g  t | |
 j ƒ D] } | | ^ qî Sd S(   u  Uses shell32.GetCommandLineArgvW to get sys.argv as a list of Unicode
        strings.

        Versions 2.x of Python don't support Unicode in sys.argv on
        Windows, with the underlying Windows API instead replacing multi-byte
        characters with '?'.
        i    (   t   POINTERt   byreft   cdllt   c_intt   windll(   t   LPCWSTRt   LPWSTRN(   t   ctypesR#   R$   R%   R&   R'   t   ctypes.wintypesR(   R)   t   kernel32t   GetCommandLineWt   argtypest   restypet   shell32t   CommandLineToArgvWt   valueR   t   syst   argvt   range(   R#   R$   R%   R&   R'   R(   R)   R-   R1   t   cmdt   argcR4   t   startt   i(    (    s-   lib/python2.7/site-packages/conda/cli/main.pyt   win32_unicode_argvZ   s    	(			c          ` sn  d d l  m ‰  m } | ƒ  |  sd t j d k rX t j d d k rX t ƒ  }  t _ qd t j }  n  t ‡  f d †  |  Dƒ ƒ }  t	 |  ƒ d k rNyi |  d j
 ƒ  } | j d ƒ rË d d l m } | ƒ  S| j d	 ƒ rú d d  l j j } | j ƒ  d  SWqNt k
 rJt j ƒ  \ } } } t ƒ  d d
 l m }	 |	 ƒ  j | | ƒ SXn  d d l m }
 |
 t |  | Ž S(   Ni   (   t   ensure_text_typet   init_std_stream_encodingu   win32i    c         3` s   |  ] } ˆ  | ƒ Vq d  S(   N(    (   t   .0t   s(   R;   (    s-   lib/python2.7/site-packages/conda/cli/main.pys	   <genexpr>ƒ   s    i   u   shell.(   t   mainu   ..(   t   ExceptionHandler(   t   conda_exception_handler(   t   common.compatR;   R<   R3   t   platformt   version_infoR:   R4   t   tupleR   t   stript
   startswitht   activateR?   t   conda.cli.activatet   clit	   Exceptiont   exc_infoR   t
   exceptionsR@   t   handle_exceptionRA   R"   (   R   R   R<   t   argv1t   activator_mainRH   t   _t   exc_valt   exc_tbR@   RA   (    (   R;   s-   lib/python2.7/site-packages/conda/cli/main.pyR?   w   s0    "
u   __main__(   t   __doc__t
   __future__R    R   R   R   R3   R   R   R   R   R"   RC   RD   R:   R?   t   __name__t   exit(    (    (    s-   lib/python2.7/site-packages/conda/cli/main.pyt   <module>"   s   "		"	"