@@ -55,6 +55,7 @@ Documentation = "https://docs.dwavequantum.com"
5555[dependency-groups ]
5656blas = [
5757 # Optional build requirement, last refreshed April 2026
58+ " pkgconf==2.5.1.post2" ,
5859 " scipy_openblas64==0.3.31.188.0" ,
5960]
6061build = [
@@ -93,20 +94,18 @@ test = [
9394
9495[tool .cibuildwheel ]
9596build-verbosity = " 1"
96- skip = " pp* *musllinux*"
97+ skip = " *musllinux*"
9798
98- # When building with cibuildwheel, we want scipy_openblas64 available to the
99- # build step. There isn't (as of Dec 2025) a way to override the
100- # build-system.requires so we need to build without isolation
101- before-build = " pip install --group blas-build"
99+ before-build = " pip install --group build"
102100build-frontend = { name = " build" , args = [" --no-isolation" ] }
103101
102+ # Customize the test running by installing our test requirements and by turning
103+ # on -Werror
104104before-test = " pip install --group test"
105105test-command = " python -Werror -m unittest discover {project}/tests/"
106106
107107[tool .cibuildwheel .config-settings ]
108108compile-args = [" -v" ]
109- setup-args = [" -Dblas=enabled" ] # require BLAS
110109
111110[tool .cibuildwheel .linux ]
112111archs = " x86_64 aarch64"
@@ -115,11 +114,11 @@ archs = "x86_64 aarch64"
115114# We follow NumPy and don't build universal wheels, see https://github.com/numpy/numpy/pull/20787
116115archs = " x86_64 arm64"
117116
118- # Lowest version that has the C++ features we want, see https://cibuildwheel.pypa.io/en/stable/cpp_standards/
119- environment = " MACOSX_DEPLOYMENT_TARGET=10.13"
117+ environment = { MACOSX_DEPLOYMENT_TARGET = " 10.13" }
120118
121119[tool .cibuildwheel .windows ]
122120archs = " AMD64"
121+
123122repair-wheel-command = [
124123 " pip install delvewheel" ,
125124 # We put the commands in an .sh so we can use bash
@@ -130,34 +129,33 @@ repair-wheel-command = [
130129# For Python3.12+, rather than building individual wheels we build an abi3
131130# wheel. 313t and 314t do not support abi wheels yet.
132131select = " cp31[!01]-*" # uses fnmatch, will fail for 3.20+ but good enough for now
133- build-frontend = { name = " build" , args = [" -Csetup-args=-Dpython.allow_limited_api=true" , " --no-isolation" ] }
132+
133+ inherit.config-settings = " append"
134+ config-settings = { "setup-args" = [" -Dpython.allow_limited_api=true" ] }
135+
134136inherit.repair-wheel-command = " append"
135137repair-wheel-command = [
136138 " pip install abi3audit" ,
137139 " abi3audit --strict --report {wheel}" ,
138140]
139141
140142[[tool .cibuildwheel .overrides ]]
141- select = " *-????linux_*"
142- inherit.repair-wheel-command = " prepend"
143- repair-wheel-command = " python /project/dwave/optimization/_build/_fix_rpath.py {wheel}"
143+ # For everything we build except macosx_x86_64, we want to include scipy-openblas
144+ select = " *-{????linux_*,macosx_arm64,win_*}"
144145
145- [[tool .cibuildwheel .overrides ]]
146- select = " *-macosx_*"
147- inherit.repair-wheel-command = " prepend"
148- repair-wheel-command = " python ./dwave/optimization/_build/_fix_rpath.py {wheel}"
146+ inherit.environent = " append"
147+ environment = { FORCE_PKGCONF_PYPI = " 1" }
148+
149+ inherit.before-build = " append"
150+ before-build = " pip install --group blas"
151+
152+ inhert.test-command = " append"
153+ test-command = " python -c \" from dwave.optimization.symbols import MatrixMultiply; assert(MatrixMultiply.implementation() == 'blas')\" "
149154
150155[[tool .cibuildwheel .overrides ]]
151- # We need a universal build of scipy_openblas so we need to make one on the fly
152- select = " *-macosx_*"
153- before-build = [
154- " pip download --group blas -d .openblas_arm64 --platform macosx_11_0_arm64 --no-deps" ,
155- " pip download --group blas -d .openblas_x86_64 --platform macosx_11_0_x86_64 --no-deps" ,
156- " pip install delocate" ,
157- " delocate-merge .openblas_x86_64/scipy_openblas*.whl .openblas_arm64/scipy_openblas*.whl -w .openblas" ,
158- " pip install .openblas/scipy_openblas*.whl" ,
159- " pip install --group build" ,
160- ]
156+ select = " *-{????linux,macosx}_*"
157+ inherit.repair-wheel-command = " prepend"
158+ repair-wheel-command = " python {project}/dwave/optimization/_build/_fix_rpath.py {wheel}"
161159
162160[tool .coverage .run ]
163161source = [" dwave/optimization" ]
0 commit comments