Skip to content

Commit 3837d5c

Browse files
committed
Build an publish pyproject-based metapackage
1 parent d781cee commit 3837d5c

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

src/oca_github_bot/build_wheels.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -112,15 +112,19 @@ def build_and_publish_metapackage_wheel(
112112
dry_run: bool,
113113
):
114114
setup_dir = Path(addons_dir) / "setup" / "_metapackage"
115-
setup_file = setup_dir / "setup.py"
116-
if not setup_file.is_file():
115+
setup_py_file = setup_dir / "setup.py"
116+
pyproject_toml_file = setup_dir / "pyproject.toml"
117+
if not pyproject_toml_file.is_file() and not setup_py_file.is_file():
117118
return
118119
with tempfile.TemporaryDirectory() as dist_dir:
119-
# Workaround for recent setuptools not generating long_description
120-
# anymore (before it was generating UNKNOWN), and a long_description
121-
# is required by twine check. We could fix setuptools-odoo-makedefault
122-
# but that would not backfill the legacy. So here we are...
123-
if "long_description" not in setup_file.read_text():
120+
if (
121+
setup_py_file.is_file()
122+
and "long_description" not in setup_py_file.read_text()
123+
):
124+
# Workaround for recent setuptools not generating long_description
125+
# anymore (before it was generating UNKNOWN), and a long_description
126+
# is required by twine check. We could fix setuptools-odoo-makedefault
127+
# but that would not backfill the legacy. So here we are...
124128
setup_dir.joinpath("setup.cfg").write_text(
125129
"[metadata]\nlong_description = UNKNOWN\n"
126130
)

0 commit comments

Comments
 (0)