From 37b7cc18c1968df2a5b1085e74337e6760f44b29 Mon Sep 17 00:00:00 2001 From: Kwabena Amponsah Date: Mon, 3 Aug 2026 18:46:45 +0100 Subject: [PATCH] Build cells example without pip build isolation so petsc4py is found All three test-cells-ubuntu jobs fail at the Build step: the pycells wheel build's CMake configure runs find_package(PETSc4py), whose FindPETSc4py.cmake does `import petsc4py`, and under pip build isolation that cannot see the system python3-petsc4py-real exposed through the --system-site-packages venv. Configure then fails with "PETSc4py could not be found". Build with --no-build-isolation so the venv's interpreter (which sees the system site-packages, and thus petsc4py) is used directly. That requires the build deps up front: scikit-build-core (the backend) and ninja (the CMake generator, which an isolated build would otherwise pip-fetch; it is not apt installed). Co-Authored-By: Claude Opus 4.8 --- .github/workflows/test-cells-ubuntu.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-cells-ubuntu.yml b/.github/workflows/test-cells-ubuntu.yml index 3ebb32c..30c36c7 100644 --- a/.github/workflows/test-cells-ubuntu.yml +++ b/.github/workflows/test-cells-ubuntu.yml @@ -138,9 +138,16 @@ jobs: working-directory: examples/cells - name: Build + # Don't use pip build isolation because CMake cannot find_package(PETSc4py). + # The system petsc4py is exposed via the --system-site-packages venv but + # build isolation is tightened in newer versions of pip and prevents the + # build from seeing it. The --no-build-isolation flag requires installing + # the build dependencies directly: scikit-build-core and ninja (these + # would normally be pip-fetched during an isolated build). run: | . .venv/bin/activate && \ - python3 -m pip install -v . + python3 -m pip install "scikit-build-core >= 0.10.0" ninja && \ + python3 -m pip install -v --no-build-isolation . working-directory: examples/cells - name: Test