Commit ed3e607
committed
Fix setup wheel-build
I fixed the likely wheel-build failures in the release workflow.
Changed:
- Updated `.github/workflows/python-publish.yml`
- `cibuildwheel==2.21.3` -> `cibuildwheel>=3.0,<4`
- Added `cp314-*` wheels to match Python 3.14 support
- Removed musllinux wheel builds for now to reduce release surface
- Replaced forced Linux `CFLAGS/LDFLAGS` with `METBIT_PORTABLE_BUILD=1`
- Fixed artifact downloads by downloading `sdist` and `wheels-*` separately
- Updated `setup.py`
- Avoids `-march=native` during portable wheel builds
- Uses Windows-safe compile flags (`/O2`) instead of Unix-only flags
- Adds Python 3.14 classifier
Verification:
- Built a portable Python 3.14 macOS arm64 wheel successfully:
`metbit-9.0.0-cp314-cp314-macosx_26_0_arm64.whl`
- Installed that wheel into a fresh venv successfully
- Smoke test passed:
`import metbit`, `pearson_columns(np.eye(5))`, `backend_info()`
- `twine check` passes with only the existing long-description warnings
Local cibuildwheel limitations:
- macOS cibuildwheel could select `cp314`, but cannot complete outside CI without python.org framework Pythons.
- Linux cibuildwheel could select `cp314-manylinux_x86_64`, but Docker is not running locally, so I couldn’t complete the container build here.
Fixed the release wheel failures from the CI log.
What changed:
- [python-publish.yml](/Users/kawa/work/kawa-technology/GitHub/metbit/.github/workflows/python-publish.yml:135): upgraded to `cibuildwheel>=3.0,<4` so Python 3.14 wheel selectors work.
- [python-publish.yml](/Users/kawa/work/kawa-technology/GitHub/metbit/.github/workflows/python-publish.yml:140): added `cp314-*`, skipped musllinux, and set `METBIT_PORTABLE_BUILD=1`.
- [python-publish.yml](/Users/kawa/work/kawa-technology/GitHub/metbit/.github/workflows/python-publish.yml:148): replaced the multiline Windows-breaking `python -c` command with a single-line command and assert `native_c` is present.
- [setup.py](/Users/kawa/work/kawa-technology/GitHub/metbit/setup.py:77): removed `-march=native` from portable wheel builds and uses `/O2` on Windows.
- [metbit/_native_backend.c](/Users/kawa/work/kawa-technology/GitHub/metbit/metbit/_native_backend.c:344): fixed the OpenMP/GIL macro bug that caused Linux C compilation failure.
- [setup.cfg](/Users/kawa/work/kawa-technology/GitHub/metbit/setup.cfg:2): changed deprecated `description-file` to `description_file`.
CI root causes found:
- macOS: `-march=native` on Apple M3 leaked into x86_64 wheel builds, extension skipped, then `delocate` failed.
- Linux: C extension failed to compile due nested `Py_END_ALLOW_THREADS`, extension skipped, then `auditwheel` failed because no shared library existed.
- Windows: workflow test command had leading indentation inside `python -c`, causing `IndentationError`.
Verification:
- YAML parse: passed.
- Portable Python 3.14 wheel build: passed, native `.so` included.
- Fresh wheel smoke install: passed with `native_c: True`.
- OpenMP branch syntax parse: passed.
- `twine check`: passed with existing long-description warnings.
- `tests/test_native_backend.py --no-cov`: `12 passed`.1 parent 0fb25bb commit ed3e607
4 files changed
Lines changed: 73 additions & 37 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
| 109 | + | |
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
| 136 | + | |
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
140 | | - | |
141 | | - | |
| 140 | + | |
| 141 | + | |
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
| 147 | + | |
| 148 | + | |
158 | 149 | | |
159 | 150 | | |
160 | 151 | | |
| |||
175 | 166 | | |
176 | 167 | | |
177 | 168 | | |
178 | | - | |
| 169 | + | |
179 | 170 | | |
180 | 171 | | |
181 | | - | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
182 | 179 | | |
183 | 180 | | |
184 | 181 | | |
| |||
210 | 207 | | |
211 | 208 | | |
212 | 209 | | |
213 | | - | |
| 210 | + | |
214 | 211 | | |
215 | 212 | | |
216 | | - | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
217 | 220 | | |
218 | 221 | | |
219 | 222 | | |
| |||
250 | 253 | | |
251 | 254 | | |
252 | 255 | | |
253 | | - | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
254 | 263 | | |
255 | 264 | | |
256 | | - | |
| 265 | + | |
257 | 266 | | |
258 | 267 | | |
259 | 268 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
341 | 341 | | |
342 | 342 | | |
343 | 343 | | |
| 344 | + | |
344 | 345 | | |
345 | 346 | | |
346 | 347 | | |
| |||
355 | 356 | | |
356 | 357 | | |
357 | 358 | | |
358 | | - | |
359 | 359 | | |
360 | 360 | | |
361 | 361 | | |
| |||
386 | 386 | | |
387 | 387 | | |
388 | 388 | | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | | - | |
393 | | - | |
394 | | - | |
395 | 389 | | |
396 | 390 | | |
397 | 391 | | |
| |||
405 | 399 | | |
406 | 400 | | |
407 | 401 | | |
408 | | - | |
409 | | - | |
410 | | - | |
411 | | - | |
412 | | - | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
413 | 409 | | |
414 | 410 | | |
415 | 411 | | |
416 | 412 | | |
417 | 413 | | |
418 | 414 | | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
419 | 419 | | |
420 | 420 | | |
421 | 421 | | |
| |||
461 | 461 | | |
462 | 462 | | |
463 | 463 | | |
| 464 | + | |
464 | 465 | | |
465 | 466 | | |
466 | 467 | | |
| |||
475 | 476 | | |
476 | 477 | | |
477 | 478 | | |
478 | | - | |
479 | 479 | | |
480 | 480 | | |
481 | 481 | | |
| |||
519 | 519 | | |
520 | 520 | | |
521 | 521 | | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
522 | 528 | | |
523 | 529 | | |
524 | 530 | | |
| |||
565 | 571 | | |
566 | 572 | | |
567 | 573 | | |
| 574 | + | |
568 | 575 | | |
569 | 576 | | |
570 | 577 | | |
| |||
577 | 584 | | |
578 | 585 | | |
579 | 586 | | |
580 | | - | |
581 | 587 | | |
582 | 588 | | |
583 | 589 | | |
| |||
621 | 627 | | |
622 | 628 | | |
623 | 629 | | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
624 | 636 | | |
625 | 637 | | |
626 | 638 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
77 | 91 | | |
78 | 92 | | |
79 | 93 | | |
| |||
99 | 113 | | |
100 | 114 | | |
101 | 115 | | |
102 | | - | |
| 116 | + | |
103 | 117 | | |
104 | 118 | | |
105 | 119 | | |
| |||
149 | 163 | | |
150 | 164 | | |
151 | 165 | | |
| 166 | + | |
152 | 167 | | |
153 | 168 | | |
0 commit comments