Skip to content

Commit 4dbbfb1

Browse files
committed
Merge remote-tracking branch 'origin/main' into ci-label-flags
2 parents f4fe206 + e91560e commit 4dbbfb1

Some content is hidden

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

63 files changed

+496
-139
lines changed

.github/workflows/test.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
python-version: ${{ matrix.python_version }}
5656
allow-prereleases: true
5757

58-
- uses: astral-sh/setup-uv@v5
58+
- uses: astral-sh/setup-uv@v6
5959

6060
- uses: joerick/[email protected]
6161
- name: Set CIBW_ENABLE
@@ -99,7 +99,7 @@ jobs:
9999
env:
100100
CIBW_ARCHS_MACOS: x86_64 universal2 arm64
101101
CIBW_BUILD_FRONTEND: 'build[uv]'
102-
CIBW_ENABLE: "cpython-prerelease cpython-freethreading pypy"
102+
CIBW_ENABLE: "cpython-prerelease cpython-freethreading pypy graalpy"
103103

104104
- name: Run a sample build (GitHub Action, only)
105105
uses: ./
@@ -154,7 +154,7 @@ jobs:
154154
- uses: actions/setup-python@v5
155155
with:
156156
python-version: "3.x"
157-
- uses: astral-sh/setup-uv@v5
157+
- uses: astral-sh/setup-uv@v6
158158
- name: Install dependencies
159159
run: uv sync --no-dev --group test
160160
- name: Get qemu emulated architectures
@@ -177,7 +177,7 @@ jobs:
177177
- uses: actions/setup-python@v5
178178
with:
179179
python-version: "3.x"
180-
- uses: astral-sh/setup-uv@v5
180+
- uses: astral-sh/setup-uv@v6
181181
- name: Install dependencies
182182
run: uv sync --no-dev --group test
183183

@@ -198,7 +198,7 @@ jobs:
198198
name: Install Python 3.12
199199
with:
200200
python-version: '3.12'
201-
- uses: astral-sh/setup-uv@v5
201+
- uses: astral-sh/setup-uv@v6
202202

203203
- name: Install dependencies
204204
run: uv sync --no-dev --group test

.pre-commit-config.yaml

+1-2
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.11.5
17+
rev: v0.11.7
1818
hooks:
1919
- id: ruff
2020
args: ["--fix", "--show-fixes"]
@@ -25,7 +25,6 @@ repos:
2525
hooks:
2626
- id: mypy
2727
name: mypy 3.11 on cibuildwheel/
28-
exclude: ^cibuildwheel/resources/.*py$
2928
args: ["--python-version=3.11"]
3029
additional_dependencies: &mypy-dependencies
3130
- bracex

README.md

