Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ jobs:
fail-fast: false
matrix:
include:
- runs-on: ubuntu-latest
- runs-on: ubuntu-24.04
python-version: '3.9'
cmake-args: -DPYBIND11_FINDPYTHON=ON -DCMAKE_CXX_STANDARD=17
- runs-on: ubuntu-latest
Expand Down Expand Up @@ -200,7 +200,7 @@ jobs:
fail-fast: false
matrix:
include:
- runs-on: ubuntu-latest
- runs-on: ubuntu-24.04
python-version: '3.9'
- runs-on: macos-latest
python-version: '3.12'
Expand Down Expand Up @@ -761,7 +761,9 @@ jobs:
install-classic:
if: github.event.pull_request.draft == false
name: "🐍 3.11 • Debian • x86 • Install"
runs-on: ubuntu-latest
# Ubuntu 26.04's Docker 29.4.2 breaks i386 networking:
# https://github.com/actions/runner-images/issues/14790
runs-on: ubuntu-24.04
container: i386/debian:bookworm
timeout-minutes: 90

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ jobs:
# This runs the packaging tests and also builds and saves the packages as
# artifacts.
packaging:
name: 🐍 3.9 • 📦 & 📦 tests • ubuntu-latest
runs-on: ubuntu-latest
name: 🐍 3.9 • 📦 & 📦 tests • ubuntu-24.04
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v7
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/tests-cibw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
submodules: true
fetch-depth: 0

- uses: pypa/cibuildwheel@v4.2
- uses: pypa/cibuildwheel@v4.3.4
env:
PYODIDE_BUILD_EXPORTS: whole_archive
with:
Expand All @@ -48,7 +48,7 @@ jobs:
# We have to uninstall first because GH is now using a local tap to build cmake<4, iOS needs cmake>=4
- run: brew uninstall cmake && brew install cmake

- uses: pypa/cibuildwheel@v4.2
- uses: pypa/cibuildwheel@v4.3.4
env:
CIBW_PLATFORM: ios
with:
Expand All @@ -72,7 +72,7 @@ jobs:
if: contains(matrix.runs-on, 'macos')
run: echo "CIBW_TEST_COMMAND=" >> "$GITHUB_ENV"

- uses: pypa/cibuildwheel@v4.2
- uses: pypa/cibuildwheel@v4.3.4
env:
CIBW_PLATFORM: android
with:
Expand Down
1 change: 1 addition & 0 deletions tests/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ environment.PIP_PREFER_BINARY = "1"

android.environment.ANDROID_API_LEVEL = "24" # Needed to include libc++ in the wheel.
pyodide.test-groups = ["numpy", "scipy"]
pyodide.config-settings = { "cmake.define.PYBIND11_USE_CROSSCOMPILING" = "ON" }

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@henryiii codex GPT-6.1-Sol ultra explained:

This fixes the Pyodide cross-build’s Python discovery failure. The original job stopped during configuration with Could NOT find Python (missing: Interpreter).

The interaction was:

  1. Emscripten sets Node as the cross-compilation emulator.
  2. Without this flag, pybind11 requests both Interpreter and Development.Module.
  3. Under CMake’s CMP0190 policy, that combination makes CMake execute the interpreter through the emulator. Here, it tried to run native Python through Node.

The subtlety is that our automatic cross-compilation default only activates when no emulator is defined, so Pyodide needs the explicit opt-in.

PYBIND11_USE_CROSSCOMPILING=ON activates the existing logic that omits interpreter discovery. The pyodide.config-settings scope applies it specifically to Pyodide wheel builds.

I reproduced configuration failing with OFF and succeeding with ON, then verified the full Pyodide build and test run.

ios.test-groups = ["numpy"]
ios.xbuild-tools = ["cmake", "ninja"]
ios.environment.PIP_EXTRA_INDEX_URL = "https://pypi.anaconda.org/beeware/simple"
Loading