Skip to content

Commit 087045c

Browse files
committed
WIP upgrade cibuildwheel to 3.0
1 parent 39f3811 commit 087045c

File tree

2 files changed

+76
-70
lines changed

2 files changed

+76
-70
lines changed

.github/workflows/wheels.yml

Lines changed: 56 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -3,66 +3,67 @@ name: Build
33
on: [push, pull_request]
44

55
jobs:
6-
build_wheels:
7-
name: Build wheels on ${{ matrix.os }}
8-
runs-on: ${{ matrix.os }}
9-
strategy:
10-
matrix:
11-
os:
12-
[ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-13, macos-14]
6+
# build_wheels:
7+
# name: Build wheels on ${{ matrix.os }}
8+
# runs-on: ${{ matrix.os }}
9+
# strategy:
10+
# matrix:
11+
# os:
12+
# [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-13, macos-14]
1313

14-
steps:
15-
- uses: actions/checkout@v4
16-
with:
17-
submodules: true
14+
# steps:
15+
# - uses: actions/checkout@v4
16+
# with:
17+
# submodules: true
1818

19-
- name: Build sdist
20-
run: |
21-
pipx run build --sdist
22-
python3 -c "import pathlib,glob;pathlib.Path('GITHUB_ENV').write_text('SDIST_PATH' + glob.glob('dist/*.tar.gz')[0])"
19+
# - name: Build sdist
20+
# run: |
21+
# pipx run build --sdist
22+
# python3 -c "import pathlib,glob;pathlib.Path('GITHUB_ENV').write_text('SDIST_PATH' + glob.glob('dist/*.tar.gz')[0])"
2323

24-
- name: Build wheels
25-
uses: pypa/[email protected]
26-
env:
27-
CIBW_BUILD: "cp39-* cp310-* cp311-* cp312-* cp313-* pp310-* pp311-*"
28-
# CIBW_TEST_COMMAND: "python -m pymunk.tests"
29-
# CIBW_BUILD_VERBOSITY: 3
30-
with:
31-
package-dir: "$SDIST_PATH"
24+
# - name: Build wheels
25+
# uses: pypa/[email protected]
26+
# env:
27+
# CIBW_BUILD: "cp39-* cp310-* cp311-* cp312-* cp313-* pp310-* pp311-*"
28+
# # CIBW_TEST_COMMAND: "python -m pymunk.tests"
29+
# # CIBW_BUILD_VERBOSITY: 3
30+
# with:
31+
# package-dir: "$SDIST_PATH"
3232

