Skip to content

Commit 927f508

Browse files
committed
refactor: separate wheel builds for cp310/cp311 and cp312 abi3
1 parent 13cfbf0 commit 927f508

1 file changed

Lines changed: 25 additions & 4 deletions

File tree

.github/workflows/build-wheels.yml

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,11 @@ jobs:
4242
echo "PKG_CONFIG_PATH=C:/mingw64/lib/pkgconfig" >> $GITHUB_ENV
4343
# echo "C:/msys64/mingw64/bin" >> $GITHUB_PATH
4444
45-
- name: Build wheels
45+
- name: Build cp310/cp311 wheels
4646
uses: pypa/cibuildwheel@v3.3.1
4747
env:
4848
# All cibuildwheel options are here (nothing "hidden" in pyproject.toml)
49-
# Hybrid strategy: keep per-version wheels for 3.10/3.11,
50-
# and build one cp312-based abi3 wheel for 3.12+.
51-
CIBW_BUILD: "cp310-* cp311-* cp312-*"
49+
CIBW_BUILD: "cp310-* cp311-*"
5250
CIBW_SKIP: "*-win32 *i686"
5351
CIBW_BUILD_FRONTEND: build
5452
CIBW_BUILD_VERBOSITY: 3
@@ -66,6 +64,29 @@ jobs:
6664
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: |
6765
bash ./cibw-scripts/repair_wheel_command_windows.sh {wheel} {dest_dir}
6866
67+
- name: Build cp312 abi3 wheels
68+
uses: pypa/cibuildwheel@v3.3.1
69+
env:
70+
CIBW_BUILD: "cp312-*"
71+
CIBW_SKIP: "*-win32 *i686"
72+
CIBW_BUILD_FRONTEND: build
73+
# meson-python uses this to set the wheel ABI tag to abi3.
74+
CIBW_CONFIG_SETTINGS: "tool.meson-python.limited-api=true"
75+
CIBW_BUILD_VERBOSITY: 3
76+
CIBW_TEST_REQUIRES: pytest scipy
77+
CIBW_TEST_COMMAND: |
78+
pytest {project}/tests
79+
CIBW_MANYLINUX_X86_64_IMAGE: quay.io/pypa/manylinux_2_28_x86_64
80+
CIBW_MUSLLINUX_X86_64_IMAGE: musllinux_1_2
81+
CIBW_BEFORE_ALL_LINUX: |
82+
bash {project}/cibw-scripts/before_all_linux.sh {project}
83+
CIBW_BEFORE_ALL_WINDOWS: |
84+
bash {project}/cibw-scripts/before_all_windows.sh
85+
CIBW_BEFORE_BUILD_WINDOWS: |
86+
pip install delvewheel
87+
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: |
88+
bash ./cibw-scripts/repair_wheel_command_windows.sh {wheel} {dest_dir}
89+
6990
- name: Upload wheels
7091
uses: actions/upload-artifact@v4
7192
with:

0 commit comments

Comments
 (0)