From 3837d5c3b55fbfcdbfe3a2d81500d42ef6399251 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul?= Date: Sun, 26 Oct 2025 15:04:23 +0100 Subject: [PATCH] Build an publish pyproject-based metapackage --- src/oca_github_bot/build_wheels.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/oca_github_bot/build_wheels.py b/src/oca_github_bot/build_wheels.py index d1458dde..81e4e992 100644 --- a/src/oca_github_bot/build_wheels.py +++ b/src/oca_github_bot/build_wheels.py @@ -112,15 +112,19 @@ def build_and_publish_metapackage_wheel( dry_run: bool, ): setup_dir = Path(addons_dir) / "setup" / "_metapackage" - setup_file = setup_dir / "setup.py" - if not setup_file.is_file(): + setup_py_file = setup_dir / "setup.py" + pyproject_toml_file = setup_dir / "pyproject.toml" + if not pyproject_toml_file.is_file() and not setup_py_file.is_file(): return with tempfile.TemporaryDirectory() as dist_dir: - # Workaround for recent setuptools not generating long_description - # anymore (before it was generating UNKNOWN), and a long_description - # is required by twine check. We could fix setuptools-odoo-makedefault - # but that would not backfill the legacy. So here we are... - if "long_description" not in setup_file.read_text(): + if ( + setup_py_file.is_file() + and "long_description" not in setup_py_file.read_text() + ): + # Workaround for recent setuptools not generating long_description + # anymore (before it was generating UNKNOWN), and a long_description + # is required by twine check. We could fix setuptools-odoo-makedefault + # but that would not backfill the legacy. So here we are... setup_dir.joinpath("setup.cfg").write_text( "[metadata]\nlong_description = UNKNOWN\n" )