@@ -3847,8 +3847,188 @@ pub struct ToolUpgradeArgs {
3847
3847
) ]
3848
3848
pub python : Option < Maybe < String > > ,
3849
3849
3850
+ // The following is equivalent to flattening `ResolverInstallerArgs`, with the `--upgrade`,
3851
+ // and `--upgrade-package` options hidden, and the `--no-upgrade` option removed.
3852
+ /// Allow package upgrades, ignoring pinned versions in any existing output file. Implies
3853
+ /// `--refresh`.
3854
+ #[ arg( hide = true , long, short = 'U' , help_heading = "Resolver options" ) ]
3855
+ pub upgrade : bool ,
3856
+
3857
+ /// Allow upgrades for a specific package, ignoring pinned versions in any existing output
3858
+ /// file. Implies `--refresh-package`.
3859
+ #[ arg( hide = true , long, short = 'P' , help_heading = "Resolver options" ) ]
3860
+ pub upgrade_package : Vec < Requirement < VerbatimParsedUrl > > ,
3861
+
3850
3862
#[ command( flatten) ]
3851
- pub installer : ResolverInstallerArgs ,
3863
+ pub index_args : IndexArgs ,
3864
+
3865
+ /// Reinstall all packages, regardless of whether they're already installed. Implies
3866
+ /// `--refresh`.
3867
+ #[ arg(
3868
+ long,
3869
+ alias = "force-reinstall" ,
3870
+ overrides_with( "no_reinstall" ) ,
3871
+ help_heading = "Installer options"
3872
+ ) ]
3873
+ pub reinstall : bool ,
3874
+
3875
+ #[ arg(
3876
+ long,
3877
+ overrides_with( "reinstall" ) ,
3878
+ hide = true ,
3879
+ help_heading = "Installer options"
3880
+ ) ]
3881
+ pub no_reinstall : bool ,
3882
+
3883
+ /// Reinstall a specific package, regardless of whether it's already installed. Implies
3884
+ /// `--refresh-package`.
3885
+ #[ arg( long, help_heading = "Installer options" ) ]
3886
+ pub reinstall_package : Vec < PackageName > ,
3887
+
3888
+ /// The strategy to use when resolving against multiple index URLs.
3889
+ ///
3890
+ /// By default, uv will stop at the first index on which a given package is available, and
3891
+ /// limit resolutions to those present on that first index (`first-match`). This prevents
3892
+ /// "dependency confusion" attacks, whereby an attacker can upload a malicious package under the
3893
+ /// same name to an alternate index.
3894
+ #[ arg(
3895
+ long,
3896
+ value_enum,
3897
+ env = EnvVars :: UV_INDEX_STRATEGY ,
3898
+ help_heading = "Index options"
3899
+ ) ]
3900
+ pub index_strategy : Option < IndexStrategy > ,
3901
+
3902
+ /// Attempt to use `keyring` for authentication for index URLs.
3903
+ ///
3904
+ /// At present, only `--keyring-provider subprocess` is supported, which configures uv to
3905
+ /// use the `keyring` CLI to handle authentication.
3906
+ ///
3907
+ /// Defaults to `disabled`.
3908
+ #[ arg(
3909
+ long,
3910
+ value_enum,
3911
+ env = EnvVars :: UV_KEYRING_PROVIDER ,
3912
+ help_heading = "Index options"
3913
+ ) ]
3914
+ pub keyring_provider : Option < KeyringProviderType > ,
3915
+
3916
+ /// The strategy to use when selecting between the different compatible versions for a given
3917
+ /// package requirement.
3918
+ ///
3919
+ /// By default, uv will use the latest compatible version of each package (`highest`).
3920
+ #[ arg(
3921
+ long,
3922
+ value_enum,
3923
+ env = EnvVars :: UV_RESOLUTION ,
3924
+ help_heading = "Resolver options"
3925
+ ) ]
3926
+ pub resolution : Option < ResolutionMode > ,
3927
+
3928
+ /// The strategy to use when considering pre-release versions.
3929
+ ///
3930
+ /// By default, uv will accept pre-releases for packages that _only_ publish pre-releases,
3931
+ /// along with first-party requirements that contain an explicit pre-release marker in the
3932
+ /// declared specifiers (`if-necessary-or-explicit`).
3933
+ #[ arg(
3934
+ long,
3935
+ value_enum,
3936
+ env = EnvVars :: UV_PRERELEASE ,
3937
+ help_heading = "Resolver options"
3938
+ ) ]
3939
+ pub prerelease : Option < PrereleaseMode > ,
3940
+
3941
+ #[ arg( long, hide = true ) ]
3942
+ pub pre : bool ,
3943
+
3944
+ /// Settings to pass to the PEP 517 build backend, specified as `KEY=VALUE` pairs.
3945
+ #[ arg(
3946
+ long,
3947
+ short = 'C' ,
3948
+ alias = "config-settings" ,
3949
+ help_heading = "Build options"
3950
+ ) ]
3951
+ pub config_setting : Option < Vec < ConfigSettingEntry > > ,
3952
+
3953
+ /// Disable isolation when building source distributions.
3954
+ ///
3955
+ /// Assumes that build dependencies specified by PEP 518 are already installed.
3956
+ #[ arg(
3957
+ long,
3958
+ overrides_with( "build_isolation" ) ,
3959
+ help_heading = "Build options" ,
3960
+ env = EnvVars :: UV_NO_BUILD_ISOLATION ,
3961
+ value_parser = clap:: builder:: BoolishValueParser :: new( ) ,
3962
+ ) ]
3963
+ pub no_build_isolation : bool ,
3964
+
3965
+ /// Disable isolation when building source distributions for a specific package.
3966
+ ///
3967
+ /// Assumes that the packages' build dependencies specified by PEP 518 are already installed.
3968
+ #[ arg( long, help_heading = "Build options" ) ]
3969
+ pub no_build_isolation_package : Vec < PackageName > ,
3970
+
3971
+ #[ arg(
3972
+ long,
3973
+ overrides_with( "no_build_isolation" ) ,
3974
+ hide = true ,
3975
+ help_heading = "Build options"
3976
+ ) ]
3977
+ pub build_isolation : bool ,
3978
+
3979
+ /// Limit candidate packages to those that were uploaded prior to the given date.
3980
+ ///
3981
+ /// Accepts both RFC 3339 timestamps (e.g., `2006-12-02T02:07:43Z`) and local dates in the same
3982
+ /// format (e.g., `2006-12-02`) in your system's configured time zone.
3983
+ #[ arg( long, env = EnvVars :: UV_EXCLUDE_NEWER , help_heading = "Resolver options" ) ]
3984
+ pub exclude_newer : Option < ExcludeNewer > ,
3985
+
3986
+ /// The method to use when installing packages from the global cache.
3987
+ ///
3988
+ /// Defaults to `clone` (also known as Copy-on-Write) on macOS, and `hardlink` on Linux and
3989
+ /// Windows.
3990
+ #[ arg(
3991
+ long,
3992
+ value_enum,
3993
+ env = EnvVars :: UV_LINK_MODE ,
3994
+ help_heading = "Installer options"
3995
+ ) ]
3996
+ pub link_mode : Option < uv_install_wheel:: linker:: LinkMode > ,
3997
+
3998
+ /// Compile Python files to bytecode after installation.
3999
+ ///
4000
+ /// By default, uv does not compile Python (`.py`) files to bytecode (`__pycache__/*.pyc`);
4001
+ /// instead, compilation is performed lazily the first time a module is imported. For use-cases
4002
+ /// in which start time is critical, such as CLI applications and Docker containers, this option
4003
+ /// can be enabled to trade longer installation times for faster start times.
4004
+ ///
4005
+ /// When enabled, uv will process the entire site-packages directory (including packages that
4006
+ /// are not being modified by the current operation) for consistency. Like pip, it will also
4007
+ /// ignore errors.
4008
+ #[ arg(
4009
+ long,
4010
+ alias = "compile" ,
4011
+ overrides_with( "no_compile_bytecode" ) ,
4012
+ help_heading = "Installer options" ,
4013
+ env = EnvVars :: UV_COMPILE_BYTECODE ,
4014
+ value_parser = clap:: builder:: BoolishValueParser :: new( ) ,
4015
+ ) ]
4016
+ pub compile_bytecode : bool ,
4017
+
4018
+ #[ arg(
4019
+ long,
4020
+ alias = "no-compile" ,
4021
+ overrides_with( "compile_bytecode" ) ,
4022
+ hide = true ,
4023
+ help_heading = "Installer options"
4024
+ ) ]
4025
+ pub no_compile_bytecode : bool ,
4026
+
4027
+ /// Ignore the `tool.uv.sources` table when resolving dependencies. Used to lock against the
4028
+ /// standards-compliant, publishable package metadata, as opposed to using any local or Git
4029
+ /// sources.
4030
+ #[ arg( long, help_heading = "Resolver options" ) ]
4031
+ pub no_sources : bool ,
3852
4032
3853
4033
#[ command( flatten) ]
3854
4034
pub build : BuildOptionsArgs ,
0 commit comments