ó
?…]c           @   s‚   d  d l  Z  d  d l Z d  d l m Z d  d l Z d d l m Z m Z d d „ Z d d „ Z	 e
 d k r~ e	 d d ƒ n  d S(	   iÿÿÿÿN(   t   pprinti   (   t   apit   __version__c      
   C   s  t  j ƒ  } | j d d d d d d d d t ƒ| j d d	 d
 d ƒ } | j d d d d d g ƒ} | j d d d ƒ| j d d d ƒ| j d d d ƒ| j d d d d d ƒ| j d d d d d g ƒ} | j d d d ƒ| j d d d ƒ| j d  d d! ƒ| j d" d d# ƒ| j d$ d d% d d& g ƒ} | j d' d d( ƒ| j d) d d* d+ t j ƒ  ƒ| j d, d- d d. d+ d/ ƒ| j d0 d d1 ƒ| j d2 d d3 d d4 g ƒ} | j d5 d d6 ƒ| j d7 d d8 ƒ| j d" d d# ƒ| j d0 d d1 ƒ| j |  ƒ S(9   Ns   -Vs	   --versiont   actiont   versiont   helps8   Show the conda-package-handling version number and exit.s   conda-package-handling %st   titlet   subcommandst   destt   subparser_namet   extracts   extract package contentst   aliasest   xt   archive_paths   path to archive to extracts   --destsÀ   destination folder to extract to.  If not set, defaults to package filename minus extension in the same folder as the input archive. May be relative path used in tandem with the --prefix flag.s   --prefixsÒ   base directory to extract to. Use this to set the base directory, while allowing the folder name to be automatically determined by the input filename. An abspath --prefix with an unset --dest will achieve this.s   --infosÝ   If the archive supports separate metadata, this flag extracts only the metadata in the info folder from the package.  If the archive does not support separate metadata, this flag has no effect and all files are extracted.t
   store_truet   creates   bundle files into a packaget   ct   prefixsÂ   folder of files to bundle.  Not strictly required to have conda package metadata, but if conda package metadata isn't present, you'll see a warning and your file will not work as a conda packaget   out_fnsF   Filename of archive to be created.  Extension determines package type.s   --file-lists‹   Path to file containing one relative path per line that should be included in the archive.  If not provided, lists all files in the prefix.s   --out-folders   Folder to dump final archive tot   verifys.   verify converted files against their referencet   vt   globs¸   filename glob pattern to match pairs and verify.  Usethe --reference-ext argument to change which extension is used as the ground truth, and which is considered corrupt in any mismatchs   --target-dirs4   folder for finding pairs of files.  Defaults to cwd.t   defaults   --reference-exts   -rsZ   file extension to consider as 'ground truth' in comparison.  Use this with the --all flag.s   .tar.bz2s   --processessH   Max number of processes to use.  If not set, defaults to your CPU count.t	   transmutes(   convert from one package type to anothert   tt   in_files7   existing file to convert from.  Glob patterns accepted.t   out_exts<   extension of file to convert to.  Examples: .tar.bz2, .conda(	   t   argparset   ArgumentParsert   add_argumentR   t   add_subparserst
   add_parsert   ost   getcwdt
   parse_args(   t
   parse_thist   parsert   spt   extract_parsert   create_parsert   verify_parsert   convert_parser(    (    s9   lib/python2.7/site-packages/conda_package_handling/cli.pyR"   	   sD    	c         C   sn  t  |  ƒ }  |  j d k rn |  j rL t j |  j |  j d d d |  j ƒqjt j |  j |  j d |  j ƒnü |  j d k r¢ t j |  j |  j	 |  j
 |  j ƒ nÈ |  j d k rý t j |  j |  j |  j |  j ƒ } | rjd
 GHt | ƒ t j d ƒ qjnm |  j d k rRt j |  j |  j |  j ƒ } | rjd
 GHt | ƒ t j d ƒ qjn t d j |  j ƒ ƒ ‚ d  S(   NR
   R   t
   componentst   infoR   R   R   R   R   s   failed files:i   R   R   s   Command {} is not implemented(   R
   R   (   R   R   (   R   R   (   R   R   (   R"   R	   R+   R   R
   R   R   R   R   t	   file_listR   t
   out_folderR   R   R   t	   processesR    t   syst   exitt   verify_conversionR   t
   target_dirt   reference_extt   NotImplementedErrort   format(   t   argst   failed_files(    (    s9   lib/python2.7/site-packages/conda_package_handling/cli.pyt   mainI   s(    	("%$

t   __main__R6   (   R   R    R    R/   t    R   R   t   NoneR"   R8   t   __name__(    (    (    s9   lib/python2.7/site-packages/conda_package_handling/cli.pyt   <module>   s   @