From adcb67a882c43c3080e94a2cb508a37a08f94f0e Mon Sep 17 00:00:00 2001 From: Aditya Pratap Singh Date: Fri, 13 Sep 2024 00:37:33 +0530 Subject: [PATCH] Fix documentation typos for `uv build --build-constraint` flag (#7330) Summary This pull request fixes a typo in the --build-constraints flag, which should be singular (--build-constraint). This update ensures consistency across the documentation and prevents potential confusion for users. Closes #7315 ## Test Plan The change was verified by reviewing the relevant documentation files where the flag is referenced. No functional code changes were made, so no additional testing is required beyond confirming the documentation update. ## Tested The change was tested by visually inspecting the updated documentation to confirm that the typo has been corrected --- CHANGELOG.md | 2 +- crates/uv-cli/src/lib.rs | 2 +- docs/concepts/projects.md | 4 ++-- docs/reference/cli.md | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 45c60bba5474..330efb5fa1dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -69,7 +69,7 @@ ### Enhancements -- Accept `--build-constraints` in `uv build` ([#7085](https://github.com/astral-sh/uv/pull/7085)) +- Accept `--build-constraint` in `uv build` ([#7085](https://github.com/astral-sh/uv/pull/7085)) - Add `--require-hashes` and `--verify-hashes` to `uv build` ([#7094](https://github.com/astral-sh/uv/pull/7094)) - Add `--show-version-specifiers` to `uv tool list` ([#7050](https://github.com/astral-sh/uv/pull/7050)) - Respect hashes in constraints files ([#7093](https://github.com/astral-sh/uv/pull/7093)) diff --git a/crates/uv-cli/src/lib.rs b/crates/uv-cli/src/lib.rs index daf02811e819..fb7c3a6119f4 100644 --- a/crates/uv-cli/src/lib.rs +++ b/crates/uv-cli/src/lib.rs @@ -1998,7 +1998,7 @@ pub struct BuildArgs { /// Require a matching hash for each build requirement. /// /// Hash-checking mode is all or nothing. If enabled, _all_ build requirements must be provided - /// with a corresponding hash or set of hashes via the `--build-constraints` argument. + /// with a corresponding hash or set of hashes via the `--build-constraint` argument. /// Additionally, if enabled, _all_ requirements must either be pinned to exact versions /// (e.g., `==1.0.0`), or be specified via direct URL. /// diff --git a/docs/concepts/projects.md b/docs/concepts/projects.md index 96c4ae167568..6f7108314145 100644 --- a/docs/concepts/projects.md +++ b/docs/concepts/projects.md @@ -588,7 +588,7 @@ You can limit `uv build` to building a source distribution with `uv build --sdis distribution with `uv build --wheel`, or build both distributions from source with `uv build --sdist --wheel`. -`uv build` accepts `--build-constraints`, which can be used to constrain the versions of any build +`uv build` accepts `--build-constraint`, which can be used to constrain the versions of any build requirements during the build process. When coupled with `--require-hashes`, uv will enforce that the requirement used to build the project match specific, known hashes, for reproducibility. @@ -602,7 +602,7 @@ Running the following would build the project with the specified version of `set that the downloaded `setuptools` distribution matches the specified hash: ```console -$ uv build --build-constraints constraints.txt --require-hashes +$ uv build --build-constraint constraints.txt --require-hashes ``` ## Build isolation diff --git a/docs/reference/cli.md b/docs/reference/cli.md index 4a8b8ba80056..b8613fe87bc9 100644 --- a/docs/reference/cli.md +++ b/docs/reference/cli.md @@ -6454,7 +6454,7 @@ uv build [OPTIONS] [SRC]
--require-hashes

Require a matching hash for each build requirement.

-

Hash-checking mode is all or nothing. If enabled, all build requirements must be provided with a corresponding hash or set of hashes via the --build-constraints argument. Additionally, if enabled, all requirements must either be pinned to exact versions (e.g., ==1.0.0), or be specified via direct URL.

+

Hash-checking mode is all or nothing. If enabled, all build requirements must be provided with a corresponding hash or set of hashes via the --build-constraint argument. Additionally, if enabled, all requirements must either be pinned to exact versions (e.g., ==1.0.0), or be specified via direct URL.

Hash-checking mode introduces a number of additional constraints: