Skip to content

Commit 012f741

Browse files
authored
Merge branch 'main' into run-example-ci-configs-fix
2 parents 4d4e236 + 1d31ef4 commit 012f741

Some content is hidden

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

48 files changed

+708
-459
lines changed

.github/CODEOWNERS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# Specification files for platform maintainers
12
cibuildwheel/platforms/ios.py @freakboy3742
23
cibuildwheel/platforms/pyodide.py @hoodmane @ryanking13 @agriyakhetarpal
34
cibuildwheel/platforms/android.py @mhsmith
5+
6+
# Constraints files
7+
cibuildwheel/resources/constraints-pyodide*.txt @hoodmane @ryanking13 @agriyakhetarpal

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ jobs:
7676
- os: macos-13
7777
python_version: '3.13'
7878
test_select: ios
79-
- os: macos-15
79+
- os: macos-14 # See https://github.com/actions/runner-images/issues/12777
8080
python_version: '3.13'
8181
test_select: ios
8282
- os: macos-13

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
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.8
17+
rev: v0.12.10
1818
hooks:
1919
- id: ruff
2020
args: ["--fix", "--show-fixes"]
@@ -83,7 +83,7 @@ repos:
8383

8484

8585
- repo: https://github.com/python-jsonschema/check-jsonschema
86-
rev: 0.33.2
86+
rev: 0.33.3
8787
hooks:
8888
- id: check-dependabot
8989
- id: check-github-actions

README.md

Lines changed: 31 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -58,17 +58,19 @@ Usage
5858

5959
| | Linux | macOS | Windows | Linux ARM | macOS ARM | Windows ARM | Android | iOS |
6060
|-----------------|-------|-------|---------|-----------|-----------|-------------|---------|-----|
61-
| GitHub Actions |||||| ✅² | ✅⁴ | ✅³ |
62-
| Azure Pipelines |||| || ✅² | ✅⁴ | ✅³ |
61+
| GitHub Actions |||||| ✅² | ✅⁴ | ✅³ |
62+
| Azure Pipelines |||| || ✅² | ✅⁴ | ✅³ |
6363
| Travis CI || ||| | | ✅⁴ | |
6464
| CircleCI ||| ||| | ✅⁴ | ✅³ |
6565
| Gitlab CI |||| ✅¹ || | ✅⁴ | ✅³ |
6666
| Cirrus CI |||||| | ✅⁴ | |
6767

