mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-07 21:35:00 +00:00
Merge 7446620b88
into f609e1ddaf
This commit is contained in:
commit
e42bb096af
4 changed files with 23 additions and 14 deletions
|
@ -591,7 +591,7 @@ pub struct VersionArgs {
|
|||
pub refresh: RefreshArgs,
|
||||
|
||||
/// Update the version of a specific package in the workspace.
|
||||
#[arg(long, conflicts_with = "isolated")]
|
||||
#[arg(long, env = EnvVars::UV_PACKAGE, conflicts_with = "isolated")]
|
||||
pub package: Option<PackageName>,
|
||||
|
||||
/// The Python interpreter to use for resolving and syncing.
|
||||
|
@ -2380,7 +2380,7 @@ pub struct BuildArgs {
|
|||
/// directory if no source directory is provided.
|
||||
///
|
||||
/// If the workspace member does not exist, uv will exit with an error.
|
||||
#[arg(long, conflicts_with("all_packages"))]
|
||||
#[arg(long, env = EnvVars::UV_PACKAGE, conflicts_with("all_packages"))]
|
||||
pub package: Option<PackageName>,
|
||||
|
||||
/// Builds all packages in the workspace.
|
||||
|
@ -3104,7 +3104,7 @@ pub struct RunArgs {
|
|||
/// Run the command in a specific package in the workspace.
|
||||
///
|
||||
/// If the workspace member does not exist, uv will exit with an error.
|
||||
#[arg(long, conflicts_with = "all_packages")]
|
||||
#[arg(long, env = EnvVars::UV_PACKAGE, conflicts_with = "all_packages")]
|
||||
pub package: Option<PackageName>,
|
||||
|
||||
/// Avoid discovering the project or workspace.
|
||||
|
@ -3347,7 +3347,7 @@ pub struct SyncArgs {
|
|||
/// declared by the specified workspace member package.
|
||||
///
|
||||
/// If the workspace member does not exist, uv will exit with an error.
|
||||
#[arg(long, conflicts_with = "all_packages")]
|
||||
#[arg(long, env = EnvVars::UV_PACKAGE, conflicts_with = "all_packages")]
|
||||
pub package: Option<PackageName>,
|
||||
|
||||
/// Sync the environment for a Python script, rather than the current project.
|
||||
|
@ -3619,7 +3619,7 @@ pub struct AddArgs {
|
|||
pub refresh: RefreshArgs,
|
||||
|
||||
/// Add the dependency to a specific package in the workspace.
|
||||
#[arg(long, conflicts_with = "isolated")]
|
||||
#[arg(long, env = EnvVars::UV_PACKAGE, conflicts_with = "isolated")]
|
||||
pub package: Option<PackageName>,
|
||||
|
||||
/// Add the dependency to the specified Python script, rather than to a project.
|
||||
|
@ -3720,7 +3720,7 @@ pub struct RemoveArgs {
|
|||
pub refresh: RefreshArgs,
|
||||
|
||||
/// Remove the dependencies from a specific package in the workspace.
|
||||
#[arg(long, conflicts_with = "isolated")]
|
||||
#[arg(long, env = EnvVars::UV_PACKAGE, conflicts_with = "isolated")]
|
||||
pub package: Option<PackageName>,
|
||||
|
||||
/// Remove the dependency from the specified Python script, rather than from a project.
|
||||
|
@ -3907,7 +3907,7 @@ pub struct ExportArgs {
|
|||
/// Export the dependencies for a specific package in the workspace.
|
||||
///
|
||||
/// If the workspace member does not exist, uv will exit with an error.
|
||||
#[arg(long, conflicts_with = "all_packages")]
|
||||
#[arg(long, env = EnvVars::UV_PACKAGE, conflicts_with = "all_packages")]
|
||||
pub package: Option<PackageName>,
|
||||
|
||||
/// Prune the given package from the dependency tree.
|
||||
|
|
|
@ -100,6 +100,10 @@ impl EnvVars {
|
|||
/// file as the constraints file. Uses space-separated list of files.
|
||||
pub const UV_CONSTRAINT: &'static str = "UV_CONSTRAINT";
|
||||
|
||||
/// Equivalent to the `--package` command-line argument. If set, uv
|
||||
/// will run the command in this workspace member.
|
||||
pub const UV_PACKAGE: &'static str = "UV_PACKAGE";
|
||||
|
||||
/// Equivalent to the `--build-constraint` command-line argument. If set, uv will use this file
|
||||
/// as constraints for any source distribution builds. Uses space-separated list of files.
|
||||
pub const UV_BUILD_CONSTRAINT: &'static str = "UV_BUILD_CONSTRAINT";
|
||||
|
|
|
@ -209,7 +209,7 @@ uv run [OPTIONS] [COMMAND]
|
|||
<p>May be provided multiple times. Implies <code>--no-default-groups</code>.</p>
|
||||
</dd><dt id="uv-run--package"><a href="#uv-run--package"><code>--package</code></a> <i>package</i></dt><dd><p>Run the command in a specific package in the workspace.</p>
|
||||
<p>If the workspace member does not exist, uv will exit with an error.</p>
|
||||
</dd><dt id="uv-run--prerelease"><a href="#uv-run--prerelease"><code>--prerelease</code></a> <i>prerelease</i></dt><dd><p>The strategy to use when considering pre-release versions.</p>
|
||||
<p>May also be set with the <code>UV_PACKAGE</code> environment variable.</p></dd><dt id="uv-run--prerelease"><a href="#uv-run--prerelease"><code>--prerelease</code></a> <i>prerelease</i></dt><dd><p>The strategy to use when considering pre-release versions.</p>
|
||||
<p>By default, uv will accept pre-releases for packages that <em>only</em> publish pre-releases, along with first-party requirements that contain an explicit pre-release marker in the declared specifiers (<code>if-necessary-or-explicit</code>).</p>
|
||||
<p>May also be set with the <code>UV_PRERELEASE</code> environment variable.</p><p>Possible values:</p>
|
||||
<ul>
|
||||
|
@ -541,7 +541,7 @@ uv add [OPTIONS] <PACKAGES|--requirements <REQUIREMENTS>>
|
|||
<p>The group may then be activated when installing the project with the <code>--extra</code> flag.</p>
|
||||
<p>To enable an optional extra for this requirement instead, see <code>--extra</code>.</p>
|
||||
</dd><dt id="uv-add--package"><a href="#uv-add--package"><code>--package</code></a> <i>package</i></dt><dd><p>Add the dependency to a specific package in the workspace</p>
|
||||
</dd><dt id="uv-add--prerelease"><a href="#uv-add--prerelease"><code>--prerelease</code></a> <i>prerelease</i></dt><dd><p>The strategy to use when considering pre-release versions.</p>
|
||||
<p>May also be set with the <code>UV_PACKAGE</code> environment variable.</p></dd><dt id="uv-add--prerelease"><a href="#uv-add--prerelease"><code>--prerelease</code></a> <i>prerelease</i></dt><dd><p>The strategy to use when considering pre-release versions.</p>
|
||||
<p>By default, uv will accept pre-releases for packages that <em>only</em> publish pre-releases, along with first-party requirements that contain an explicit pre-release marker in the declared specifiers (<code>if-necessary-or-explicit</code>).</p>
|
||||
<p>May also be set with the <code>UV_PRERELEASE</code> environment variable.</p><p>Possible values:</p>
|
||||
<ul>
|
||||
|
@ -723,7 +723,7 @@ uv remove [OPTIONS] <PACKAGES>...
|
|||
<p>When disabled, uv will only use locally cached data and locally available files.</p>
|
||||
<p>May also be set with the <code>UV_OFFLINE</code> environment variable.</p></dd><dt id="uv-remove--optional"><a href="#uv-remove--optional"><code>--optional</code></a> <i>optional</i></dt><dd><p>Remove the packages from the project's optional dependencies for the specified extra</p>
|
||||
</dd><dt id="uv-remove--package"><a href="#uv-remove--package"><code>--package</code></a> <i>package</i></dt><dd><p>Remove the dependencies from a specific package in the workspace</p>
|
||||
</dd><dt id="uv-remove--prerelease"><a href="#uv-remove--prerelease"><code>--prerelease</code></a> <i>prerelease</i></dt><dd><p>The strategy to use when considering pre-release versions.</p>
|
||||
<p>May also be set with the <code>UV_PACKAGE</code> environment variable.</p></dd><dt id="uv-remove--prerelease"><a href="#uv-remove--prerelease"><code>--prerelease</code></a> <i>prerelease</i></dt><dd><p>The strategy to use when considering pre-release versions.</p>
|
||||
<p>By default, uv will accept pre-releases for packages that <em>only</em> publish pre-releases, along with first-party requirements that contain an explicit pre-release marker in the declared specifiers (<code>if-necessary-or-explicit</code>).</p>
|
||||
<p>May also be set with the <code>UV_PRERELEASE</code> environment variable.</p><p>Possible values:</p>
|
||||
<ul>
|
||||
|
@ -897,7 +897,7 @@ uv version [OPTIONS] [VALUE]
|
|||
<li><code>text</code>: Display the version as plain text</li>
|
||||
<li><code>json</code>: Display the version as JSON</li>
|
||||
</ul></dd><dt id="uv-version--package"><a href="#uv-version--package"><code>--package</code></a> <i>package</i></dt><dd><p>Update the version of a specific package in the workspace</p>
|
||||
</dd><dt id="uv-version--prerelease"><a href="#uv-version--prerelease"><code>--prerelease</code></a> <i>prerelease</i></dt><dd><p>The strategy to use when considering pre-release versions.</p>
|
||||
<p>May also be set with the <code>UV_PACKAGE</code> environment variable.</p></dd><dt id="uv-version--prerelease"><a href="#uv-version--prerelease"><code>--prerelease</code></a> <i>prerelease</i></dt><dd><p>The strategy to use when considering pre-release versions.</p>
|
||||
<p>By default, uv will accept pre-releases for packages that <em>only</em> publish pre-releases, along with first-party requirements that contain an explicit pre-release marker in the declared specifiers (<code>if-necessary-or-explicit</code>).</p>
|
||||
<p>May also be set with the <code>UV_PRERELEASE</code> environment variable.</p><p>Possible values:</p>
|
||||
<ul>
|
||||
|
@ -1108,7 +1108,7 @@ uv sync [OPTIONS]
|
|||
</dd><dt id="uv-sync--package"><a href="#uv-sync--package"><code>--package</code></a> <i>package</i></dt><dd><p>Sync for a specific package in the workspace.</p>
|
||||
<p>The workspace's environment (<code>.venv</code>) is updated to reflect the subset of dependencies declared by the specified workspace member package.</p>
|
||||
<p>If the workspace member does not exist, uv will exit with an error.</p>
|
||||
</dd><dt id="uv-sync--prerelease"><a href="#uv-sync--prerelease"><code>--prerelease</code></a> <i>prerelease</i></dt><dd><p>The strategy to use when considering pre-release versions.</p>
|
||||
<p>May also be set with the <code>UV_PACKAGE</code> environment variable.</p></dd><dt id="uv-sync--prerelease"><a href="#uv-sync--prerelease"><code>--prerelease</code></a> <i>prerelease</i></dt><dd><p>The strategy to use when considering pre-release versions.</p>
|
||||
<p>By default, uv will accept pre-releases for packages that <em>only</em> publish pre-releases, along with first-party requirements that contain an explicit pre-release marker in the declared specifiers (<code>if-necessary-or-explicit</code>).</p>
|
||||
<p>May also be set with the <code>UV_PRERELEASE</code> environment variable.</p><p>Possible values:</p>
|
||||
<ul>
|
||||
|
@ -1473,7 +1473,7 @@ uv export [OPTIONS]
|
|||
</dd><dt id="uv-export--output-file"><a href="#uv-export--output-file"><code>--output-file</code></a>, <code>-o</code> <i>output-file</i></dt><dd><p>Write the exported requirements to the given file</p>
|
||||
</dd><dt id="uv-export--package"><a href="#uv-export--package"><code>--package</code></a> <i>package</i></dt><dd><p>Export the dependencies for a specific package in the workspace.</p>
|
||||
<p>If the workspace member does not exist, uv will exit with an error.</p>
|
||||
</dd><dt id="uv-export--prerelease"><a href="#uv-export--prerelease"><code>--prerelease</code></a> <i>prerelease</i></dt><dd><p>The strategy to use when considering pre-release versions.</p>
|
||||
<p>May also be set with the <code>UV_PACKAGE</code> environment variable.</p></dd><dt id="uv-export--prerelease"><a href="#uv-export--prerelease"><code>--prerelease</code></a> <i>prerelease</i></dt><dd><p>The strategy to use when considering pre-release versions.</p>
|
||||
<p>By default, uv will accept pre-releases for packages that <em>only</em> publish pre-releases, along with first-party requirements that contain an explicit pre-release marker in the declared specifiers (<code>if-necessary-or-explicit</code>).</p>
|
||||
<p>May also be set with the <code>UV_PRERELEASE</code> environment variable.</p><p>Possible values:</p>
|
||||
<ul>
|
||||
|
@ -4803,7 +4803,7 @@ uv build [OPTIONS] [SRC]
|
|||
</dd><dt id="uv-build--package"><a href="#uv-build--package"><code>--package</code></a> <i>package</i></dt><dd><p>Build a specific package in the workspace.</p>
|
||||
<p>The workspace will be discovered from the provided source directory, or the current directory if no source directory is provided.</p>
|
||||
<p>If the workspace member does not exist, uv will exit with an error.</p>
|
||||
</dd><dt id="uv-build--prerelease"><a href="#uv-build--prerelease"><code>--prerelease</code></a> <i>prerelease</i></dt><dd><p>The strategy to use when considering pre-release versions.</p>
|
||||
<p>May also be set with the <code>UV_PACKAGE</code> environment variable.</p></dd><dt id="uv-build--prerelease"><a href="#uv-build--prerelease"><code>--prerelease</code></a> <i>prerelease</i></dt><dd><p>The strategy to use when considering pre-release versions.</p>
|
||||
<p>By default, uv will accept pre-releases for packages that <em>only</em> publish pre-releases, along with first-party requirements that contain an explicit pre-release marker in the declared specifiers (<code>if-necessary-or-explicit</code>).</p>
|
||||
<p>May also be set with the <code>UV_PRERELEASE</code> environment variable.</p><p>Possible values:</p>
|
||||
<ul>
|
||||
|
|
|
@ -275,6 +275,11 @@ Equivalent to the `--offline` command-line argument. If set, uv will disable net
|
|||
Equivalent to the `--override` command-line argument. If set, uv will use this file
|
||||
as the overrides file. Uses space-separated list of files.
|
||||
|
||||
### `UV_PACKAGE`
|
||||
|
||||
Equivalent to the `--package` command-line argument. If set, uv
|
||||
will run the command in this workspace member.
|
||||
|
||||
### `UV_PRERELEASE`
|
||||
|
||||
Equivalent to the `--prerelease` command-line argument. For example, if set to
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue