Skip to content

Commit 962ff92

Browse files
authored
Merge branch 'main' into add-falcon-to-working-examples
2 parents 4d3d6d4 + e2c7102 commit 962ff92

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+556
-391
lines changed

.cirrus.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ linux_aarch64_task:
4646
<<: *RUN_TESTS
4747

4848
windows_x86_task:
49-
# The task takes ~55 minutes while the timeout happens
50-
# after 60 minutes by default, let's allow some wiggle room.
49+
# The task takes ~55 minutes while the timeout happens after 60 minutes by default,
50+
# let's allow some wiggle room.
5151
timeout_in: 120m
5252
windows_container:
5353
image: cirrusci/windowsservercore:visualstudio2022

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
cibuildwheel/platforms/ios.py @freakboy3742
22
cibuildwheel/platforms/pyodide.py @hoodmane @ryanking13 @agriyakhetarpal
3+
cibuildwheel/platforms/android.py @mhsmith

.github/workflows/test.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ jobs:
5151
needs: lint
5252
runs-on: ${{ matrix.os }}
5353
strategy:
54+
fail-fast: false
5455
matrix:
5556
os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, windows-11-arm, macos-13, macos-15]
5657
python_version: ['3.13']
@@ -97,6 +98,7 @@ jobs:
9798
uv sync --no-dev --group test
9899
99100
- uses: joerick/[email protected]
101+
100102
- name: Set CIBW_ENABLE
101103
shell: bash
102104
run: |
@@ -134,16 +136,16 @@ jobs:
134136
with:
135137
package-dir: sample_proj
136138
output-dir: wheelhouse_only
137-
only: cp312-${{ runner.os == 'Linux' && (runner.arch == 'ARM64' && 'manylinux_aarch64' || 'manylinux_x86_64') || (runner.os == 'Windows' && 'win_amd64' || 'macosx_x86_64') }}
139+
only: cp313-${{ runner.os == 'Linux' && (runner.arch == 'ARM64' && 'manylinux_aarch64' || 'manylinux_x86_64') || (runner.os == 'Windows' && 'win_amd64' || 'macosx_x86_64') }}
138140

139141
- name: Create custom configuration file
140142
shell: bash
141143
run: |
142144
cat > sample_proj/cibw.toml <<EOF
143145
[tool.cibuildwheel]
144-
# Only build on CPython 3.12 on native arch
146+
# Only build on CPython 3.13 on native arch
145147
archs = ["native"]
146-
build = "cp312-*"
148+
build = "cp313-*"
147149
# Skip musllinux
148150
skip = "*-musllinux*"
149151
EOF

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ repos:
1414
- id: trailing-whitespace
1515

1616
- repo: https://github.com/astral-sh/ruff-pre-commit
17-
rev: v0.12.4
17+
rev: v0.12.5
1818
hooks:
1919
- id: ruff
2020
args: ["--fix", "--show-fixes"]

README.md

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ jobs:
9797
- uses: actions/setup-python@v5
9898

9999
- name: Install cibuildwheel
100-
run: python -m pip install cibuildwheel==3.1.0
100+
run: python -m pip install cibuildwheel==3.1.2
101101

102102
- name: Build wheels
103103
run: python -m cibuildwheel --output-dir wheelhouse
@@ -227,6 +227,27 @@ Changelog
227227

228228
<!-- [[[cog from readme_changelog import mini_changelog; print(mini_changelog()) ]]] -->
229229

