
    u*e                     ^   d Z ddlZddlZddlZddlmZmZmZ ddl	m
Z
  ej        dddgi	           ej        d
           ej        dd           ej        dddd           ej        ddd           ej        ddd           ej        dddd           ej        dddd           ej        dddd           ej        d d!dd           ej        d"d#dd           ej        d$d%dd           ej        d&d'd(           ej        d)ed*           ej        d+d,dd-          	 	 	 	 	 	 	 	 	 	 	 	 	 d/d.                                                                                                                                                                                    ZdS )0z1
Updated command line interface for conda-index.
    N)MAX_THREADS_DEFAULTChannelIndexlogutil   )yamlhelp_option_namesz-hz--help)context_settingsdirz--outputz#Output repodata to given directory.)helpz--subdirTz"Subdir to index. Accepts multiple.)multipledefaultr   z-nz--channel-namez?Customize the channel name listed in each channel's index.html.z--patch-generatorFzPath to Python file that outputs metadata patch instructions from its _patch_repodata function or a .tar.bz2/.conda file which contains a patch_instructions.json file for each subdir)requiredr   z--channeldata/--no-channeldatazGenerate channeldata.json.)r   r   show_defaultz--rss/--no-rssz1Write rss.xml (Only if --channeldata is enabled).z--bz2/--no-bz2zWrite repodata.json.bz2.z--zst/--no-zstzWrite repodata.json.zst.z--run-exports/--no-run-exportszWrite run_exports.json.z--compact/--no-compactz+Output JSON as one line, or pretty-printed.z--current-index-versions-filez-mah  
        YAML file containing name of package as key, and list of versions as values.  The current_index.json
        will contain the newest from this series of versions.  For example:

        python:
          - 3.8
          - 3.9

        will keep python 3.8.X and 3.9.Y in the current_index.json, instead of only the very latest python version.
        z	--threads)r   r   z	--verbosez'
        Enable debug logging.
        )r   r   is_flagc                     t          j                     |r1t          j        d                              t          j                   |rt          j                            |          }t          t          j                            |           ||||	|
|||	  	        }d }|r;t          |          5 }t          j        |          }d d d            n# 1 swxY w Y   |                    ||d           |r|                    |           d S d S )Nzconda_index.index)channel_nameoutput_rootsubdirs	write_bz2	write_zstthreadswrite_run_exportscompact_jsonF)patch_generatorcurrent_index_versionsprogress)rss)r   	configurelogging	getLoggersetLevelDEBUGospath
expanduserr   openr   	safe_loadindexupdate_channeldata)r
   r   subdiroutputchanneldataverboser   current_index_versions_filer   bz2zstr   run_exportscompactchannel_indexr   fs                    8lib/python3.11/site-packages/conda_index/cli/__init__.pyclir6      su   @  G-..77FFF ,##F++ 
3!%
 
 
M "" 7-.. 	7!%)^A%6%6"	7 	7 	7 	7 	7 	7 	7 	7 	7 	7 	7 	7 	7 	7 	7 '5      2((S(111112 2s   0CCC)NNNFFNNNFFFFT)__doc__r   os.pathr#   clickconda_index.indexr   r   r    r   commandargumentoptionr6        r5   <module>rA      s       H H H H H H H H H H       !4tX6F GHHHjDEEE	-	   	J  
 
3   $	%	   	<	   	#	   	#	   $	"	   	6	   #	
   k#6TJJJ
     $/2 /2 /2  KJ           FE  IH`/2 /2 /2r@   