From 12fea1d058083a4f8a032ca8295a7d95a776292e Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Sat, 17 Feb 2024 09:24:58 -0500 Subject: [PATCH] Always run `get_requires_for_build_wheel` (#1590) ## Summary I want to revisit this as I think it's still skippable in some cases, but for now, let's be more conservative. Closes https://github.com/astral-sh/uv/issues/1582. ## Test Plan Cloned `https://github.com/OCA/mis-builder/blob/3aea4235697bac0f74d446e610e2b934b0994e06/setup/mis_builder/setup.py#L4`, and ran `cargo run pip install -e mis_builder`. --- crates/uv-build/src/lib.rs | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/crates/uv-build/src/lib.rs b/crates/uv-build/src/lib.rs index 5b4637abb..cdfad02ea 100644 --- a/crates/uv-build/src/lib.rs +++ b/crates/uv-build/src/lib.rs @@ -339,20 +339,16 @@ impl SourceBuild { .await .map_err(|err| Error::RequirementsInstall("build-system.requires (install)", err))?; - // If we're using the default backend configuration, skip `get_requires_for_build_*`, since - // we already installed the requirements above. if let Some(pep517_backend) = &pep517_backend { - if pep517_backend != &default_backend { - create_pep517_build_environment( - &source_tree, - &venv, - pep517_backend, - build_context, - &package_id, - build_kind, - ) - .await?; - } + create_pep517_build_environment( + &source_tree, + &venv, + pep517_backend, + build_context, + &package_id, + build_kind, + ) + .await?; } Ok(Self {