Drops the GraalPy 3.11 / GraalPy 24.2 builds (gp311_242) as agreed in pypa/cibuildwheel#2741: a ~6-month overlap after the GraalPy 25 (gp312) release. GraalPy 3.12 (gp312_250) stays. This also removes the GraalPy 24-only workarounds that were explicitly marked "Remove when GraalPy 24.x is dropped": - the Visual Studio compiler-discovery (vswhere) and build-isolation (graalpython#491) workarounds in the Windows backend - the issue-491 Windows skip/filter hacks in test_pep518 and test_dependency_versions (added in the original GraalPy PR #1538 and unneeded since GraalPy 25 per #2597) The uv-doesn't-support-graalpy skip (#2754), the `graalpy` enable group, and the generated constraints pins apply to all GraalPy and are kept. Assisted-by: ClaudeCode:claude-opus-4.8
72 lines
2.1 KiB
Python
72 lines
2.1 KiB
Python
from __future__ import annotations
|
|
|
|
import textwrap
|
|
from pathlib import Path
|
|
|
|
from . import test_projects, utils
|
|
|
|
TYPE_CHECKING = False
|
|
if TYPE_CHECKING:
|
|
from pathlib import Path
|
|
|
|
basic_project = test_projects.new_c_project(
|
|
setup_py_add=textwrap.dedent(
|
|
"""
|
|
# Will fail if PEP 518 does work
|
|
import jmespath
|
|
assert jmespath.__version__ == "0.10.0", "'jmespath' found but wrong version ({0})".format(jmespath.__version__)
|
|
|
|
# Just making sure environment is still set
|
|
import os
|
|
if os.environ.get("CIBUILDWHEEL", "0") != "1":
|
|
raise Exception("CIBUILDWHEEL environment variable is not set to 1")
|
|
"""
|
|
)
|
|
)
|
|
|
|
basic_project.files["pyproject.toml"] = """
|
|
[build-system]
|
|
requires = [
|
|
"setuptools >= 42",
|
|
"setuptools_scm[toml]>=4.1.2",
|
|
"jmespath==0.10.0"
|
|
]
|
|
|
|
build-backend = "setuptools.build_meta"
|
|
"""
|
|
|
|
|
|
def test_pep518(tmp_path: Path, build_frontend_env: dict[str, str]) -> None:
|
|
project_dir = tmp_path / "project"
|
|
basic_project.generate(project_dir)
|
|
|
|
# build the wheels
|
|
actual_wheels = utils.cibuildwheel_run(project_dir, add_env=build_frontend_env)
|
|
|
|
# check that the expected wheels are produced
|
|
expected_wheels = utils.expected_wheels("spam", "0.1.0")
|
|
|
|
assert set(actual_wheels) == set(expected_wheels)
|
|
|
|
# These checks ensure an extra file is not created when using custom
|
|
# workaround; see https://github.com/pypa/cibuildwheel/issues/421
|
|
assert not (project_dir / "42").exists()
|
|
assert not (project_dir / "4.1.2").exists()
|
|
|
|
# pypa/build creates a "build" folder & a "*.egg-info" folder for the
|
|
# wheel being built, this should be harmless so remove them. pyodide-build
|
|
# creates a ".pyodide_build" folder, but this is gitignored with a
|
|
# .gitignore file inside.
|
|
contents = [
|
|
item
|
|
for item in project_dir.iterdir()
|
|
if item.name != "build"
|
|
and not item.name.endswith(".egg-info")
|
|
and item.name != ".pyodide_build"
|
|
]
|
|
|
|
print("Project contents after build:")
|
|
print("\n".join(f" {f}" for f in contents))
|
|
|
|
assert len(contents) == len(basic_project.files)
|