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

Skip to content

Commit bcf8a99

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 * Use a list for select Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
1 parent b37f761 commit bcf8a99

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

pyproject.toml

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -142,22 +142,32 @@ 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+
168+
[tool.cibuildwheel.pyodide.config-settings]
169+
build-dir = "build"
170+
setup-args = ["--cross-file=$PWD/tools/ci/emscripten/emscripten.meson.cross", "-Dblas=none", "-Dlapack=none"]
161171

162172
[tool.cibuildwheel.linux.environment]
163173
# RUNNER_OS is a GitHub Actions specific env var; define it here so it works on Cirrus CI too
@@ -178,22 +188,16 @@ repair-wheel-command = [
178188
]
179189

180190
[tool.cibuildwheel.windows]
181-
config-settings = "setup-args=--vsenv setup-args=-Dallow-noblas=false build-dir=build"
191+
config-settings = {setup-args = ["--vsenv", "-Dallow-noblas=false"], build-dir="build"}
182192
repair-wheel-command = "bash -el ./tools/wheels/repair_windows.sh {wheel} {dest_dir}"
183193
# This does not work, use CIBW_ENVIRONMENT_WINDOWS
184194
environment = {PKG_CONFIG_PATH="./.openblas"}
185195

186196
[[tool.cibuildwheel.overrides]]
187-
select = "*-win32"
188-
config-settings = "setup-args=--vsenv setup-args=-Dallow-noblas=true build-dir=build"
197+
select = ["*-win32"]
198+
config-settings = {setup-args = ["--vsenv", "-Dallow-noblas=true"], build-dir="build"}
189199
repair-wheel-command = ""
190200

191-
[[tool.cibuildwheel.overrides]]
192-
select = "*pyodide*"
193-
before-test = "pip install -r {project}/requirements/emscripten_test_requirements.txt"
194-
# Pyodide ensures that the wheels are already repaired by auditwheel-emscripten
195-
repair-wheel-command = ""
196-
test-command = "python -m pytest --pyargs numpy -m 'not slow'"
197201

198202
[tool.meson-python]
199203
meson = 'vendored-meson/meson/meson.py'

0 commit comments

Comments
 (0)
0