Skip to content

Build cells example without pip build isolation so petsc4py is found - #115

Merged
kwabenantim merged 1 commit into
developfrom
fix-cells-ci-build-isolation
Aug 3, 2026
Merged

Build cells example without pip build isolation so petsc4py is found#115
kwabenantim merged 1 commit into
developfrom
fix-cells-ci-build-isolation

Conversation

@kwabenantim

@kwabenantim kwabenantim commented Aug 3, 2026

Copy link
Copy Markdown
Member

Ubuntu Cells CI fails because import petsc4py under pip build isolation cannot see the system petsc4py via --system-site-packages. This is because build isolation has been tightened in newer versions of pip. Use --no-build-isolation so the venv can see petsc4py.

@kwabenantim
kwabenantim marked this pull request as ready for review August 3, 2026 17:52
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 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the Ubuntu “cells” example CI workflow to disable pip build isolation during the build step so that the virtualenv created with --system-site-packages can see the system-provided petsc4py package (needed for find_package(PETSc4py) during the scikit-build-core/CMake build).

Changes:

  • Switch the examples/cells build install to pip install --no-build-isolation ..
  • Explicitly install build requirements (scikit-build-core and ninja) into the venv since pip will no longer fetch them in an isolated build env.
  • Add inline documentation in the workflow explaining why build isolation must be disabled (newer pip behavior).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@kwabenantim
kwabenantim merged commit 1337661 into develop Aug 3, 2026
18 checks passed
@kwabenantim
kwabenantim deleted the fix-cells-ci-build-isolation branch August 3, 2026 18:16
@kwabenantim kwabenantim added the bug label Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants