Skip to content

Fix PyPy build: constrain setuptools<72 for PyPy on Linux/macOS - #39

Merged
wbarnha merged 1 commit into
fix/pr37-artifact-actions-v4from
copilot/fix-pypy-build-setuptools-limit
Jul 11, 2026
Merged

wbarnha merged 1 commit into
fix/pr37-artifact-actions-v4from
copilot/fix-pypy-build-setuptools-limit

Conversation

Copilot AI commented Jul 11, 2026

Copy link
Copy Markdown

setuptools≥72 introduced a regression in unixccompiler.py where linker_exe returns None instead of a list, causing TypeError: 'NoneType' object is not subscriptable and breaking PyPy wheel builds.

Changes

  • pyproject.toml: Adds a [[tool.cibuildwheel.overrides]] block scoped to pp*-manylinux*, pp*-musllinux*, and pp*-macosx* that:
    • Creates a pip constraints file (/tmp/cibw-pypy-constraints.txt) containing setuptools<72 in before-build
    • Sets PIP_CONSTRAINT to that file in the build environment

pip inherits PIP_CONSTRAINT into isolated build environments (spawned by python -m build), so the constraint is applied when the build venv installs [build-system].requires — without touching CPython builds. Windows PyPy is excluded since /tmp is not available there.

@wbarnha
wbarnha marked this pull request as ready for review July 11, 2026 18:23
@wbarnha
wbarnha merged commit e87427f into fix/pr37-artifact-actions-v4 Jul 11, 2026
@wbarnha
wbarnha deleted the copilot/fix-pypy-build-setuptools-limit branch July 11, 2026 18:23
wbarnha added a commit that referenced this pull request Jul 13, 2026
* Update setup.py to build against Python 3.13+

- use setuptools.command.build_ext instead of the already dead distutils
- Update opensuse-build.patch to explicitly link against libstdc++
  fixing build failure under Python 3.14 (undefined symbol
  _ZTVN10__cxxabiv117__class_type_infoE)

Fixes: #36

* ci: upgrade artifact actions to v4

* build: fix py3.12+ sysconfig import and linux-only stdc++ link

* build: require Cython >=3.0.10 for py3.12+ wheel builds

* build: pin packaging<26 to fix InvalidVersion crash in isolated build env

* Fix failing PyPy build: limit setuptools<72 for PyPy builds only (#39)

* Update OS versions in CI workflow

* Bump cibuildwheel action to v2.16.5 to fix Windows pwsh 7.4 arg-quoting bug

v2.15.0's GitHub Action fails on windows-2022 runners with
Invalid --only='""' because PowerShell 7.4 changed how empty-string
CLI args are quoted (pypa/cibuildwheel#1740). Fixed upstream in v2.16.5.

* Update macOS version in CI workflow

* Skip PyPy builds on macOS and Windows

PyPy wheels on these platforms aren't reliably buildable; only build
PyPy on Linux. Trims the now-unreachable macOS branch out of the
setuptools<72 PyPy override accordingly.

---------

Co-authored-by: Matěj Cepl <mcepl@cepl.eu>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
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.

2 participants