230+
### v3.1.2
231+
232+
_29 July 2025_
233+
234+
- ⚠️ Add an error if `CIBW_FREE_THREADING_SUPPORT` is set; you are likely missing 3.13t wheels, please use the `enable`/`CIBW_ENABLE` (#2520)
235+
- 🛠 `riscv64` now enabled if you target that architecture, it's now supported on PyPI (#2509)
236+
- 🛠 Add warning when using `cpython-experimental-riscv64` (no longer needed) (#2526, #2528)
237+
- 🛠 iOS versions bumped, fixing issues with 3.14 (now RC 1) (#2530)
238+
- 🐛 Fix bug in Android running wheel from our GitHub Action (#2517)
239+
- 🐛 Fix warning when using `test-skip` of `"*-macosx_universal2:arm64"` (#2522)
240+
- 🐛 Fix incorrect number of wheels reported in logs, again (#2517)
241+
- 📚 We welcome our Android platform maintainer (#2516)
242+
243+
244+
### v3.1.1
245+
246+
_24 July 2025_
247+
248+
- 🐛 Fix a bug showing an incorrect wheel count at the end of execution, and misrepresenting test-only runs in the GitHub Action summary (#2512)
249+
- 📚 Docs fix (#2510)
250+
230251
### v3.1.0
231252

232253
_23 July 2025_
@@ -291,20 +312,7 @@ See @henryiii's [release post](https://iscinumpy.dev/post/cibuildwheel-3-0-0/) f
291312
- 📚 Docs now primarily use the pyproject.toml name of options, rather than the environment variable name. (#2389)
292313
- 📚 README table now matches docs and auto-updates. (#2427, #2428)
293314

294-
### v2.23.3
295-
296-
_26 April 2025_
297-
298-
- 🛠 Dependency updates, including Python 3.13.3 (#2371)
299-
300-
### v2.23.2
301-
302-
_24 March 2025_
303-
304-
- 🐛 Workaround an issue with pyodide builds when running cibuildwheel with a Python that was installed via UV (#2328 via #2331)
305-
- 🛠 Dependency updates, including a manylinux update that fixes an ['undefined symbol' error](https://github.com/pypa/manylinux/issues/1760) in gcc-toolset (#2334)
306-
307-
<!-- [[[end]]] (sum: HkLT9ZhhtV) -->
315+
<!-- [[[end]]] (sum: sVC5DNuhaF) -->
308316

309317
---
310318

@@ -339,6 +347,7 @@ Platform maintainers:
339347
- Hood Chatham [@hoodmane](https://github.com/hoodmane) (Pyodide)
340348
- Gyeongjae Choi [@ryanking13](https://github.com/ryanking13) (Pyodide)
341349
- Tim Felgentreff [@timfel](https://github.com/timfel) (GraalPy)
350+
- Malcolm Smith [@mhsmith](https://github.com/mhsmith) (Android)
342351

343352
Credits
344353
-------

cibuildwheel/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "3.1.0"
1+
__version__ = "3.1.2"

cibuildwheel/__main__.py

Lines changed: 57 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import textwrap
1010
import traceback
1111
import typing
12-
from collections.abc import Iterable, Sequence
12+
from collections.abc import Generator, Iterable, Sequence
1313
from pathlib import Path
1414
from tempfile import mkdtemp
1515
from typing import Any, Literal, TextIO
@@ -369,41 +369,61 @@ def print_preamble(platform: str, options: Options, identifiers: Sequence[str])
369369
print(f"Cache folder: {CIBW_CACHE_PATH}")
370370
print()
371371

372-
warnings = detect_warnings(options=options, identifiers=identifiers)
372+
warnings = detect_warnings(options=options)
373373
for warning in warnings:
374374
log.warning(warning)
375375

376-
print("Here we go!\n")
376+
error_list = list(detect_errors(options=options, identifiers=identifiers))
377+
if error_list:
378+
for error in error_list:
379+
log.error(error)
380+
msg = "\n".join(error_list)
381+
raise errors.ConfigurationError(msg)
377382

383+
print("Here we go!\n")
378384

379-
def detect_warnings(*, options: Options, identifiers: Iterable[str]) -> list[str]:
380-
warnings = []
381385

382-
python_version_deprecation = ((3, 11), 3)
383-
if sys.version_info[:2] < python_version_deprecation[0]:
384-
python_version = ".".join(map(str, python_version_deprecation[0]))
385-
msg = (
386-
f"cibuildwheel {python_version_deprecation[1]} will require Python {python_version}+, "
387-
"please upgrade the Python version used to run cibuildwheel. "
388-
"This does not affect the versions you can target when building wheels. See: https://cibuildwheel.pypa.io/en/stable/#what-does-it-do"
386+
def detect_errors(*, options: Options, identifiers: Iterable[str]) -> Generator[str, None, None]:
387+
# Check for deprecated CIBW_FREE_THREADED_SUPPORT environment variable
388+
if "CIBW_FREE_THREADED_SUPPORT" in os.environ:
389+
yield (
390+
"CIBW_FREE_THREADED_SUPPORT environment variable is no longer supported. "
391+
'Use tool.cibuildwheel.enable = ["cpython-freethreading"] in pyproject.toml '
392+
"or set CIBW_ENABLE=cpython-freethreading instead."
389393
)
390-
warnings.append(msg)
391394

392-
# warn about deprecated {python} and {pip}
395+
# Deprecated {python} and {pip}
393396
for option_name in ["test_command", "before_build"]:
394397
option_values = [getattr(options.build_options(i), option_name) for i in identifiers]
395398

396399
if any(o and ("{python}" in o or "{pip}" in o) for o in option_values):
397400
# Reminder: in an f-string, double braces means literal single brace
398-
msg = (
401+
yield (
399402
f"{option_name}: '{{python}}' and '{{pip}}' are no longer supported "
400403
"and have been removed in cibuildwheel 3. Simply use 'python' or 'pip' instead."
401404
)
402-
raise errors.ConfigurationError(msg)
405+
406+
407+
def detect_warnings(*, options: Options) -> Generator[str, None, None]:
408+
python_version_deprecation = ((3, 11), 3)
409+
if sys.version_info[:2] < python_version_deprecation[0]:
410+
python_version = ".".join(map(str, python_version_deprecation[0]))
411+
yield (
412+
f"cibuildwheel {python_version_deprecation[1]} will require Python {python_version}+, "
413+
"please upgrade the Python version used to run cibuildwheel. "
414+
"This does not affect the versions you can target when building wheels. See: https://cibuildwheel.pypa.io/en/stable/#what-does-it-do"
415+
)
403416

404417
build_selector = options.globals.build_selector
405418
test_selector = options.globals.test_selector
406419

420+
if EnableGroup.CPythonExperimentalRiscV64 in build_selector.enable:
421+
yield (
422+
"'cpython-experimental-riscv64' enable is deprecated and will be removed in a future version. "
423+
"It should be removed from tool.cibuildwheel.enable in pyproject.toml "
424+
"or CIBW_ENABLE environment variable."
425+
)
426+
407427
all_valid_identifiers = [
408428
config.identifier
409429
for module in ALL_PLATFORM_MODULES.values()
@@ -417,27 +437,25 @@ def detect_warnings(*, options: Options, identifiers: Iterable[str]) -> list[str
417437
identifier for identifier in all_valid_identifiers if enabled_selector(identifier)
418438
]
419439

420-
warnings += check_for_invalid_selectors(
440+
yield from check_for_invalid_selectors(
421441
selector_name="build",
422442
selector_value=build_selector.build_config,
423443
all_valid_identifiers=all_valid_identifiers,
424444
all_enabled_identifiers=all_enabled_identifiers,
425445
)
426-
warnings += check_for_invalid_selectors(
446+
yield from check_for_invalid_selectors(
427447
selector_name="skip",
428448
selector_value=build_selector.skip_config,
429449
all_valid_identifiers=all_valid_identifiers,
430450
all_enabled_identifiers=all_enabled_identifiers,
431451
)
432-
warnings += check_for_invalid_selectors(
452+
yield from check_for_invalid_selectors(
433453
selector_name="test_skip",
434454
selector_value=test_selector.skip_config,
435455
all_valid_identifiers=all_valid_identifiers,
436456
all_enabled_identifiers=all_enabled_identifiers,
437457
)
438458

439-
return warnings
440-
441459

442460
def check_for_invalid_selectors(
443461
*,
@@ -449,17 +467,31 @@ def check_for_invalid_selectors(
449467
warnings = []
450468

451469
for selector in selector_value.split():
452-
if not any(selector_matches(selector, i) for i in all_enabled_identifiers):
470+
selector_ = selector
471+
if selector_name == "test_skip":
472+
# macosx_universal2 uses an additional identifier for tests which ends with ":{arch}"
473+
values = selector.split(":")
474+
universal2_identifiers = filter(
475+
lambda x: x.endswith("-macosx_universal2"), all_valid_identifiers
476+
)
477+
if len(values) == 2 and any(
478+
selector_matches(selector_, f"{i}:{arch}")
479+
for i in universal2_identifiers
480+
for arch in ["arm64", "x86_64"]
481+
):
482+
# just ignore the arch part in the rest of the check
483+
selector_ = values[0]
484+
if not any(selector_matches(selector_, i) for i in all_enabled_identifiers):
453485
msg = f"Invalid {selector_name} selector: {selector!r}. "
454486
error_type: type = errors.ConfigurationError
455487

456-
if any(selector_matches(selector, i) for i in all_valid_identifiers):
488+
if any(selector_matches(selector_, i) for i in all_valid_identifiers):
457489
msg += "This selector matches a group that wasn't enabled. Enable it using the `enable` option or remove this selector. "
458490

459-
if "p2" in selector or "p35" in selector:
491+
if "p2" in selector_ or "p35" in selector_:
460492
msg += f"cibuildwheel 3.x no longer supports Python < 3.8. Please use the 1.x series or update `{selector_name}`. "
461493
error_type = errors.DeprecationError
462-
if "p36" in selector or "p37" in selector:
494+
if "p36" in selector_ or "p37" in selector_:
463495
msg += f"cibuildwheel 3.x no longer supports Python < 3.8. Please use the 2.x series or update `{selector_name}`. "
464496
error_type = errors.DeprecationError
465497

cibuildwheel/logger.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -242,11 +242,11 @@ def print_summary(self, *, options: "Options") -> Generator[None, None, None]:
242242
github_summary = self._github_step_summary(duration=duration, options=options)
243243
Path(summary_path).write_text(filter_ansi_codes(github_summary), encoding="utf-8")
244244

245-
n = len(self.summary)
246-
s = "s" if n > 1 else ""
245+
n_wheels = len([info for info in self.summary if info.filename])
246+
s = "s" if n_wheels > 1 else ""
247247
duration_str = humanize.naturaldelta(duration)
248248
print()
249-
self._start_fold_group(f"{n} wheel{s} produced in {duration_str}")
249+
self._start_fold_group(f"{n_wheels} wheel{s} produced in {duration_str}")
250250
for build_info in self.summary:
251251
print(" ", build_info)
252252
self._end_fold_group()
@@ -320,7 +320,7 @@ def _github_step_summary(self, duration: float, options: "Options") -> str:
320320
n_wheels = len([b for b in self.summary if b.filename])
321321
wheel_rows = "\n".join(
322322
"<tr>"
323-
f"<td nowrap>{'<samp>' + b.filename.name + '</samp>' if b.filename else '*Build only*'}</td>"
323+
f"<td nowrap>{'<samp>' + b.filename.name + '</samp>' if b.filename else '*Test only*'}</td>"
324324
f"<td nowrap>{b.size or 'N/A'}</td>"
325325
f"<td nowrap><samp>{b.identifier}</samp></td>"
326326
f"<td nowrap>{humanize.naturaldelta(b.duration)}</td>"

cibuildwheel/options.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,7 @@ def globals(self) -> GlobalOptions:
665665
build_config = args.only
666666
skip_config = ""
667667
architectures = Architecture.all_archs(self.platform)
668-
enable = set(EnableGroup)
668+
enable |= EnableGroup.all_groups()
669669

670670
build_selector = BuildSelector(
671671
build_config=build_config,

cibuildwheel/platforms/android.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import shlex
77
import shutil
88
import subprocess
9+
import sys
910
from collections.abc import Iterable, Iterator
1011
from dataclasses import dataclass
1112
from os.path import relpath
@@ -21,7 +22,7 @@
2122
from elftools.elf.elffile import ELFFile
2223
from filelock import FileLock
2324

24-
from .. import errors, platforms
25+
from .. import errors, platforms # pylint: disable=cyclic-import
2526
from ..architecture import Architecture, arch_synonym
2627
from ..frontend import get_build_frontend_extra_flags, parse_config_settings
2728
from ..logger import log
@@ -517,7 +518,7 @@ def repair_default(
517518
f"${{ORIGIN}}/{relpath(libs_dir, path.parent)}",
518519
path,
519520
)
520-
call("wheel", "pack", unpacked_dir, "-d", repaired_wheel_dir)
521+
call(sys.executable, "-m", "wheel", "pack", unpacked_dir, "-d", repaired_wheel_dir)
521522

522523

523524
def elf_file_filter(paths: Iterable[Path]) -> Iterator[tuple[Path, ELFFile]]:

0 commit comments

Comments
 (0)