From a3376569a103b47c2c9b90a079ab7c3f37430646 Mon Sep 17 00:00:00 2001 From: samypr100 <3933065+samypr100@users.noreply.github.com> Date: Sat, 5 Oct 2024 19:38:25 -0400 Subject: [PATCH] chore(meson-build): improved meson rebuilds with uv --- crates/uv/src/commands/project/init.rs | 3 +++ crates/uv/tests/init.rs | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/crates/uv/src/commands/project/init.rs b/crates/uv/src/commands/project/init.rs index 42fddd4c8a036..d201921c36864 100644 --- a/crates/uv/src/commands/project/init.rs +++ b/crates/uv/src/commands/project/init.rs @@ -818,6 +818,9 @@ fn pyproject_build_system(package: &PackageName, build_backend: ProjectBuildBack "#} .to_string(), ProjectBuildBackend::Meson => indoc::indoc! {r#" + [tool.meson-python.args] + setup = ["--clearcache"] + [build-system] requires = ["meson-python", "pybind11"] build-backend = "mesonpy" diff --git a/crates/uv/tests/init.rs b/crates/uv/tests/init.rs index 99099567d0e92..037595a87ddaf 100644 --- a/crates/uv/tests/init.rs +++ b/crates/uv/tests/init.rs @@ -2721,6 +2721,9 @@ fn init_app_build_backend_meson() -> Result<()> { [project.scripts] foo = "foo:main" + [tool.meson-python.args] + setup = ["--clearcache"] + [build-system] requires = ["meson-python", "pybind11"] build-backend = "mesonpy" @@ -3117,6 +3120,9 @@ fn init_lib_build_backend_meson() -> Result<()> { requires-python = ">=3.12" dependencies = [] + [tool.meson-python.args] + setup = ["--clearcache"] + [build-system] requires = ["meson-python", "pybind11"] build-backend = "mesonpy"