Add --no-editable support to uv sync and uv export (#7371)

## Summary

Closes https://github.com/astral-sh/uv/issues/5792.
This commit is contained in:
Charlie Marsh 2024-09-17 10:50:36 -04:00 committed by GitHub
parent bb0ffa32e4
commit 778da3350a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 362 additions and 22 deletions

View file

@ -0,0 +1,17 @@
#[derive(Debug, Default, Clone, Copy, PartialEq, Eq)]
pub enum EditableMode {
#[default]
Editable,
NonEditable,
}
impl EditableMode {
/// Determine the editable mode based on the command-line arguments.
pub fn from_args(no_editable: bool) -> Self {
if no_editable {
Self::NonEditable
} else {
Self::Editable
}
}
}

View file

@ -4,6 +4,7 @@ pub use concurrency::*;
pub use config_settings::*;
pub use constraints::*;
pub use dev::*;
pub use editable::*;
pub use export_format::*;
pub use extras::*;
pub use hash::*;
@ -22,6 +23,7 @@ mod concurrency;
mod config_settings;
mod constraints;
mod dev;
mod editable;
mod export_format;
mod extras;
mod hash;