+10-11
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,15 @@ While cibuildwheel itself requires a recent Python version to run (we support th
3636
| PyPy 3.9 v7.3 |||| N/A | N/A | ✅¹ | ✅¹ | ✅¹ | N/A | N/A | N/A | N/A | N/A |
3737
| PyPy 3.10 v7.3 |||| N/A | N/A | ✅¹ | ✅¹ | ✅¹ | N/A | N/A | N/A | N/A | N/A |
3838
| PyPy 3.11 v7.3 |||| N/A | N/A | ✅¹ | ✅¹ | ✅¹ | N/A | N/A | N/A | N/A | N/A |
39+
| GraalPy 24.2 |||| N/A | N/A | ✅¹ | N/A | ✅¹ | N/A | N/A | N/A | N/A | N/A |
3940

40-
<sup>¹ PyPy is only supported for manylinux wheels.</sup><br>
41+
<sup>¹ PyPy & GraalPy are only supported for manylinux wheels.</sup><br>
4142
<sup>² Windows arm64 support is experimental.</sup><br>
4243
<sup>³ Free-threaded mode requires opt-in using [`CIBW_ENABLE`](https://cibuildwheel.pypa.io/en/stable/options/#enable).</sup><br>
4344
<sup>⁴ Experimental, not yet supported on PyPI, but can be used directly in web deployment. Use `--platform pyodide` to build.</sup><br>
4445
<sup>⁵ manylinux armv7l support is experimental. As there are no RHEL based image for this architecture, it's using an Ubuntu based image instead.</sup><br>
4546

46-
- Builds manylinux, musllinux, macOS 10.9+ (10.13+ for Python 3.12+), and Windows wheels for CPython and PyPy
47+
- Builds manylinux, musllinux, macOS 10.9+ (10.13+ for Python 3.12+), and Windows wheels for CPython, PyPy, and GraalPy
4748
- Works on GitHub Actions, Azure Pipelines, Travis CI, AppVeyor, CircleCI, GitLab CI, and Cirrus CI
4849
- Bundles shared library dependencies on Linux and macOS through [auditwheel](https://github.com/pypa/auditwheel) and [delocate](https://github.com/matthew-brett/delocate)
4950
- Runs your library's tests against the wheel-installed version of your library
@@ -97,7 +98,7 @@ jobs:
9798
- uses: actions/setup-python@v5
9899

99100
- name: Install cibuildwheel
100-
run: python -m pip install cibuildwheel==2.23.2
101+
run: python -m pip install cibuildwheel==2.23.3
101102

102103
- name: Build wheels
103104
run: python -m cibuildwheel --output-dir wheelhouse
@@ -218,6 +219,12 @@ Changelog
218219

219220
<!-- this section was generated by bin/update_readme_changelog.py -- do not edit manually -->
220221

222+
### v2.23.3
223+
224+
_26 April 2025_
225+
226+
- 🛠 Dependency updates, including Python 3.13.3 (#2371)
227+
221228
### v2.23.2
222229

223230
_24 March 2025_
@@ -259,14 +266,6 @@ _23 November 2024_
259266
- 🛠 Now cibuildwheel uses dependency-groups for development dependencies (#2064, #2085)
260267
- 📚 Docs updates and tidy ups (#2061, #2067, #2072)
261268

262-
263-
### v2.21.3
264-
265-
_9 October 2024_
266-
267-
- 🛠 Update CPython 3.13 to 3.13.0 final release (#2032)
268-
- 📚 Docs updates and tidy ups (#2035)
269-
270269
<!-- END bin/update_readme_changelog.py -->
271270

272271
---

azure-pipelines.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ pr:
66

77
jobs:
88
- job: linux_311
9-
timeoutInMinutes: 120
9+
timeoutInMinutes: 180
1010
pool: {vmImage: 'Ubuntu-22.04'}
1111
steps:
1212
- task: UsePythonVersion@0
@@ -26,6 +26,7 @@ jobs:
2626
2727
- job: macos_311
2828
pool: {vmImage: 'macOS-13'}
29+
timeoutInMinutes: 120
2930
steps:
3031
- task: UsePythonVersion@0
3132
inputs:

bin/generate_schema.py

+7
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
- cpython-freethreading
3232
- cpython-prerelease
3333
- pypy
34+
- cpython-experimental-riscv64
3435
description: A Python version or flavor to enable.
3536
additionalProperties: false
3637
description: cibuildwheel's settings.
@@ -157,6 +158,9 @@
157158
manylinux-pypy_x86_64-image:
158159
type: string
159160
description: Specify alternative manylinux / musllinux container images
161+
manylinux-riscv64-image:
162+
type: string
163+
description: Specify alternative manylinux / musllinux container images
160164
manylinux-s390x-image:
161165
type: string
162166
description: Specify alternative manylinux / musllinux container images
@@ -175,6 +179,9 @@
175179
musllinux-ppc64le-image:
176180
type: string
177181
description: Specify alternative manylinux / musllinux container images
182+
musllinux-riscv64-image:
183+
type: string
184+
description: Specify alternative manylinux / musllinux container images
178185
musllinux-s390x-image:
179186
type: string
180187
description: Specify alternative manylinux / musllinux container images

bin/update_docker.py

+3
Original file line numberDiff line numberDiff line change
@@ -116,5 +116,8 @@ def __init__(self, manylinux_version: str, platforms: list[str], tag: str | None
116116
suffix = f"_{platform.removeprefix('pypy_')}"
117117
config[platform][image.manylinux_version] = f"{image.image_name}{suffix}:{tag_name}"
118118

119+
if not config.has_section("riscv64"):
120+
config["riscv64"] = {}
121+
119122
with open(RESOURCES / "pinned_docker_images.cfg", "w") as f:
120123
config.write(f)

bin/update_pythons.py

+80-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import difflib
66
import logging
77
import operator
8+
import re
89
import tomllib
910
from collections.abc import Mapping, MutableMapping
1011
from pathlib import Path
@@ -44,13 +45,19 @@ class ConfigWinPP(TypedDict):
4445
url: str
4546

4647

48+
class ConfigWinGP(TypedDict):
49+
identifier: str
50+
version: str
51+
url: str
52+
53+
4754
class ConfigApple(TypedDict):
4855
identifier: str
4956
version: str
5057
url: str
5158

5259

53-
AnyConfig = ConfigWinCP | ConfigWinPP | ConfigApple
60+
AnyConfig = ConfigWinCP | ConfigWinPP | ConfigWinGP | ConfigApple
5461

5562

5663
# The following set of "Versions" classes allow the initial call to the APIs to
@@ -106,6 +113,72 @@ def update_version_windows(self, spec: Specifier) -> ConfigWinCP | None:
106113
)
107114

108115

116+
class GraalPyVersions:
117+
def __init__(self) -> None:
118+
response = requests.get("https://api.github.com/repos/oracle/graalpython/releases")
119+
response.raise_for_status()
120+
121+
releases = response.json()
122+
gp_version_re = re.compile(r"-(\d+\.\d+\.\d+)$")
123+
cp_version_re = re.compile(r"Python (\d+\.\d+(?:\.\d+)?)")
124+
for release in releases:
125+
m = gp_version_re.search(release["tag_name"])
126+
if m:
127+
release["graalpy_version"] = Version(m.group(1))
128+
m = cp_version_re.search(release["body"])
129+
if m:
130+
release["python_version"] = Version(m.group(1))
131+
132+
self.releases = [r for r in releases if "graalpy_version" in r and "python_version" in r]
133+
134+
def update_version(self, identifier: str, spec: Specifier) -> AnyConfig:
135+
if "x86_64" in identifier or "amd64" in identifier:
136+
arch = "x86_64"
137+
elif "arm64" in identifier or "aarch64" in identifier:
138+
arch = "aarch64"
139+
else:
140+
msg = f"{identifier} not supported yet on GraalPy"
141+
raise RuntimeError(msg)
142+
143+
releases = [r for r in self.releases if spec.contains(r["python_version"])]
144+
releases = sorted(releases, key=lambda r: r["graalpy_version"])
145+
146+
if not releases:
147+
msg = f"GraalPy {arch} not found for {spec}!"
148+
raise RuntimeError(msg)
149+
150+
release = releases[-1]
151+
version = release["python_version"]
152+
gpversion = release["graalpy_version"]
153+
154+
if "macosx" in identifier:
155+
arch = "x86_64" if "x86_64" in identifier else "arm64"
156+
config = ConfigApple
157+
platform = "macos"
158+
elif "win" in identifier:
159+
arch = "aarch64" if "arm64" in identifier else "x86_64"
160+
config = ConfigWinGP
161+
platform = "windows"
162+
else:
163+
msg = "GraalPy provides downloads for macOS and Windows and is included for manylinux"
164+
raise RuntimeError(msg)
165+
166+
arch = "amd64" if arch == "x86_64" else "aarch64"
167+
ext = "zip" if "win" in identifier else "tar.gz"
168+
(url,) = (
169+
rf["browser_download_url"]
170+
for rf in release["assets"]
171+
if rf["name"].endswith(f"{platform}-{arch}.{ext}")
172+
and rf["name"].startswith(f"graalpy-{gpversion.major}")
173+
)
174+
175+
return config(
176+
identifier=identifier,
177+
version=f"{version.major}.{version.minor}",
178+
url=url,
179+
)
180+
181+
109182
class PyPyVersions:
110183
def __init__(self, arch_str: ArchStr):
111184
response = requests.get("https://downloads.python.org/pypy/versions.json")
@@ -294,6 +367,8 @@ def __init__(self) -> None:
294367

295368
self.ios_cpython = CPythonIOSVersions()
296369

370+
self.graalpy = GraalPyVersions()
371+
297372
def update_config(self, config: MutableMapping[str, str]) -> None:
298373
identifier = config["identifier"]
299374
version = Version(config["version"])
@@ -311,6 +386,8 @@ def update_config(self, config: MutableMapping[str, str]) -> None:
311386
config_update = self.macos_pypy.update_version_macos(spec)
312387
elif "macosx_arm64" in identifier:
313388
config_update = self.macos_pypy_arm64.update_version_macos(spec)
389+
elif identifier.startswith("gp"):
390+
config_update = self.graalpy.update_version(identifier, spec)
314391
elif "t-win32" in identifier and identifier.startswith("cp"):
315392
config_update = self.windows_t_32.update_version_windows(spec)
316393
elif "win32" in identifier and identifier.startswith("cp"):
@@ -322,6 +399,8 @@ def update_config(self, config: MutableMapping[str, str]) -> None:
322399
config_update = self.windows_64.update_version_windows(spec)
323400
elif identifier.startswith("pp"):
324401
config_update = self.windows_pypy_64.update_version_windows(spec)
402+
elif identifier.startswith("gp"):
403+
config_update = self.graalpy.update_version(identifier, spec)
325404
elif "t-win_arm64" in identifier and identifier.startswith("cp"):
326405
config_update = self.windows_t_arm64.update_version_windows(spec)
327406
elif "win_arm64" in identifier and identifier.startswith("cp"):

cibuildwheel/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "2.23.2"
1+
__version__ = "2.23.3"

cibuildwheel/architecture.py

+2
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ class Architecture(StrEnum):
5151
ppc64le = auto()
5252
s390x = auto()
5353
armv7l = auto()
54+
riscv64 = auto()
5455

5556
# mac archs
5657
universal2 = auto()
@@ -167,6 +168,7 @@ def all_archs(platform: PlatformName) -> "set[Architecture]":
167168
Architecture.ppc64le,
168169
Architecture.s390x,
169170
Architecture.armv7l,
171+
Architecture.riscv64,
170172
},
171173
"macos": {Architecture.x86_64, Architecture.arm64, Architecture.universal2},
172174
"windows": {Architecture.x86, Architecture.AMD64, Architecture.ARM64},

cibuildwheel/logger.py

+4
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,14 @@
2222
"manylinux_ppc64le": "manylinux ppc64le",
2323
"manylinux_s390x": "manylinux s390x",
2424
"manylinux_armv7l": "manylinux armv7l",
25+
"manylinux_riscv64": "manylinux riscv64",
2526
"musllinux_x86_64": "musllinux x86_64",
2627
"musllinux_i686": "musllinux i686",
2728
"musllinux_aarch64": "musllinux aarch64",
2829
"musllinux_ppc64le": "musllinux ppc64le",
2930
"musllinux_s390x": "musllinux s390x",
3031
"musllinux_armv7l": "musllinux armv7l",
32+
"musllinux_riscv64": "musllinux riscv64",
3133
"win32": "Windows 32bit",
3234
"win_amd64": "Windows 64bit",
3335
"win_arm64": "Windows on ARM 64bit",
@@ -241,6 +243,8 @@ def build_description_from_identifier(identifier: str) -> str:
241243
build_description += "CPython"
242244
elif python_interpreter == "pp":
243245
build_description += "PyPy"
246+
elif python_interpreter == "gp":
247+
build_description += "GraalPy"
244248
else:
245249
msg = f"unknown python {python_interpreter!r}"
246250
raise Exception(msg)

cibuildwheel/oci_container.py

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ class OCIPlatform(Enum):
3333
ARMV7 = "linux/arm/v7"
3434
ARM64 = "linux/arm64"
3535
PPC64LE = "linux/ppc64le"
36+
RISCV64 = "linux/riscv64"
3637
S390X = "linux/s390x"
3738

3839

cibuildwheel/options.py

+2
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
"ppc64le",
3636
"s390x",
3737
"armv7l",
38+
"riscv64",
3839
"pypy_aarch64",
3940
"pypy_i686",
4041
)
@@ -46,6 +47,7 @@
4647
"ppc64le",
4748
"s390x",
4849
"armv7l",
50+
"riscv64",
4951
)
5052

5153

cibuildwheel/platforms/linux.py

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
Architecture.ppc64le: OCIPlatform.PPC64LE,
2929
Architecture.s390x: OCIPlatform.S390X,
3030
Architecture.armv7l: OCIPlatform.ARMV7,
31+
Architecture.riscv64: OCIPlatform.RISCV64,
3132
}
3233

3334

0 commit comments

Comments
 (0)