
    si6                     n    S r SSKrSSKJrJrJr  SSKJr  SSKJr  S\S\4S	 jr	\S
\S\S\
4S j5       rg)zhCLI implementation for `conda-env update`.

Updates the conda environments with the specified packages.
    N)ArgumentParser	Namespace_SubParsersAction   )
CondaError)noticessub_parsersreturnc                 ,   SSK Jn  SSKJnJnJnJnJn  SnUn	U" S5      n
U R                  "  SUU	U
S.UD6nU" U5        U" U5        U" U5        UR                  SS	S
SSS9  UR                  SSSSS9  U" U5        U" U5        UR                  SS9  U$ )Nr   dals   ) add_parser_environment_specifieradd_parser_frozen_envadd_parser_jsonadd_parser_prefixadd_parser_solverz9Update the current environment based on environment file.a  
        Examples::

            conda env update
            conda env update -n=foo
            conda env update -f=/path/to/environment.yml
            conda env update --name=foo --file=environment.yml
            conda env update vader/deathstar

        )helpdescriptionepilogz-fz--filestorez1environment definition (default: environment.yml)zenvironment.yml)actionr   defaultz--prune
store_trueFz8remove installed packages not defined in environment.yml)r   r   r   z!conda.cli.main_env_update.execute)func)update)
auxlib.ishr   helpersr   r   r   r   r   
add_parseradd_argumentset_defaults)r	   kwargsr   r   r   r   r   r   summaryr   r   ps               9lib/python3.13/site-packages/conda/cli/main_env_update.pyconfigure_parserr&      s    !  JGK		F 				
 	A %Q'!aNN@!   NNG	   AaNN;N<H    argsparserc                    SSK Jn  SSKJnJn  SSKJn  SSKJn  SSK	J
n  SSKJnJn	  SS	KJn
  U
" U R                   5        UR"                  R%                  U R                   UR&                  S
9nUR)                  U R                   5      nUR*                  nU R,                  (       dj  U R.                  (       dY  UR,                  (       d7  [0        R2                  R5                  SS5      nU(       d  U" S5      nU" U5      eUR,                  U l        U" X05      nU" U5      nUR7                  5       (       a1  UR9                  5         UR:                  (       a  UR=                  5         0 nUR>                   H  n U" U5      UU'   M     S S S.nURB                  (       a*  SnU" U5      nURE                  UURB                  X5      UU'   UR>                  RG                  5        H!  u  nnUU   nURE                  UUX5      UU'   M#     URH                  (       a  URK                  URH                  5        URM                  5         U" U UU5        g! U	 a    [A        U" SS SS S35      5      ef = f)Nr   r   )contextdetermine_target_prefix)
PrefixData)print_result)get_installer)CondaEnvExceptionInvalidInstallerr   )validate_file_exists)sourcenameCONDA_DEFAULT_ENVFav  
                    Unable to determine environment

                    Please re-run this command with one of the following options:

                    * Provide an environment name via --name or -n
                    * Provide an environment path via --prefix or -p
                    * Re-run this command inside an activated conda environment.
                    z3
                    Unable to install package for r   z.

                    Please double check and ensure you dependencies file has
                    the correct spelling.  You might also try installing the
                    conda-env-z\ package to see if provides the required
                    installer.
                    )condapipr6   )'r   r   base.contextr+   r,   core.prefix_datar-   env.envr.   env.installers.baser/   
exceptionsr0   r1   commonr2   fileplugin_managerget_environment_specifierenvironment_specifierenvironment_specenvr4   prefixosenvirongetis_environmentassert_writableprotect_frozen_envsassert_not_frozenexternal_packagesr   requested_packagesinstallitems	variablesset_environment_env_varsset_nonadmin)r(   r)   r   r+   r,   r-   r.   r/   r0   r1   r2   	spec_hookspecrC   r4   msgrD   prefix_data
installersinstaller_typeresult	installerspecss                          r%   executer\   N   s@   !?-&3@, # &&@@yy** A I %%dii0D
((CIIxx ::>>"5u=D
 (,,
 HH	$W3FV$K!!####%&&))+ J //	)6~)FJ~& 0" D)F
 !.1	!*!2!2C**D"
~ "%!6!6!<!<!>~.	!*!2!265$!L~ "? }},,S]];vv&C   	334# 6  !c "	 	s   9II-)__doc__rE   argparser   r   r    r   r   r&   intr\    r'   r%   <module>rb      sd   
 
   8"3 8. 8v 	f) f^ f f 	fr'   