From d0902da88d4519587e04a5f948b44d309eaba2c3 Mon Sep 17 00:00:00 2001 From: Hadi Alqattan Date: Fri, 21 Mar 2025 12:23:11 +0300 Subject: [PATCH 1/3] doc: add a note about rustc's minimum MACOSX_DEPLOYMENT_TARGET requirement --- docs/platforms/macos.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/platforms/macos.md b/docs/platforms/macos.md index 01e8d0ec8..d61386b9b 100644 --- a/docs/platforms/macos.md +++ b/docs/platforms/macos.md @@ -41,6 +41,9 @@ macOS builds will honor the `MACOSX_DEPLOYMENT_TARGET` environment variable to c If you set the value lower, cibuildwheel will cap it to the lowest supported value for each target as needed. +Note: +For Rust-based extensions, `Rustc` requires `MACOSX_DEPLOYMENT_TARGET` to be at least 10.12. However, `cibuildwheel` defaults to 10.9 for **Intel / CPython 3.8-3.11** builds. Users must manually set `MACOSX_DEPLOYMENT_TARGET` to 10.12 or higher when building Rust extensions. + ## Universal builds By default, macOS builds will build a single architecture wheel, using the build machine's architecture. If you need to support both x86_64 and Apple Silicon, you can use the `CIBW_ARCHS` environment variable to specify the architectures you want to build, or the value `universal2` to build a multi-architecture wheel. cibuildwheel will test x86_64 wheels (or the x86_64 slice of a `universal2` wheel) when running on Apple Silicon hardware, but it is *not* possible to test Apple Silicon wheels on x86_64 hardware. From ae5a998d511b717a4037b484106f062a3b6bdf27 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Fri, 21 Mar 2025 09:47:57 -0400 Subject: [PATCH 2/3] Update docs/platforms/macos.md --- docs/platforms/macos.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/platforms/macos.md b/docs/platforms/macos.md index d61386b9b..bf07e09c0 100644 --- a/docs/platforms/macos.md +++ b/docs/platforms/macos.md @@ -41,8 +41,11 @@ macOS builds will honor the `MACOSX_DEPLOYMENT_TARGET` environment variable to c If you set the value lower, cibuildwheel will cap it to the lowest supported value for each target as needed. -Note: -For Rust-based extensions, `Rustc` requires `MACOSX_DEPLOYMENT_TARGET` to be at least 10.12. However, `cibuildwheel` defaults to 10.9 for **Intel / CPython 3.8-3.11** builds. Users must manually set `MACOSX_DEPLOYMENT_TARGET` to 10.12 or higher when building Rust extensions. +!!! note + For Rust-based extensions, `Rustc` requires `MACOSX_DEPLOYMENT_TARGET` to be at + least 10.12. However, `cibuildwheel` defaults to 10.9 for + **Intel / CPython 3.8-3.11** builds. Users must manually set + `MACOSX_DEPLOYMENT_TARGET` to 10.12 or higher when building Rust extensions. ## Universal builds From 4715ff0e7ba2da468ad1c1fff54968ce17271f08 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Fri, 21 Mar 2025 10:25:42 -0400 Subject: [PATCH 3/3] Update faq.md --- docs/faq.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/faq.md b/docs/faq.md index 7ef36636d..647739eb6 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -294,7 +294,16 @@ CIBW_BEFORE_ALL_WINDOWS: rustup target add i686-pc-windows-msvc CIBW_ENVIRONMENT_LINUX: "PATH=$HOME/.cargo/bin:$PATH" ``` -Rust does not provide Cargo for musllinux 32-bit, so that needs to be skipped: +Rust's minimum macOS target is 10.12, while CPython supports 10.9 before +Python 3.12, so you'll need to raise the minimum: + +```toml +[tool.cibuildwheel.macos.environment] +MACOSX_DEPLOYMENT_TARGET = "10.12" +``` + +And Rust does not provide Cargo for musllinux 32-bit, so that needs to be +skipped: ```toml [tool.cibuildwheel]