Skip to content

Commit 55570f9

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 55570f9

File tree

1 file changed

+14
-18
lines changed

1 file changed

+14
-18
lines changed

pyproject.toml

Lines changed: 14 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,14 @@ 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"]
195+
config-settings = {setup-args = ["--vsenv", "-Dallow-noblas=true"], build-dir="build"}
189196
repair-wheel-command = ""
190197

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'"
202198

203199
[tool.meson-python]
204200
meson = 'vendored-meson/meson/meson.py'

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy