mirror of
https://github.com/astral-sh/uv.git
synced 2025-10-27 18:36:44 +00:00
Add uv add --no-editable (#5246)
## Summary Resolves #5241 ## Test Plan ```sh # create a workspace with sub-packages `pkg-a` and `pkg-b` $ cd ./pkg-b $ cargo run -- add ./pkg-a --no-editable $ cat ./pyproject.toml [project] name = "pkg-b" version = "0.1.0" description = "Add your description here" readme = "README.md" dependencies = [ "pkg-a", ] [tool.uv] dev-dependencies = [] [tool.uv.sources] pkg-a = { workspace = true, editable = false } ```
This commit is contained in:
parent
e809bc339b
commit
0611c7b59e
2 changed files with 8 additions and 4 deletions
|
|
@ -1983,9 +1983,12 @@ pub struct AddArgs {
|
|||
#[arg(long, conflicts_with("dev"))]
|
||||
pub optional: Option<ExtraName>,
|
||||
|
||||
/// Add the requirements as editables.
|
||||
#[arg(long, default_missing_value = "true", num_args(0..=1))]
|
||||
pub editable: Option<bool>,
|
||||
#[arg(long, overrides_with = "no_editable", hide = true)]
|
||||
pub editable: bool,
|
||||
|
||||
/// Don't add the requirements as editables.
|
||||
#[arg(long, overrides_with = "editable")]
|
||||
pub no_editable: bool,
|
||||
|
||||
/// Add source requirements to the `project.dependencies` section of the `pyproject.toml`.
|
||||
///
|
||||
|
|
|
|||
|
|
@ -609,6 +609,7 @@ impl AddSettings {
|
|||
dev,
|
||||
optional,
|
||||
editable,
|
||||
no_editable,
|
||||
extra,
|
||||
raw_sources,
|
||||
rev,
|
||||
|
|
@ -641,13 +642,13 @@ impl AddSettings {
|
|||
frozen,
|
||||
requirements,
|
||||
dependency_type,
|
||||
editable,
|
||||
raw_sources,
|
||||
rev,
|
||||
tag,
|
||||
branch,
|
||||
package,
|
||||
python,
|
||||
editable: flag(editable, no_editable),
|
||||
extras: extra.unwrap_or_default(),
|
||||
refresh: Refresh::from(refresh),
|
||||
settings: ResolverInstallerSettings::combine(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue