
    %d
                     b    d dl mZ d dlmZmZmZ d dlmZmZ d dl	m
Z
 ddlmZ dZdZd	 Zd
 ZdS )    )RawDescriptionHelpFormatter)contextdetermine_target_prefixenv_name)add_parser_jsonadd_parser_prefix)stdout_json   )from_environmentz
Export a given environment
zF
examples:
    conda env export
    conda env export --file SOME_FILE
c                    |                      dt          t          t          t                    }|                    dddd           |                    dd	d
           t          |           |                    ddd dd           |                    ddd	dd           |                    ddd	dd           t          |           |                    ddd	dd           |                    d           d S )Nexport)formatter_classdescriptionhelpepilogz-cz	--channelappendz+Additional channel to include in the export)actionr   z--override-channels
store_truez Do not include .condarc channelsz-fz--fileFzFile name or path for the exported environment. Note: This will silently overwrite any existing file of the same name in the current directory.)defaultrequiredr   z--no-buildsz,Remove build specification from dependencies)r   r   r   r   z--ignore-channelsz0Do not include channel names with package names.z--from-historyz5Build environment spec from explicit specs in historyz.main_export.execute)func)
add_parserr   r   exampleadd_argumentr   r   set_defaults)sub_parsersps     9lib/python3.11/site-packages/conda_env/cli/main_export.pyconfigure_parserr      sf   3 	 	 	A NNk:     NN/    
 aNNh9  	 	 	 NN;     NN?  A A A ANND     NN.N/////    c                 l   t          t          |           }t          t          |          || j        | j        | j                  }| j        r|                                 | j	        |
                    | j	                   | j        O| j        r#t          |                                           d S t          |                                d           d S t#          | j        d          }| j        r|                    |          n|                    |           |                                 d S )N)	no_buildsignore_channelsfrom_history )endwb)stream)r   r   r   r   r"   r#   r$   override_channelsremove_channelschanneladd_channelsfilejsonr	   to_dictprintto_yamlopenclose)argsparserprefixenvfps        r   executer9   S   s   $Wd33F
.,&  C  | '&&&y &*iQCKKMM"""""U3;;==b5Q5Q5Q5Q5Q5Q$)T"""&)G2B1G1G





r    N)argparser   conda.base.contextr   r   r   conda.cli.conda_argparser   r   conda.cli.commonr	   r7   r   r   r   r   r9    r    r   <module>r?      s    1 0 0 0 0 0 I I I I I I I I I I G G G G G G G G ( ( ( ( ( ( " " " " " "80 80 80x    r    