8000 CI: clean up cibuildwheel config a bit [wheel build] · numpy/numpy@e568069 · GitHub
[go: up one dir, main page]

Skip to content

Commit e568069

Browse files
committed
CI: clean up cibuildwheel config a bit [wheel build]
This simplifies the configuration a bit: * Combine pyodide blocks * Use tables/lists for config-settings and skip * Remove a few repeated lines * Combine windows 32/arm and simplify Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
1 parent 3363b38 commit e568069

File tree

1 file changed

+13
-18
lines changed

1 file changed

+13
-18
lines changed

pyproject.toml

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -142,22 +142,29 @@ tracker = "https://github.com/numpy/numpy/issues"
142142
# build wheels for in CI are controlled in `.github/workflows/wheels.yml` and
143143
# `tools/ci/cirrus_wheels.yml`.
144144
build-frontend = "build"
145-
skip = "*_i686 *_ppc64le *_s390x *_universal2"
145+
skip = ["*_i686", "*_ppc64le", "*_s390x", "*_universal2"]
146146
before-build = "bash {project}/tools/wheels/cibw_before_build.sh {project}"
147-
# The build will use openblas64 everywhere, except on arm64 macOS >=14.0 (uses Accelerate)
148-
config-settings = "setup-args=-Duse-ilp64=true setup-args=-Dallow-noblas=false build-dir=build"
149147
before-test = "pip install -r {project}/requirements/test_requirements.txt"
150148
test-command = "bash {project}/tools/wheels/cibw_test_command.sh {project}"
151149
enable = ["cpython-freethreading", "pypy", "cpython-prerelease"]
152150

151+
# The build will use openblas64 everywhere, except on arm64 macOS >=14.0 (uses Accelerate)
152+
[tool.cibuildwheel.config-settings]
153+
setup-args = ["-Duse-ilp64=true", "-Dallow-noblas=false"]
154+
build-dir = "build"
155+
153156
[tool.cibuildwheel.linux]
154157
manylinux-x86_64-image = "manylinux_2_28"
155158
manylinux-aarch64-image = "manylinux_2_28"
156159
musllinux-x86_64-image = "musllinux_1_2"
157160
musllinux-aarch64-image = "musllinux_1_2"
158161

159162
[tool.cibuildwheel.pyodide]
160-
config-settings = "build-dir=build setup-args=--cross-file=$PWD/tools/ci/emscripten/emscripten.meson.cross setup-args=-Dblas=none setup-args=-Dlapack=none"
163+
before-test = "pip install -r {project}/requirements/emscripten_test_requirements.txt"
164+
# Pyodide ensures that the wheels are already repaired by auditwheel-emscripten
165+
repair-wheel-command = ""
166+
test-command = "python -m pytest --pyargs numpy -m 'not slow'"
167+
config-settings = {build-dir = "build", setup-args = ["--cross-file=$PWD/tools/ci/emscripten/emscripten.meson.cross", "-Dblas=none", "-Dlapack=none"]}
161168

162169
[tool.cibuildwheel.linux.environment]
163170
# RUNNER_OS is a GitHub Actions specific env var; define it here so it works on Cirrus CI too
@@ -180,25 +187,13 @@ repair-wheel-command = [
180187
[tool.cibuildwheel.windows]
181188
# This does not work, use CIBW_ENVIRONMENT_WINDOWS
182189
environment = {PKG_CONFIG_PATH="./.openblas"}
183-
config-settings = "setup-args=--vsenv setup-args=-Dallow-noblas=false build-dir=build"
190+
config-settings = {setup-args = ["--vsenv", "-Dallow-noblas=false"], build-dir="build"}
184191
repair-wheel-command = "bash -el ./tools/wheels/repair_windows.sh {wheel} {dest_dir}"
185192

186193
[[tool.cibuildwheel.overrides]]
187-
select = "*-win32"
188-
config-settings = "setup-args=--vsenv setup-args=-Dallow-noblas=true build-dir=build"
194+
select = ["*-win32", "*-win_arm64"]
189195
repair-wheel-command = ""
190196

191-
[[tool.cibuildwheel.overrides]]
192-
select = "*-win_arm64"
193-
config-settings = "setup-args=--vsenv setup-args=-Dallow-noblas=true build-dir=build"
194-
repair-wheel-command = ""
195-
196-
[[tool.cibuildwheel.overrides]]
197-
select = "*pyodide*"
198-
before-test = "pip install -r {project}/requirements/emscripten_test_requirements.txt"
199-
# Pyodide ensures that the wheels are already repaired by auditwheel-emscripten
200-
repair-wheel-command = ""
201-
test-command = "python -m pytest --pyargs numpy -m 'not slow'"
202197

203198
[tool.meson-python]
204199
meson = 'vendored-meson/meson/meson.py'

0 commit comments

Comments
 (0)
0