Rename --compile to --compile-bytecode (#3102)
## Summary With an alias for backwards compatibility. It's clearer and matches the setting in the TOML configuration (where `compile` was deemed too vague).
This commit is contained in:
+18
-8
@@ -771,11 +771,16 @@ pub(crate) struct PipSyncArgs {
|
||||
///
|
||||
/// The compile option will process the entire site-packages directory for consistency and
|
||||
/// (like pip) ignore all errors.
|
||||
#[arg(long, overrides_with("no_compile"))]
|
||||
pub(crate) compile: bool,
|
||||
#[arg(long, alias = "compile", overrides_with("no_compile_bytecode"))]
|
||||
pub(crate) compile_bytecode: bool,
|
||||
|
||||
#[arg(long, overrides_with("compile"), hide = true)]
|
||||
pub(crate) no_compile: bool,
|
||||
#[arg(
|
||||
long,
|
||||
alias = "no_compile",
|
||||
overrides_with("compile_bytecode"),
|
||||
hide = true
|
||||
)]
|
||||
pub(crate) no_compile_bytecode: bool,
|
||||
|
||||
/// Settings to pass to the PEP 517 build backend, specified as `KEY=VALUE` pairs.
|
||||
#[arg(long, short = 'C', alias = "config-settings")]
|
||||
@@ -1105,11 +1110,16 @@ pub(crate) struct PipInstallArgs {
|
||||
///
|
||||
/// The compile option will process the entire site-packages directory for consistency and
|
||||
/// (like pip) ignore all errors.
|
||||
#[arg(long, overrides_with("no_compile"))]
|
||||
pub(crate) compile: bool,
|
||||
#[arg(long, alias = "compile", overrides_with("no_compile_bytecode"))]
|
||||
pub(crate) compile_bytecode: bool,
|
||||
|
||||
#[arg(long, overrides_with("compile"), hide = true)]
|
||||
pub(crate) no_compile: bool,
|
||||
#[arg(
|
||||
long,
|
||||
alias = "no_compile",
|
||||
overrides_with("compile_bytecode"),
|
||||
hide = true
|
||||
)]
|
||||
pub(crate) no_compile_bytecode: bool,
|
||||
|
||||
/// Settings to pass to the PEP 517 build backend, specified as `KEY=VALUE` pairs.
|
||||
#[arg(long, short = 'C', alias = "config-settings")]
|
||||
|
||||
@@ -256,8 +256,8 @@ impl PipSyncSettings {
|
||||
build,
|
||||
no_binary,
|
||||
only_binary,
|
||||
compile,
|
||||
no_compile,
|
||||
compile_bytecode,
|
||||
no_compile_bytecode,
|
||||
config_setting,
|
||||
strict,
|
||||
no_strict,
|
||||
@@ -300,7 +300,7 @@ impl PipSyncSettings {
|
||||
config_settings.into_iter().collect::<ConfigSettings>()
|
||||
}),
|
||||
link_mode,
|
||||
compile_bytecode: flag(compile, no_compile),
|
||||
compile_bytecode: flag(compile_bytecode, no_compile_bytecode),
|
||||
require_hashes: flag(require_hashes, no_require_hashes),
|
||||
..PipOptions::default()
|
||||
},
|
||||
@@ -378,8 +378,8 @@ impl PipInstallSettings {
|
||||
build,
|
||||
no_binary,
|
||||
only_binary,
|
||||
compile,
|
||||
no_compile,
|
||||
compile_bytecode,
|
||||
no_compile_bytecode,
|
||||
config_setting,
|
||||
strict,
|
||||
no_strict,
|
||||
@@ -440,7 +440,7 @@ impl PipInstallSettings {
|
||||
}),
|
||||
exclude_newer,
|
||||
link_mode,
|
||||
compile_bytecode: flag(compile, no_compile),
|
||||
compile_bytecode: flag(compile_bytecode, no_compile_bytecode),
|
||||
require_hashes: flag(require_hashes, no_require_hashes),
|
||||
..PipOptions::default()
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user