Fix regression where `--require-hashes` applied to build dependencies in `uv pip install` (#15153)

Closes https://github.com/astral-sh/uv/issues/15146
This commit is contained in:
Zanie Blue 2025-08-07 16:43:24 -05:00 committed by GitHub
parent e5eec05783
commit 9425350478
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 7 deletions

View File

@ -582,7 +582,7 @@ pub(crate) async fn pip_install(
extra_build_variables,
link_mode,
&build_options,
&hasher,
&build_hasher,
exclude_newer.clone(),
sources,
WorkspaceCache::default(),

View File

@ -6693,16 +6693,17 @@ fn require_hashes_build_dependencies() -> Result<()> {
.arg("-r")
.arg("requirements.txt")
.arg("--require-hashes"), @r"
success: false
exit_code: 1
success: true
exit_code: 0
----- stdout -----
----- stderr -----
Resolved 3 packages in [TIME]
× Failed to download and build `idna==3.6`
Failed to resolve requirements from `build-system.requires`
No solution found when resolving: `flit-core>=3.2, <4`
In `--require-hashes` mode, all requirements must be pinned upfront with `==`, but found: `flit-core`
Prepared 3 packages in [TIME]
Installed 3 packages in [TIME]
+ anyio==4.0.0
+ idna==3.6
+ sniffio==1.3.1
"
);