Skip to content

Commit b70562f

Browse files
joerickCopilot
andauthored
Debug GraalPy/uv test failures on Windows (#2741)
* Dont attempt uv frontend tests on gp311. * docs: note GraalPy 3.11 incompatibility with uv on Windows (#2751) * Initial plan * docs: note GraalPy311 incompatibility with uv/build[uv] on Windows Co-authored-by: joerick <1244307+joerick@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: joerick <1244307+joerick@users.noreply.github.com> * Skip both graalpy with uv for now * Docs updates --------- Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: joerick <1244307+joerick@users.noreply.github.com>
1 parent 0a85e29 commit b70562f

File tree

3 files changed

+23
-3
lines changed

3 files changed

+23
-3
lines changed

docs/options.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,11 @@ uv currently does not support iOS or musllinux on s390x, ppc64le and riscv64.
482482
You can also use the `uv` backend directly; though currently multiple output
483483
files (from workspaces) are not supported.
484484

485+
!!! note
486+
There is currently a compatibility issue between GraalPy and uv. If you
487+
are building GraalPy wheels, use `build` or `pip` as the build frontend
488+
instead of `build[uv]` or `uv`.
489+
485490
On Android and Pyodide, the "pip" frontend is not supported.
486491

487492
You can specify extra arguments to pass to the build frontend using the

test/conftest.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
from cibuildwheel.typing import PLATFORMS
1414
from cibuildwheel.venv import find_uv
1515

16+
from . import utils
1617
from .utils import DEFAULT_CIBW_ENABLE, EMULATED_ARCHS, get_platform
1718

1819

@@ -164,7 +165,7 @@ def build_frontend_env_nouv(request: pytest.FixtureRequest) -> dict[str, str]:
164165

165166

166167
@pytest.fixture(params=["pip", "build", "build[uv]", "uv"])
167-
def build_frontend_env(request: pytest.FixtureRequest) -> dict[str, str]:
168+
def build_frontend_env(request: pytest.FixtureRequest) -> Generator[dict[str, str], None, None]:
168169
frontend = request.param
169170
marks = {m.name for m in request.node.iter_markers()}
170171
if "android" in marks:
@@ -186,7 +187,17 @@ def build_frontend_env(request: pytest.FixtureRequest) -> dict[str, str]:
186187
if uv_path is not None and frontend == "build" and platform not in {"android", "ios"}:
187188
pytest.skip("No need to check build when uv is present")
188189

189-
return {"CIBW_BUILD_FRONTEND": frontend}
190+
# temporary workaround: uv doesn't work with graalpy yet
191+
uses_uv = "uv" in frontend
192+
env: dict[str, str] = {"CIBW_BUILD_FRONTEND": frontend}
193+
if uses_uv:
194+
utils.include_graalpy_in_expected_wheels = False
195+
env["CIBW_SKIP"] = "gp*" # skip graalpy when using uv, until uv supports it
196+
try:
197+
yield env
198+
finally:
199+
if uses_uv:
200+
utils.include_graalpy_in_expected_wheels = True
190201

191202

192203
@pytest.fixture

test/utils.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@
2828

2929
SINGLE_PYTHON_VERSION: Final[tuple[int, int]] = (3, 12)
3030

31+
# temporary workaround: set by build_frontend_env fixture to skip graalpy
32+
# when uv is the build frontend (compatibility issue between graalpy and uv)
33+
include_graalpy_in_expected_wheels: bool = True
34+
3135
_AARCH64_CAN_RUN_ARMV7: Final[bool] = Architecture.aarch64.value not in EMULATED_ARCHS and {
3236
None: Architecture.armv7l.value not in EMULATED_ARCHS,
3337
CIProvider.travis_ci: False,
@@ -305,7 +309,7 @@ def _expected_wheels(
305309
"pp311-pypy311_pp73",
306310
]
307311

308-
if EnableGroup.GraalPy in enable_groups:
312+
if EnableGroup.GraalPy in enable_groups and include_graalpy_in_expected_wheels:
309313
python_abi_tags += [
310314
"graalpy311-graalpy242_311_native",
311315
"graalpy312-graalpy250_312_native",

0 commit comments

Comments
 (0)