-- Update the test fixture's setuptools and bdist_wheel requirements to -- match the versions available in the FreeBSD devel/py-setuptools and -- devel/py-wheel ports. --- tests/test_setuptools.py.orig 2026-11-10 00:29:49 UTC +++ tests/test_setuptools.py @@ -29,7 +29,7 @@ from setuptools import setup from pathlib import Path from setuptools import setup -from setuptools.command.bdist_wheel import bdist_wheel +from wheel.bdist_wheel import bdist_wheel class Wheel(bdist_wheel): @@ -54,14 +54,13 @@ build-backend = "setuptools.build_meta" project = """\ [build-system] build-backend = "setuptools.build_meta" -requires = ["setuptools>=77", "python-sbom"] +requires = ["setuptools>=63.1.0", "python-sbom"] [project] name = "example" version = "1.0" description = "an example" -license = "MIT" -license-files = ["LICENSE"] +license = {text = "MIT"} urls.Source = "https://github.com/example/example" """ (root / "pyproject.toml").write_text(f"{project}{tables}", encoding="utf-8") @@ -90,7 +89,7 @@ def test_wheel_command_that_writes_no_wheel(project: P def test_wheel_command_that_writes_no_wheel(project: Path) -> None: (project / "setup.py").write_text( - "from setuptools import setup\nfrom setuptools.command.bdist_wheel import bdist_wheel\n\n\n" + "from setuptools import setup\nfrom wheel.bdist_wheel import bdist_wheel\n\n\n" "class Wheel(bdist_wheel):\n def run(self):\n pass\n\n\nsetup(cmdclass={'bdist_wheel': Wheel})\n", encoding="utf-8", ) @@ -121,8 +120,10 @@ def test_project_without_table_has_no_sbom(tmp_path: P # setuptools tells about every editable build with a warning, which the suite turns into an error -@pytest.mark.filterwarnings("ignore::setuptools.warnings.InformationOnly") +@pytest.mark.filterwarnings("ignore") def test_editable_wheel_has_no_sbom(project: Path) -> None: + if not hasattr(build_meta, "build_editable"): + pytest.skip("installed setuptools does not support build_editable") assert sboms(project / "dist" / build_meta.build_editable(str(project / "dist"))) == []