33-
- name: Upload wheel artifacts
34-
uses: actions/upload-artifact@v4
35-
if: ${{ github.ref == 'refs/heads/master'}}
36-
with:
37-
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
38-
path: ./wheelhouse/*.whl
39-
retention-days: 7
33+
# - name: Upload wheel artifacts
34+
# uses: actions/upload-artifact@v4
35+
# if: ${{ github.ref == 'refs/heads/master'}}
36+
# with:
37+
# name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
38+
# path: ./wheelhouse/*.whl
39+
# retention-days: 7
4040

41-
- name: Upload sdist artifact
42-
uses: actions/upload-artifact@v4
43-
if:
44-
${{ github.ref == 'refs/heads/master' && matrix.os ==
45-
'windows-latest'}}
46-
with:
47-
name: sdist-${{ matrix.os }}-${{ strategy.job-index }}
48-
path: ./dist/*.tar.gz
49-
retention-days: 7
41+
# - name: Upload sdist artifact
42+
# uses: actions/upload-artifact@v4
43+
# if:
44+
# ${{ github.ref == 'refs/heads/master' && matrix.os ==
45+
# 'windows-latest'}}
46+
# with:
47+
# name: sdist-${{ matrix.os }}-${{ strategy.job-index }}
48+
# path: ./dist/*.tar.gz
49+
# retention-days: 7
5050

51-
build_wasm:
52-
name: Build wheels for wasm / emscripten
53-
runs-on: ubuntu-22.04
54-
steps:
55-
- uses: actions/checkout@v4
56-
with:
57-
submodules: true
58-
- uses: pypa/[email protected]
59-
env:
60-
CIBW_PLATFORM: pyodide
61-
- uses: actions/upload-artifact@v4
62-
if: ${{ github.ref == 'refs/heads/master' }}
63-
with:
64-
path: ./wheelhouse/*.whl
65-
retention-days: 7
51+
# build_wasm:
52+
# name: Build wheels for wasm / emscripten
53+
# runs-on: ubuntu-22.04
54+
# steps:
55+
# - uses: actions/checkout@v4
56+
# with:
57+
# submodules: true
58+
# - uses: pypa/[email protected]
59+
# env:
60+
# CIBW_PLATFORM: pyodide
61+
# - uses: actions/upload-artifact@v4
62+
# if: ${{ github.ref == 'refs/heads/master' }}
63+
# with:
64+
# name: cibw-wheels-pyodide-${{ matrix.os }}-${{ strategy.job-index }}
65+
# path: ./wheelhouse/*.whl
66+
# retention-days: 7
6667

6768
build_ios:
6869
name: Build wheels for iOS
@@ -72,26 +73,11 @@ jobs:
7273
uses: actions/checkout@v4
7374
with:
7475
submodules: true
75-
- name: Set up Python
76-
uses: actions/setup-python@v5
77-
with:
78-
python-version: "3.x"
79-
#- run: brew upgrade cmake
76+
- run: brew upgrade cmake
8077
- name: Build wheels
8178
uses: pypa/[email protected]
82-
8379
env:
8480
CIBW_PLATFORM: ios
85-
CIBW_ARCHS: auto
86-
CIBW_BUILD_VERBOSITY: 1
87-
CIBW_BEFORE_BUILD_IOS: |
88-
# download wheel and pretend that it's compatible with the current platform settings
89-
curl https://files.pythonhosted.org/packages/8b/f1/672d303ddf17c24fc83afd712316fda78dc6fce1cd53011b839483e1ecc8/cffi-1.17.1-cp313-cp313-macosx_11_0_arm64.whl -L -o cffi-1.17.1-py3-none-any.whl && \
90-
pip install cffi-1.17.1-py3-none-any.whl && \
91-
# install the rest of the dependencies
92-
python -m pip install setuptools wheel
93-
CIBW_XBUILD_TOOLS: "curl pkg-config tar"
94-
CIBW_BUILD_FRONTEND: "pip; args: --no-build-isolation"
9581

9682
- uses: actions/upload-artifact@v4
9783
if: ${{ github.ref == 'refs/heads/master' }}

pyproject.toml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,15 @@ check_untyped_defs = false
9393
[tool.cibuildwheel]
9494
test-command = "python -m pymunk.tests"
9595
enable = ["pypy"]
96+
build = [
97+
"cp39-*",
98+
"cp310-*",
99+
"cp311-*",
100+
"cp312-*",
101+
"cp313-*",
102+
"pp310-*",
103+
"pp311-*",
104+
]
96105

97106
[tool.cibuildwheel.linux]
98107

@@ -103,6 +112,17 @@ enable = ["pypy"]
103112
[tool.cibuildwheel.ios]
104113
environment = { PYMUNK_BUILD_SLIM = "1" }
105114
test-skip = "*"
115+
archs = "all"
116+
build-verbosity = 1
117+
build-frontend = { name = "pip", args = "--no-build-isolation" }
118+
xbuild-tools = ["curl", "pkg-config", "tar"]
119+
before-build = [
120+
# download wheel and pretend that it's compatible with the current platform settings
121+
"curl https://files.pythonhosted.org/packages/8b/f1/672d303ddf17c24fc83afd712316fda78dc6fce1cd53011b839483e1ecc8/cffi-1.17.1-cp313-cp313-macosx_11_0_arm64.whl -L -o cffi-1.17.1-py3-none-any.whl",
122+
"pip install cffi-1.17.1-py3-none-any.whl",
123+
# install the rest of the dependencies
124+
"python -m pip install setuptools wheel",
125+
]
106126

107127
[tool.cibuildwheel.pyodide]
108128
environment = { PYMUNK_BUILD_SLIM = "1" }

0 commit comments

Comments
 (0)