Skip to content

Drop libffi-devel from the cibuildwheel Linux before-all step#236

Merged
bdraco merged 2 commits into
masterfrom
drop-libffi-devel-before-all
May 18, 2026
Merged

Drop libffi-devel from the cibuildwheel Linux before-all step#236
bdraco merged 2 commits into
masterfrom
drop-libffi-devel-before-all

Conversation

@bdraco
Copy link
Copy Markdown
Member

@bdraco bdraco commented May 17, 2026

What do these changes do?

Removes the libffi-devel install from
[tool.cibuildwheel.linux] before-all in pyproject.toml,
leaving the step responsible only for installing ccache.

History: libffi-devel was added in #75 (Dec 2024, "Fix wheel builds
when cffi needs to be built from source") because cffi was being
built from source during the wheel test environment install, and
cffi's build requires libffi headers. Today the wheel test chain
(requirements/test.txt: cython, covdefaults, pytest, pytest-cov,
pytest-xdist) and the build-system requires (expandvars, setuptools,
tomli) do not pull cffi. The only remaining cffi reference is
requirements/codspeed.txt, which is installed by the CodSpeed
benchmark job on a regular ubuntu-latest runner where libffi-dev is
already present and which does not use cibuildwheel.

Are there changes in behavior for the user?

No. CI-only change. The published wheels and the test command run by
cibuildwheel are unchanged; the only effect is a slightly faster
before-all (one fewer package installed, fewer yum/apt/apk fetches).

Related issue number

Follow-up cleanup spotted while reviewing #233 / #235.

Checklist

  • I think the code is well written
  • Unit tests for the changes exist -- N/A (CI workflow change; the
    effect is observable only by re-running the wheel-build matrix)
  • Documentation reflects the changes -- N/A (no user-visible API)
  • Add a new news fragment into the CHANGES/ folder
Agent run details (optional, for reviewers)

History trace:

Dep audit (current master):

  • grep -l cffi requirements/*.txt -> only requirements/codspeed.txt.
  • requirements/test.txt -> cython.txt + covdefaults + pytest +
    pytest-cov + pytest-xdist. None of these pull cffi transitively.
  • pyproject.toml build-system requires -> expandvars, setuptools,
    tomli. None pull cffi.

Local checks:

  • make doc-spelling: passes for the new fragment. Two pre-existing
    failures remain on master that are unrelated to this change
    (subdirectory in CHANGES/207.contrib.rst:1 and postfix in
    CHANGES.rst:168).
  • Pre-commit hooks (toml check, codespell, etc.) pass.

The runtime effect cannot be exercised locally; verification is the
next Linux wheel-build job on this branch.

Drafted with Claude Code (Claude Opus 4.7); reviewed by @bdraco.

The package was added in PR #75 so cffi could build from source while
cibuildwheel installed the wheel test environment. cffi is no longer
pulled into that chain (only requirements/codspeed.txt references it,
and the CodSpeed job does not use cibuildwheel), so libffi-devel is
dead weight that costs an extra package and slightly more yum metadata
work per Linux wheel job.

Confirmed by walking the deps of requirements/test.txt (cython,
covdefaults, pytest, pytest-cov, pytest-xdist) and the build-system
requires (expandvars, setuptools, tomli); none pull cffi.
@psf-chronographer psf-chronographer Bot added the bot:chronographer:provided There is a change note present in this PR label May 17, 2026
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented May 17, 2026

Merging this PR will not alter performance

✅ 4 untouched benchmarks


Comparing drop-libffi-devel-before-all (ff35ef4) with master (4179ce4)

Open in CodSpeed

@bdraco bdraco marked this pull request as ready for review May 18, 2026 15:55
@bdraco
Copy link
Copy Markdown
Member Author

bdraco commented May 18, 2026

Looks like ffi has long been fixed so we can merge this now

@bdraco bdraco merged commit 315e356 into master May 18, 2026
54 of 55 checks passed
@bdraco bdraco deleted the drop-libffi-devel-before-all branch May 18, 2026 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot:chronographer:provided There is a change note present in this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant