Skip to content

Drop --pre, petsc and --only-binary from the dolfinx pip install - #22

Open
shimwell wants to merge 2 commits into
mainfrom
petsc-3.26-only-binary
Open

shimwell wants to merge 2 commits into
mainfrom
petsc-3.26-only-binary

Conversation

@shimwell

@shimwell shimwell commented Sep 29, 2026 •

Copy link
Copy Markdown
Member

PETSc 3.26.0 is out on PyPI, but only as source distributions of petsc and petsc4py. The custom index at https://shimwell.github.io/wheels now has 3.26.0 wheels of both (shimwell/wheels#33). pip prefers a wheel over an sdist of the same version, so everything still installs from wheels, and the install command gets shorter:

pip install --extra-index-url https://shimwell.github.io/wheels "fenics-dolfinx[petsc4py]"
  • --pre is removed. pip falls back to pre-releases when there is no final fenics-dolfinx, and the dev version specifiers in its dependencies let basix, ffcx and ufl through too.
  • petsc is no longer listed, because petsc4py pulls it in. The earlier CI failure (libpetsc.so.3.025: cannot open shared object file) was the cp312 petsc4py wheel on the index not declaring petsc. That is fixed in the 3.26.0 wheels.

A pip install --dry-run of this command in a clean python:3.12 container picks the petsc and petsc4py 3.26.0 wheels and downloads no sdists. The CI for this PR passed with the same wheels and the --only-binary variant.

A future PETSc patch release published to PyPI as an sdist before matching wheels are on the index would make pip compile PETSc. The index needs new wheels when that happens, and the weekly CI run would catch it.

🤖 Generated with Claude Code

PyPI now has petsc and petsc4py 3.26.0 as source distributions, which pip
prefers over the 3.26.0.dev0 wheels on the custom index and would compile.
--only-binary keeps them on the wheels. --pre is no longer needed, as pip
falls back to pre-releases when no final dolfinx exists, and petsc comes in
as a dependency of petsc4py so it need not be listed.
The custom index now has petsc and petsc4py 3.26.0 wheels, the same
version as the sdists on PyPI, and pip prefers a wheel over an sdist of
the same version, so the flag no longer changes what gets installed.
@shimwell shimwell changed the title Keep petsc on wheels after the 3.26.0 sdist release, drop --pre Drop --pre, petsc and --only-binary from the dolfinx pip install Sep 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant