From 6abdafa99dc20d68b036b6a5c6e75446e28d6463 Mon Sep 17 00:00:00 2001 From: Tim Paine <3105306+timkpaine@users.noreply.github.com> Date: Sun, 23 Aug 2026 11:24:11 -0400 Subject: [PATCH] Clean Rust artifacts before Linux wheel builds Signed-off-by: Tim Paine <3105306+timkpaine@users.noreply.github.com> --- python/rust/pyproject.toml.jinja | 1 + python/rustjswasm/pyproject.toml.jinja | 1 + 2 files changed, 2 insertions(+) diff --git a/python/rust/pyproject.toml.jinja b/python/rust/pyproject.toml.jinja index 068b49f..4512ebc 100644 --- a/python/rust/pyproject.toml.jinja +++ b/python/rust/pyproject.toml.jinja @@ -107,6 +107,7 @@ rustup target add aarch64-unknown-linux-gnu rustup target add x86_64-unknown-linux-gnu rustup show """ +before-build = "cargo clean --manifest-path {package}/Cargo.toml && rm -f {package}/{{ module }}/*.so" environment = {PATH="$HOME/.cargo/bin:$PATH", CARGO_TERM_COLOR="always"} skip = "*i686* *musllinux*" diff --git a/python/rustjswasm/pyproject.toml.jinja b/python/rustjswasm/pyproject.toml.jinja index 56563be..25ab185 100644 --- a/python/rustjswasm/pyproject.toml.jinja +++ b/python/rustjswasm/pyproject.toml.jinja @@ -119,6 +119,7 @@ curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain=stable --profile=m rustup target add aarch64-unknown-linux-gnu rustup target add x86_64-unknown-linux-gnu """ +before-build = "cargo clean --manifest-path {package}/Cargo.toml && rm -f {package}/{{ module }}/*.so" environment = {PATH="$HOME/.cargo/bin:$PATH", CARGO_TERM_COLOR="always", SKIP_HATCH_JS="1" } skip = "*i686* *musllinux*"