Skip to content

Commit 08b2aee

Browse files
authored
Merge branch 'main' into riscv64
2 parents 4f6d305 + c53e541 commit 08b2aee

31 files changed

+600
-422
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
attestations: write
2828

2929
steps:
30-
- uses: actions/download-artifact@v5
30+
- uses: actions/download-artifact@v6
3131
with:
3232
name: Packages
3333
path: dist

.github/workflows/test.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ jobs:
9494
python-version: ${{ matrix.python_version }}
9595
allow-prereleases: true
9696

97-
- uses: astral-sh/setup-uv@v6
97+
- uses: astral-sh/setup-uv@v7
9898

9999
- name: Free up disk space
100100
if: runner.os == 'Linux'
@@ -196,7 +196,7 @@ jobs:
196196
run: |
197197
test $(find wheelhouse_only -name '*.whl' | wc -l) -eq 1
198198
199-
- uses: actions/upload-artifact@v4
199+
- uses: actions/upload-artifact@v5
200200
with:
201201
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
202202
path: wheelhouse/*.whl
@@ -216,7 +216,7 @@ jobs:
216216
- uses: actions/setup-python@v6
217217
with:
218218
python-version: "3.x"
219-
- uses: astral-sh/setup-uv@v6
219+
- uses: astral-sh/setup-uv@v7
220220
- name: Install dependencies
221221
run: uv sync --no-dev --group test
222222
- name: Get qemu emulated architectures
@@ -239,7 +239,7 @@ jobs:
239239
- uses: actions/setup-python@v6
240240
with:
241241
python-version: "3.x"
242-
- uses: astral-sh/setup-uv@v6
242+
- uses: astral-sh/setup-uv@v7
243243
- name: Install dependencies
244244
run: uv sync --no-dev --group test
245245

@@ -260,7 +260,7 @@ jobs:
260260
name: Install Python 3.12
261261
with:
262262
python-version: '3.12'
263-
- uses: astral-sh/setup-uv@v6
263+
- uses: astral-sh/setup-uv@v7
264264

265265
- name: Install dependencies
266266
run: uv sync --no-dev --group test

.github/workflows/update-dependencies.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232

3333
- uses: actions/checkout@v5
3434

35-
- uses: wntrblm/nox@2025.05.01
35+
- uses: wntrblm/nox@2025.10.16
3636

3737
- name: "Run update: dependencies"
3838
run: nox --force-color -s update_constraints

.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.14.0
17+
rev: v0.14.2
1818
hooks:
1919
- id: ruff-check
2020
args: ["--fix", "--show-fixes"]
@@ -83,7 +83,7 @@ repos:
8383

8484

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

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ Usage
7070
<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>
7171
<sup>³ Requires a macOS runner; runs tests on the simulator for the runner's architecture. </sup><br>
7272
<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>
73-
<sup>⁵ The `macos-15` and `macos-latest` images are [incompatible with cibuildwheel at this time](platforms/#ios-system-requirements)</sup><br> when building iOS wheels.
73+
<sup>⁵ The `macos-15` and `macos-latest` images are [incompatible with cibuildwheel at this time](https://cibuildwheel.pypa.io/en/stable/platforms/#ios-system-requirements) when building iOS wheels.</sup><br>
7474

7575
<!--intro-end-->
7676

action.yml

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ inputs:
1717
description: 'Build a specific wheel only. No need for arch/platform if this is set'
1818
required: false
1919
default: ''
20+
extras:
21+
description: 'Comma-separated list of extras to install'
22+
required: false
23+
default: ''
2024
branding:
2125
icon: package
2226
color: yellow
@@ -42,6 +46,10 @@ runs:
4246
from pathlib import Path
4347
from subprocess import run
4448
49+
EXTRAS = set(e.strip() for e in "${{ inputs.extras }}".split(",") if e.strip())
50+
if sys.platform == "linux":
51+
EXTRAS.discard("uv")
52+
4553
4654
class EnvBuilder(venv.EnvBuilder):
4755
def __init__(self):
@@ -53,7 +61,10 @@ runs:
5361
def post_setup(self, context):
5462
super().post_setup(context)
5563
self.bin_path = Path(context.env_exe).parent
56-
run([sys.executable, "-m", "pip", "--python", context.env_exe, "install", r"${{ github.action_path }}"], check=True)
64+
install_spec = r"${{ github.action_path }}"
65+
if EXTRAS:
66+
install_spec += f"[{','.join(sorted(EXTRAS))}]"
67+
run([sys.executable, "-m", "pip", "--python", context.env_exe, "install", install_spec], check=True)
5768
5869
5970
print("::group::Install cibuildwheel")
@@ -62,30 +73,47 @@ runs:
6273
shutil.rmtree(venv_path)
6374
builder = EnvBuilder()
6475
builder.create(venv_path)
65-
cibw_path = [path for path in builder.bin_path.glob("cibuildwheel*") if path.stem == "cibuildwheel"][0]
76+
exposed_binaries = {"cibuildwheel"}
77+
if "uv" in EXTRAS:
78+
exposed_binaries.add("uv")
79+
clean_bin_path = builder.bin_path.parent / f"{builder.bin_path.name}.clean"
80+
clean_bin_path.mkdir()
81+
for path in list(builder.bin_path.iterdir()):
82+
if path.stem in exposed_binaries:
83+
try:
84+
os.symlink(path, clean_bin_path / path.name)
85+
except OSError:
86+
import shutil
87+
88+
shutil.copy2(path, clean_bin_path / path.name)
89+
full_path = f"{clean_bin_path}{os.pathsep}{os.environ['PATH']}"
6690
with open(os.environ["GITHUB_OUTPUT"], "at") as f:
67-
f.write(f"cibw-path={cibw_path}\n")
91+
f.write(f"updated-path={full_path}\n")
6892
print("::endgroup::")
6993
EOF
7094
shell: bash
7195

7296
# Redirecting stderr to stdout to fix interleaving issue in Actions.
7397
- run: >
74-
"${{ steps.cibw.outputs.cibw-path }}"
98+
cibuildwheel
7599
"${{ inputs.package-dir }}"
76100
${{ inputs.output-dir != '' && format('--output-dir "{0}"', inputs.output-dir) || ''}}
77101
${{ inputs.config-file != '' && format('--config-file "{0}"', inputs.config-file) || ''}}
78102
${{ inputs.only != '' && format('--only "{0}"', inputs.only) || ''}}
79103
2>&1
104+
env:
105+
PATH: "${{ steps.cibw.outputs.updated-path }}"
80106
shell: bash
81107
if: runner.os != 'Windows'
82108
83109
# Windows needs powershell to interact nicely with Meson
84110
- run: >
85-
& "${{ steps.cibw.outputs.cibw-path }}"
111+
cibuildwheel
86112
"${{ inputs.package-dir }}"
87113
${{ inputs.output-dir != '' && format('--output-dir "{0}"', inputs.output-dir) || ''}}
88114
${{ inputs.config-file != '' && format('--config-file "{0}"', inputs.config-file) || ''}}
89115
${{ inputs.only != '' && format('--only "{0}"', inputs.only) || ''}}
116+
env:
117+
PATH: "${{ steps.cibw.outputs.updated-path }}"
90118
shell: pwsh
91119
if: runner.os == 'Windows'

cibuildwheel/platforms/android.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -617,8 +617,11 @@ def test_wheel(state: BuildState, wheel: Path) -> None:
617617

618618
# Parse test-command.
619619
test_args = shlex.split(test_command)
620-
if test_args[:2] in [["python", "-c"], ["python", "-m"]]:
621-
test_args[:3] = [test_args[1], test_args[2], "--"]
620+
if test_args[0] in ["python", "python3"] and any(arg in test_args for arg in ["-c", "-m"]):
621+
# Forward the args to the CPython testbed script. We require '-c' or '-m'
622+
# to be in the command, because without those flags, the testbed script
623+
# will prepend '-m test', which will run Python's own test suite.
624+
del test_args[0]
622625
elif test_args[0] in ["pytest"]:
623626
# We transform some commands into the `python -m` form, but this is deprecated.
624627
msg = (
@@ -627,11 +630,11 @@ def test_wheel(state: BuildState, wheel: Path) -> None:
627630
"If this works, all you need to do is add that to your test command."
628631
)
629632
log.warning(msg)
630-
test_args[:1] = ["-m", test_args[0], "--"]
633+
test_args.insert(0, "-m")
631634
else:
632635
msg = (
633636
f"Test command {test_command!r} is not supported on Android. "
634-
f"Supported commands are 'python -m' and 'python -c'."
637+
f"Command must begin with 'python' or 'python3', and contain '-m' or '-c'."
635638
)
636639
raise errors.FatalError(msg)
637640

@@ -646,6 +649,7 @@ def test_wheel(state: BuildState, wheel: Path) -> None:
646649
"--cwd",
647650
cwd_dir,
648651
*(["-v"] if state.options.build_verbosity > 0 else []),
652+
"--",
649653
*test_args,
650654
env=state.build_env,
651655
)

cibuildwheel/projectfiles.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def visit_keyword(self, node: ast.keyword) -> None:
5050
)
5151

5252
match node:
53-
case ast.keyword(arg="python_requires", value=ast.Constant(value=str(version))):
53+
case ast.keyword(arg="python_requires", value=ast.Constant(value=str() as version)):
5454
if unnested or name_main_unnested:
5555
self.requires_python = version
5656

cibuildwheel/resources/_cross_venv.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,16 +68,20 @@ def cross_getandroidapilevel() -> int:
6868

6969
# sysconfig ###############################################################
7070
#
71-
# We don't change the actual sys.base_prefix and base_exec_prefix, because that
72-
# could have unpredictable effects. Instead, we change the internal variables
73-
# used to generate sysconfig.get_path("include").
74-
exec_prefix = sysconfig.get_config_var("exec_prefix")
75-
sysconfig._BASE_PREFIX = sysconfig._BASE_EXEC_PREFIX = exec_prefix # type: ignore[attr-defined]
76-
77-
# Reload the sysconfigdata file, generating its name from sys.abiflags,
71+
# Load the sysconfigdata file, generating its name from sys.abiflags,
7872
# sys.platform, and sys.implementation._multiarch.
7973
sysconfig._init_config_vars() # type: ignore[attr-defined]
8074

75+
# We don't change the actual sys.base_prefix and base_exec_prefix, because that
76+
# could have unpredictable effects. Instead, we change the sysconfig variables
77+
# used by sysconfig.get_paths().
78+
vars = sysconfig.get_config_vars()
79+
try:
80+
host_prefix = vars["host_prefix"] # This variable was added in Python 3.14.
81+
except KeyError:
82+
host_prefix = vars["exec_prefix"]
83+
vars["installed_base"] = vars["installed_platbase"] = host_prefix
84+
8185
# sysconfig.get_platform, which determines the wheel tag, is implemented in terms of
8286
# sys.platform, sysconfig.get_config_var("ANDROID_API_LEVEL") (see localized_vars in
8387
# android.py), and os.uname.

cibuildwheel/resources/build-platforms.toml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -161,12 +161,12 @@ python_configurations = [
161161
{ identifier = "cp312-macosx_x86_64", version = "3.12", url = "https://www.python.org/ftp/python/3.12.10/python-3.12.10-macos11.pkg" },
162162
{ identifier = "cp312-macosx_arm64", version = "3.12", url = "https://www.python.org/ftp/python/3.12.10/python-3.12.10-macos11.pkg" },
163163
{ identifier = "cp312-macosx_universal2", version = "3.12", url = "https://www.python.org/ftp/python/3.12.10/python-3.12.10-macos11.pkg" },
164-
{ identifier = "cp313-macosx_x86_64", version = "3.13", url = "https://www.python.org/ftp/python/3.13.8/python-3.13.8-macos11.pkg" },
165-
{ identifier = "cp313-macosx_arm64", version = "3.13", url = "https://www.python.org/ftp/python/3.13.8/python-3.13.8-macos11.pkg" },
166-
{ identifier = "cp313-macosx_universal2", version = "3.13", url = "https://www.python.org/ftp/python/3.13.8/python-3.13.8-macos11.pkg" },
167-
{ identifier = "cp313t-macosx_x86_64", version = "3.13", url = "https://www.python.org/ftp/python/3.13.8/python-3.13.8-macos11.pkg" },
168-
{ identifier = "cp313t-macosx_arm64", version = "3.13", url = "https://www.python.org/ftp/python/3.13.8/python-3.13.8-macos11.pkg" },
169-
{ identifier = "cp313t-macosx_universal2", version = "3.13", url = "https://www.python.org/ftp/python/3.13.8/python-3.13.8-macos11.pkg" },
164+
{ identifier = "cp313-macosx_x86_64", version = "3.13", url = "https://www.python.org/ftp/python/3.13.9/python-3.13.9-macos11.pkg" },
165+
{ identifier = "cp313-macosx_arm64", version = "3.13", url = "https://www.python.org/ftp/python/3.13.9/python-3.13.9-macos11.pkg" },
166+
{ identifier = "cp313-macosx_universal2", version = "3.13", url = "https://www.python.org/ftp/python/3.13.9/python-3.13.9-macos11.pkg" },
167+
{ identifier = "cp313t-macosx_x86_64", version = "3.13", url = "https://www.python.org/ftp/python/3.13.9/python-3.13.9-macos11.pkg" },
168+
{ identifier = "cp313t-macosx_arm64", version = "3.13", url = "https://www.python.org/ftp/python/3.13.9/python-3.13.9-macos11.pkg" },
169+
{ identifier = "cp313t-macosx_universal2", version = "3.13", url = "https://www.python.org/ftp/python/3.13.9/python-3.13.9-macos11.pkg" },
170170
{ identifier = "cp314-macosx_x86_64", version = "3.14", url = "https://www.python.org/ftp/python/3.14.0/python-3.14.0-macos11.pkg" },
171171
{ identifier = "cp314-macosx_arm64", version = "3.14", url = "https://www.python.org/ftp/python/3.14.0/python-3.14.0-macos11.pkg" },
172172
{ identifier = "cp314-macosx_universal2", version = "3.14", url = "https://www.python.org/ftp/python/3.14.0/python-3.14.0-macos11.pkg" },
@@ -183,8 +183,8 @@ python_configurations = [
183183
{ identifier = "pp311-macosx_arm64", version = "3.11", url = "https://downloads.python.org/pypy/pypy3.11-v7.3.20-macos_arm64.tar.bz2" },
184184
{ identifier = "gp311_242-macosx_x86_64", version = "3.11", url = "https://github.com/oracle/graalpython/releases/download/graal-24.2.2/graalpy-24.2.2-macos-amd64.tar.gz" },
185185
{ identifier = "gp311_242-macosx_arm64", version = "3.11", url = "https://github.com/oracle/graalpython/releases/download/graal-24.2.2/graalpy-24.2.2-macos-aarch64.tar.gz" },
186-
{ identifier = "gp312_250-macosx_x86_64", version = "3.12", url = "https://github.com/oracle/graalpython/releases/download/graal-25.0.0/graalpy-25.0.0-macos-amd64.tar.gz" },
187-
{ identifier = "gp312_250-macosx_arm64", version = "3.12", url = "https://github.com/oracle/graalpython/releases/download/graal-25.0.0/graalpy-25.0.0-macos-aarch64.tar.gz" },
186+
{ identifier = "gp312_250-macosx_x86_64", version = "3.12", url = "https://github.com/oracle/graalpython/releases/download/graal-25.0.1/graalpy-25.0.1-macos-amd64.tar.gz" },
187+
{ identifier = "gp312_250-macosx_arm64", version = "3.12", url = "https://github.com/oracle/graalpython/releases/download/graal-25.0.1/graalpy-25.0.1-macos-aarch64.tar.gz" },
188188
]
189189

190190
[windows]
@@ -199,10 +199,10 @@ python_configurations = [
199199
{ identifier = "cp311-win_amd64", version = "3.11.9" },
200200
{ identifier = "cp312-win32", version = "3.12.10" },
201201
{ identifier = "cp312-win_amd64", version = "3.12.10" },
202-
{ identifier = "cp313-win32", version = "3.13.8" },
203-
{ identifier = "cp313t-win32", version = "3.13.8" },
204-
{ identifier = "cp313-win_amd64", version = "3.13.8" },
205-
{ identifier = "cp313t-win_amd64", version = "3.13.8" },
202+
{ identifier = "cp313-win32", version = "3.13.9" },
203+
{ identifier = "cp313t-win32", version = "3.13.9" },
204+
{ identifier = "cp313-win_amd64", version = "3.13.9" },
205+
{ identifier = "cp313t-win_amd64", version = "3.13.9" },
206206
{ identifier = "cp314-win32", version = "3.14.0" },
207207
{ identifier = "cp314t-win32", version = "3.14.0" },
208208
{ identifier = "cp314-win_amd64", version = "3.14.0" },
@@ -211,28 +211,28 @@ python_configurations = [
211211
{ identifier = "cp310-win_arm64", version = "3.10.11" },
212212
{ identifier = "cp311-win_arm64", version = "3.11.9" },
213213
{ identifier = "cp312-win_arm64", version = "3.12.10" },
214-
{ identifier = "cp313-win_arm64", version = "3.13.8" },
215-
{ identifier = "cp313t-win_arm64", version = "3.13.8" },
214+
{ identifier = "cp313-win_arm64", version = "3.13.9" },
215+
{ identifier = "cp313t-win_arm64", version = "3.13.9" },
216216
{ identifier = "cp314-win_arm64", version = "3.14.0" },
217217
{ identifier = "cp314t-win_arm64", version = "3.14.0" },
218218
{ identifier = "pp38-win_amd64", version = "3.8", url = "https://downloads.python.org/pypy/pypy3.8-v7.3.11-win64.zip" },
219219
{ identifier = "pp39-win_amd64", version = "3.9", url = "https://downloads.python.org/pypy/pypy3.9-v7.3.16-win64.zip" },
220220
{ identifier = "pp310-win_amd64", version = "3.10", url = "https://downloads.python.org/pypy/pypy3.10-v7.3.19-win64.zip" },
221221
{ identifier = "pp311-win_amd64", version = "3.11", url = "https://downloads.python.org/pypy/pypy3.11-v7.3.20-win64.zip" },
222222
{ identifier = "gp311_242-win_amd64", version = "3.11", url = "https://github.com/oracle/graalpython/releases/download/graal-24.2.2/graalpy-24.2.2-windows-amd64.zip" },
223-
{ identifier = "gp312_250-win_amd64", version = "3.12", url = "https://github.com/oracle/graalpython/releases/download/graal-25.0.0/graalpy-25.0.0-windows-amd64.zip" },
223+
{ identifier = "gp312_250-win_amd64", version = "3.12", url = "https://github.com/oracle/graalpython/releases/download/graal-25.0.1/graalpy-25.0.1-windows-amd64.zip" },
224224
]
225225

226226
[pyodide]
227227
python_configurations = [
228228
{ identifier = "cp312-pyodide_wasm32", version = "3.12", default_pyodide_version = "0.27.7", node_version = "v22" },
229-
{ identifier = "cp313-pyodide_wasm32", version = "3.13", default_pyodide_version = "0.28.3", node_version = "v22" },
229+
{ identifier = "cp313-pyodide_wasm32", version = "3.13", default_pyodide_version = "0.29.0", node_version = "v22" },
230230
]
231231

232232
[android]
233233
python_configurations = [
234-
{ identifier = "cp313-android_arm64_v8a", version = "3.13", url = "https://repo.maven.apache.org/maven2/com/chaquo/python/python/3.13.7/python-3.13.7-aarch64-linux-android.tar.gz" },
235-
{ identifier = "cp313-android_x86_64", version = "3.13", url = "https://repo.maven.apache.org/maven2/com/chaquo/python/python/3.13.7/python-3.13.7-x86_64-linux-android.tar.gz" },
234+
{ identifier = "cp313-android_arm64_v8a", version = "3.13", url = "https://repo.maven.apache.org/maven2/com/chaquo/python/python/3.13.8/python-3.13.8-aarch64-linux-android.tar.gz" },
235+
{ identifier = "cp313-android_x86_64", version = "3.13", url = "https://repo.maven.apache.org/maven2/com/chaquo/python/python/3.13.8/python-3.13.8-x86_64-linux-android.tar.gz" },
236236
{ identifier = "cp314-android_arm64_v8a", version = "3.14", url = "https://www.python.org/ftp/python/3.14.0/python-3.14.0-aarch64-linux-android.tar.gz" },
237237
{ identifier = "cp314-android_x86_64", version = "3.14", url = "https://www.python.org/ftp/python/3.14.0/python-3.14.0-x86_64-linux-android.tar.gz" },
238238
]

0 commit comments

Comments
 (0)