Skip to content

Commit

Permalink
Build wheels for PyPy on macOS (#33)
Browse files Browse the repository at this point in the history
* Try older setuptools to build macOS PyPy wheels
* Updated classifiers and added comment explaining setuptools version
* Use cibuildwheel GHA instead of specifying command
* Explicitly request PyPy wheels
  * cibuildwheel will disable them by default in the future
  • Loading branch information
tfpf authored Dec 1, 2024
1 parent eb68246 commit da0ab6c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- run: pipx install cibuildwheel==2.21.3
- run: cibuildwheel --output-dir wheelhouse
- uses: pypa/[email protected]
with:
output-dir: wheelhouse
env:
# The Apple linker does not recognise one of the flags passed to it
# while building for PyPy. Skip it.
CIBW_SKIP: pp*-macosx*
CIBW_BUILD: cp* pp*
CIBW_TEST_COMMAND: python -m unittest discover -s {package}/tests -t {package}
- uses: actions/upload-artifact@v4
with:
Expand Down
7 changes: 6 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
[build-system]
requires = ["setuptools>=61.0"]
# The Apple linker does not recognise `-Bsymbolic-functions`, one of the
# arguments passed to it on macOS when building wheels for PyPy. Using an older
# version of setuptools fixes this problem.
requires = ["setuptools==70.0.0"]
build-backend = "setuptools.build_meta"

[project]
Expand All @@ -19,6 +22,8 @@ classifiers = [
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Operating System :: Unix",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
Expand Down

0 comments on commit da0ab6c

Please sign in to comment.