Skip to content

Commit e0cc459

Browse files
use CIBW overrides to build arm64 macOS wheels (#428)
Co-authored-by: Josh Moore <[email protected]>
1 parent 6adfa93 commit e0cc459

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

.github/workflows/wheel.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@ jobs:
1818
CIBW_TEST_COMMAND: pytest --pyargs numcodecs
1919
CIBW_TEST_REQUIRES: pytest
2020
CIBW_SKIP: "pp* cp36-* *-musllinux_* *win32 *_i686 *_s390x"
21-
CIBW_ENVIRONMENT: "DISABLE_NUMCODECS_AVX2=1"
22-
CIBW_ENVIRONMENT_MACOS: 'MACOSX_DEPLOYMENT_TARGET=10.9 DISABLE_NUMCODECS_AVX2=1 CFLAGS="$CFLAGS -Wno-implicit-function-declaration"'
23-
21+
CIBW_ARCHS_MACOS: 'x86_64 arm64'
22+
CIBW_TEST_SKIP: '*-macosx_arm64'
23+
# note: CIBW_ENVIRONMENT is now set in pyproject.toml
24+
2425
steps:
2526
- uses: actions/checkout@v3
2627
with:

pyproject.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,3 +108,11 @@ norecursedirs = [
108108
"notebooks",
109109
"numcodecs.egg-info",
110110
]
111+
[tool.cibuildwheel]
112+
environment = { DISABLE_NUMCODECS_AVX2=1 }
113+
[tool.cibuildwheel.macos]
114+
environment = { MACOSX_DEPLOYMENT_TARGET=10.9, CFLAGS="$CFLAGS -Wno-implicit-function-declaration" }
115+
[[tool.cibuildwheel.overrides]]
116+
select = "*-macosx_arm64"
117+
environment = { DISABLE_NUMCODECS_SSE2=1 }
118+

0 commit comments

Comments
 (0)