6868
<sup[Requires emulation](https://cibuildwheel.pypa.io/en/stable/faq/#emulation), distributed separately. Other services may also support Linux ARM through emulation or third-party build hosts, but these are not tested in our CI.</sup><br>
6969
<sup[Uses cross-compilation](https://cibuildwheel.pypa.io/en/stable/faq/#windows-arm64). It is not possible to test `arm64` on this CI platform.</sup><br>
70-
<sup>³ Requires a macOS runner; runs tests on the simulator for the runner's architecture.</sup><br>
70+
<sup>³ Requires a macOS runner; runs tests on the simulator for the runner's architecture. </sup><br>
7171
<sup>⁴ Building for Android requires the runner to be Linux x86_64, macOS ARM64 or macOS x86_64. Testing has [additional requirements](https://cibuildwheel.pypa.io/en/stable/platforms/#android).</sup><br>
72+
<sup>⁵ The `macos-15` and `macos-latest` images are [incompatible with cibuildwheel at this time](platforms/#ios-system-requirements)</sup><br>
73+
7274
<!--intro-end-->
7375

7476
Example setup
@@ -97,7 +99,7 @@ jobs:
9799
- uses: actions/setup-python@v5
98100

99101
- name: Install cibuildwheel
100-
run: python -m pip install cibuildwheel==3.1.3
102+
run: python -m pip install cibuildwheel==3.1.4
101103

102104
- name: Build wheels
103105
run: python -m cibuildwheel --output-dir wheelhouse
@@ -178,8 +180,8 @@ Here are some repos that use cibuildwheel.
178180
| Name | CI | OS | Notes |
179181
|-----------------------------------|----|----|:------|
180182
| [scikit-learn][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | The machine learning library. A complex but clean config using many of cibuildwheel's features to build a large project with Cython and C++ extensions. |
181-
| [pytorch-fairseq][] | ![github icon][] | ![apple icon][] ![linux icon][] | Facebook AI Research Sequence-to-Sequence Toolkit written in Python. |
182183
| [duckdb][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | DuckDB is an analytical in-process SQL database management system |
184+
| [pytorch-fairseq][] | ![github icon][] | ![apple icon][] ![linux icon][] | Facebook AI Research Sequence-to-Sequence Toolkit written in Python. |
183185
| [NumPy][] | ![github icon][] ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | The fundamental package for scientific computing with Python. |
184186
| [Tornado][] | ![github icon][] | ![linux icon][] ![apple icon][] ![windows icon][] | Tornado is a Python web framework and asynchronous networking library. Uses stable ABI for a small C extension. |
185187
| [NCNN][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | ncnn is a high-performance neural network inference framework optimized for the mobile platform |
@@ -189,8 +191,8 @@ Here are some repos that use cibuildwheel.
189191
| [Kivy][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Open source UI framework written in Python, running on Windows, Linux, macOS, Android and iOS |
190192

191193
[scikit-learn]: https://github.com/scikit-learn/scikit-learn
192-
[pytorch-fairseq]: https://github.com/facebookresearch/fairseq
193194
[duckdb]: https://github.com/duckdb/duckdb
195+
[pytorch-fairseq]: https://github.com/facebookresearch/fairseq
194196
[NumPy]: https://github.com/numpy/numpy
195197
[Tornado]: https://github.com/tornadoweb/tornado
196198
[NCNN]: https://github.com/Tencent/ncnn
@@ -227,14 +229,32 @@ Changelog
227229

228230
<!-- [[[cog from readme_changelog import mini_changelog; print(mini_changelog()) ]]] -->
229231

232+
### v3.1.4
233+
234+
_19 August 2025_
235+
236+
- ✨ Add a `--clean-cache` command to clean up our cache (#2489)
237+
- 🛠 Update Python to 3.14rc2 and other patch version bumps (#2542, #2556)
238+
- 🛠 Update Pyodide to 0.28.2 (#2562, #2558)
239+
- 🐛 Fix resolution with `pyodide-build` when `dependency-versions` is set (#2548)
240+
- 🐛 Set `CMAKE_FIND_ROOT_PATH_MODE_PACKAGE` to `BOTH` on Android (#2547)
241+
- 🐛 Add `patchelf` dependency for platforms that can build Android wheels (#2552)
242+
- 🐛 Ignore empty values for `CIBW_ARCHS` like most other environment variables (#2541)
243+
- 💼 The `color` and `suggest_on_error` argparse options are now default in 3.14rc1+ (#2554)
244+
- 💼 Use the virtualenv release URL instead of blob URL (should be more robust) (#2555)
245+
- 🧪 For iOS, lowering to macos-14 is needed for now due to issues with GitHub's runner images (#2557)
246+
- 🧪 Split out platforms iOS and Android in our tests (#2519)
247+
- 🧪 Fix and enable doctests (#2546)
248+
- 📚 Improve our docs on free-threading (#2549)
249+
250+
230251
### v3.1.3
231252

232253
_1 August 2025_
233254

234255
- 🐛 Fix bug where "latest" dependencies couldn't update to pip 25.2 on Windows (#2537)
235-
- 🛠 Use pytest-rerunfailures to improve some of our iOS/Android tests (#2527, #2539)
236-
- 🛠 Remove some GraalPy Windows workarounds in our tests (#2501)
237-
256+
- 🧪 Use pytest-rerunfailures to improve some of our iOS/Android tests (#2527, #2539)
257+
- 🧪 Remove some GraalPy Windows workarounds in our tests (#2501)
238258

239259

240260
### v3.1.2
@@ -272,19 +292,10 @@ _23 July 2025_
272292
- 🛠 Fixed a typo in the 3.9 MUSL riscv64 identifier (`cp39-musllinux_ricv64` -> `cp39-musllinux_riscv64`) (#2490)
273293
- 🛠 Mistyping `--only` now shows the correct possibilities, and even suggests near matches on Python 3.14+ (#2499)
274294
- 🛠 Only support one output from the repair step on linux like other platforms; auditwheel fixed this over four years ago! (#2478)
275-
- 🛠 We now use pattern matching extensively (#2434)
295+
- 💼 We now use pattern matching extensively (#2434)
276296
- 📚 We now have platform maintainers for our special platforms and interpreters! (#2481)
277297

278-
279-
280-
### v3.0.1
281-
282-
_5 July 2025_
283-
284-
- 🛠 Updates CPython 3.14 prerelease to 3.14.0b3 (#2471)
285-
- ✨ Adds a CPython 3.14 prerelease iOS build (only when prerelease builds are [enabled](https://cibuildwheel.pypa.io/en/stable/options/#enable)) (#2475)
286-
287-
<!-- [[[end]]] (sum: Fe+mD8YR4+) -->
298+
<!-- [[[end]]] (sum: loynkRqdzf) -->
288299

289300
---
290301

azure-pipelines.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
pythonVersion: "3.11"
3333
testSelect: "native"
3434
ios_311:
35-
imageName: "macos-latest"
35+
imageName: "macos-14" # See https://github.com/actions/runner-images/issues/12777
3636
pythonVersion: "3.11"
3737
testSelect: "ios"
3838
android_macos_311:

bin/generate_schema.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,12 @@
66

77
import argparse
88
import copy
9-
import functools
109
import json
11-
import sys
1210
from typing import Any
1311

1412
import yaml
1513

16-
make_parser = functools.partial(argparse.ArgumentParser, allow_abbrev=False)
17-
if sys.version_info >= (3, 14):
18-
make_parser = functools.partial(make_parser, color=True, suggest_on_error=True)
19-
parser = make_parser()
14+
parser = argparse.ArgumentParser(allow_abbrev=False)
2015
parser.add_argument("--schemastore", action="store_true", help="Generate schema_store version")
2116
args = parser.parse_args()
2217

bin/run_tests.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33

44
import argparse
5-
import functools
65
import os
76
import subprocess
87
import sys
@@ -14,10 +13,7 @@
1413
else:
1514
default_cpu_count = os.process_cpu_count() or 2
1615

17-
make_parser = functools.partial(argparse.ArgumentParser, allow_abbrev=False)
18-
if sys.version_info >= (3, 14):
19-
make_parser = functools.partial(make_parser, color=True, suggest_on_error=True)
20-
parser = make_parser()
16+
parser = argparse.ArgumentParser(allow_abbrev=False)
2117
parser.add_argument(
2218
"--run-podman", action="store_true", default=False, help="run podman tests (linux only)"
2319
)

bin/sample_build.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33

44
import argparse
5-
import functools
65
import os
76
import subprocess
87
import sys
@@ -13,10 +12,7 @@
1312
# move cwd to the project root
1413
os.chdir(Path(__file__).resolve().parents[1])
1514

16-
make_parser = functools.partial(argparse.ArgumentParser, allow_abbrev=False)
17-
if sys.version_info >= (3, 14):
18-
make_parser = functools.partial(make_parser, color=True, suggest_on_error=True)
19-
parser = make_parser(description="Runs a sample build")
15+
parser = argparse.ArgumentParser(description="Runs a sample build", allow_abbrev=False)
2016
parser.add_argument("project_python_path", nargs="?", default="test.test_0_basic.basic_project")
2117

2218
options = parser.parse_args()

bin/update_virtualenv.py

Lines changed: 33 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,18 @@
44
import dataclasses
55
import difflib
66
import logging
7-
import subprocess
87
import tomllib
98
from pathlib import Path
109
from typing import Final
1110

1211
import click
1312
import rich
14-
from packaging.version import InvalidVersion, Version
13+
from packaging.version import Version
1514
from rich.logging import RichHandler
1615
from rich.syntax import Syntax
1716

17+
from cibuildwheel.extra import github_api_request
18+
1819
log = logging.getLogger("cibw")
1920

2021
# Looking up the dir instead of using utils.resources_dir
@@ -30,32 +31,26 @@
3031

3132
@dataclasses.dataclass(frozen=True, order=True)
3233
class VersionTuple:
34+
name: str
35+
download_url: str
3336
version: Version
34-
version_string: str
35-
36-
37-
def git_ls_remote_versions(url: str) -> list[VersionTuple]:
38-
versions: list[VersionTuple] = []
39-
tags = subprocess.run(
40-
["git", "ls-remote", "--tags", url], check=True, text=True, capture_output=True
41-
).stdout.splitlines()
42-
for tag in tags:
43-
_, ref = tag.split()
44-
assert ref.startswith("refs/tags/")
45-
version_string = ref[10:]
46-
try:
47-
version = Version(version_string)
48-
if version.is_devrelease:
49-
log.info("Ignoring development release %r", str(version))
50-
continue
51-
if version.is_prerelease:
52-
log.info("Ignoring pre-release %r", str(version))
53-
continue
54-
versions.append(VersionTuple(version, version_string))
55-
except InvalidVersion:
56-
log.warning("Ignoring ref %r", ref)
57-
versions.sort(reverse=True)
58-
return versions
37+
38+
39+
def get_latest_virtualenv_release() -> VersionTuple:
40+
response = github_api_request("repos/pypa/get-virtualenv/releases/latest")
41+
tag_name = response["tag_name"]
42+
43+
asset = next(
44+
(asset for asset in response["assets"] if asset["name"] == "virtualenv.pyz"),
45+
None,
46+
)
47+
if not asset:
48+
msg = "No asset named 'virtualenv.pyz' found in the latest release of get-virtualenv."
49+
raise RuntimeError(msg)
50+
51+
return VersionTuple(
52+
version=Version(tag_name), name=tag_name, download_url=asset["browser_download_url"]
53+
)
5954

6055

6156
@click.command()
@@ -78,14 +73,20 @@ def update_virtualenv(force: bool, level: str) -> None:
7873
with toml_file_path.open("rb") as f:
7974
configurations = tomllib.load(f)
8075
default = configurations.pop("default")
81-
version = str(default["version"])
82-
versions = git_ls_remote_versions(GET_VIRTUALENV_GITHUB)
83-
if versions[0].version > Version(version):
84-
version = versions[0].version_string
76+
local_version = str(default["version"])
77+
78+
latest_release = get_latest_virtualenv_release()
79+
80+
if latest_release.version > Version(local_version):
81+
version = latest_release.name
82+
url = latest_release.download_url
83+
else:
84+
version = local_version
85+
url = default["url"]
8586

8687
configurations["default"] = {
8788
"version": version,
88-
"url": GET_VIRTUALENV_URL_TEMPLATE.format(version=version),
89+
"url": url,
8990
}
9091
result_toml = "".join(
9192
f'{key} = {{ version = "{value["version"]}", url = "{value["url"]}" }}\n'

cibuildwheel/__init__.py

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

0 commit comments

Comments
 (0)