From 4f8442387d89c8b6f15a6c7d1ff64cf239b7d1b8 Mon Sep 17 00:00:00 2001 From: bhack Date: Mon, 16 Nov 2026 17:12:09 +0100 Subject: [PATCH] =?UTF-8?q?Ship=20What=E2=80=99s=20New=20metadata=20in=20t?= =?UTF-8?q?he=20Python=20wheel?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pyproject.toml | 3 +++ tools/release_preflight.py | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 712640d..139b918 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -72,6 +72,9 @@ package-dir = { "" = "src" } [tool.setuptools.packages.find] where = ["src"] +[tool.setuptools.data-files] +"share/metainfo" = ["data/io.github.bhack.mini-eq.metainfo.xml"] + [tool.setuptools.package-data] mini_eq = [ "style.css", diff --git a/tools/release_preflight.py b/tools/release_preflight.py index 1fe5d21..2bb1e1d 100755 --- a/tools/release_preflight.py +++ b/tools/release_preflight.py @@ -456,6 +456,25 @@ def run_wheel_smoke_test(python: Path, wheel: Path, scratch: Path) -> None: run([venv_python, "-m", "pip", "install", "--upgrade", "pip"]) check_pipewire_gobject_sdist_build_environment() run([venv_python, "-m", "pip", "install", wheel]) + run( + [ + venv_python, + "-I", + "-c", + """\ +import sys +from pathlib import Path + +from mini_eq import __version__ +from mini_eq.release_notes import APPSTREAM_FILE_NAME, release_notes_from_metainfo + +metainfo = Path(sys.prefix) / "share" / "metainfo" / APPSTREAM_FILE_NAME +if release_notes_from_metainfo(metainfo, __version__) is None: + raise SystemExit(f"Missing What's New notes for {__version__} in {metainfo}") +""", + ], + cwd=scratch, + ) run([mini_eq, "--check-deps"]) run([mini_eq, "--help"])