mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-07 21:35:00 +00:00
Add --package
argument to uv add
and uv remove
(#4556)
## Summary Closes https://github.com/astral-sh/uv/issues/4550.
This commit is contained in:
parent
1ee201da5a
commit
963a7b2ab5
6 changed files with 53 additions and 20 deletions
|
@ -1639,6 +1639,10 @@ pub struct RunArgs {
|
|||
#[command(flatten)]
|
||||
pub refresh: RefreshArgs,
|
||||
|
||||
/// Run the command in a specific package in the workspace.
|
||||
#[arg(long, conflicts_with = "isolated")]
|
||||
pub package: Option<PackageName>,
|
||||
|
||||
/// The Python interpreter to use to build the run environment.
|
||||
///
|
||||
/// By default, `uv` uses the virtual environment in the current working directory or any parent
|
||||
|
@ -1652,10 +1656,6 @@ pub struct RunArgs {
|
|||
/// - `/home/ferris/.local/bin/python3.10` uses the exact Python at the given path.
|
||||
#[arg(long, short, env = "UV_PYTHON", verbatim_doc_comment)]
|
||||
pub python: Option<String>,
|
||||
|
||||
/// Run the command in a different package in the workspace.
|
||||
#[arg(long, conflicts_with = "isolated")]
|
||||
pub package: Option<PackageName>,
|
||||
}
|
||||
|
||||
#[derive(Args)]
|
||||
|
@ -1784,6 +1784,10 @@ pub struct AddArgs {
|
|||
#[command(flatten)]
|
||||
pub refresh: RefreshArgs,
|
||||
|
||||
/// Add the dependency to a specific package in the workspace.
|
||||
#[arg(long, conflicts_with = "isolated")]
|
||||
pub package: Option<PackageName>,
|
||||
|
||||
/// The Python interpreter into which packages should be installed.
|
||||
///
|
||||
/// By default, `uv` installs into the virtual environment in the current working directory or
|
||||
|
@ -1811,6 +1815,10 @@ pub struct RemoveArgs {
|
|||
#[arg(long)]
|
||||
pub dev: bool,
|
||||
|
||||
/// Remove the dependency from a specific package in the workspace.
|
||||
#[arg(long, conflicts_with = "isolated")]
|
||||
pub package: Option<PackageName>,
|
||||
|
||||
/// The Python interpreter into which packages should be installed.
|
||||
///
|
||||
/// By default, `uv` installs into the virtual environment in the current working directory or
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue