
    d                     x    d dl Z d dlZd dlZd dlmZ ddlmZmZ d
dZd Zd
dZ	e
dk    r e	d	           dS dS )    N)pprint   )__version__apic                 H    t                      }|                    |           S N)build_parser
parse_args)
parse_thisparsers     :lib/python3.11/site-packages/conda_package_handling/cli.pyr
   r
   	   s    ^^FZ(((    c            	      2   t          j                    } |                     dddddt                      |                     ddd	
          }|                    dddg          }|                    dd           |                    dd           |                    dd           |                    ddd           |                    dddg          }|                    dd           |                    dd            |                    d!d"           |                    d#d$           |                    d%d&d'g          }|                    d(d)           |                    d*d+           |                    d#d$           |                    d,dd-.           |                    d/t          d01           |                    d2d3t          t          d4d5          d67           |                    d8d9t          d4:           | S );Nz-Vz	--versionversionz8Show the conda-package-handling version number and exit.zconda-package-handling )actionhelpr   subcommands
subcommandT)titledestrequiredextractzextract package contentsx)r   aliasesarchive_pathzpath to archive to extract)r   z--destzdestination 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.z--prefixzbase 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.z--infozIf 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.
store_true)r   r   createzbundle files into a packagecprefixzfolder 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 packageout_fnzFFilename of archive to be created.  Extension determines package type.z--file-listzPath to file containing one relative path per line that should be included in the archive.  If not provided, lists all files in the prefix.z--out-folderzFolder to dump final archive to	transmutez(convert from one package type to anothertin_filez7existing file to convert from.  Glob patterns accepted.out_extz<extension of file to convert to.  Examples: .tar.bz2, .condaz--forcez Force overwrite existing package)r   r   z--processesz;Max number of processes to use.  If not set, defaults to 1.)typer   z--zstd-compression-levelzdWhen building v2 packages, set the compression level used by conda-package-handling. Defaults to 19.r         )r   r%   choicesdefaultz--zstd-compression-threadszsWhen building v2 packages, set the compression threads used by conda-package-handling. Defaults to 1. -1=automatic.)r   r%   r)   )argparseArgumentParseradd_argumentr   add_subparsers
add_parserintrange)r   spextract_parsercreate_parserconvert_parsers        r   r	   r	      s   $&&F
G7+77     
		]PT		U	UB]]93MX[W\]]]N5QRRRG            :       MM(1NY\X]M^^M     U     )     ~4UVVV]]Dse #  N Q      K      5VWWW,-O      J     
 "6 a   	 	 	 $C       Mr   c           	      b   t          |           } t          | d          rw| j        rpt          j                            t          j                            t          j                            | j                                      t          j        z   | _        | j	        dv rX| j
        r)t          j        | j        | j        d| j                   d S t          j        | j        | j        | j                   d S | j	        dv r-t          j        | j        | j        | j        | j                   d S | j	        dv rvt          j        | j        | j        | j        | j        pd| j        | j        | j        	          }|r6t5          d
           t7          |           t9          j        d           d S d S d S )N
out_folder)r   r   info)
componentsr   )r   )r   r   )r!   r"   r   )forcezstd_compress_levelzstd_compress_threadszfailed files:)r
   hasattrr6   ospathabspathnormpath
expandusersepr   r7   r   r   r   r   r   r   	file_listr    r!   r#   r$   	processesr9   zstd_compression_levelzstd_compression_threadsprintr   sysexit)argsfailed_filess     r   mainrL   o   s   dDt\"" 
t 
GOOBG,,RW-?-?-P-PQQRRUWU[[ 	 ***9 	JK)49PTP[\\\\\\K)49T[IIIIII	O	+	+
4;T_MMMMM	.	.	.}LLONa* $ ;"&"?
 
 
  	/"""<   HQKKKKK 
/	.	 	r   __main__)rJ   r   )r*   r=   rH   r    r   r   r
   r	   rL   __name__ r   r   <module>rQ      s     				 



              ) ) ) )
^ ^ ^B   : zDdOOOOOO r   