From 538e57d6c0f161c4dd11838ee90df7d2790889a0 Mon Sep 17 00:00:00 2001 From: 0x5t4l1n Date: Sun, 18 Oct 2026 17:10:29 +0530 Subject: [PATCH] fix(packaging): include .config and .json data files in wheel The build backend is poetry-core, which does not read setup.cfg or MANIFEST.in. As a result, xmlcli.config and messages.json were absent from the built wheel, causing a NoSectionError on import of any module that reads the config at load time (e.g. xmlcli.modules.nvram). Add an explicit 'include' list to [tool.poetry] so that: - src/xmlcli/xmlcli.config - src/xmlcli/messages.json - src/xmlcli/cfg/** (all supporting config data) are bundled in both the sdist and the wheel. Fixes #97 --- pyproject.toml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 826ee30..4060ac4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,6 +30,14 @@ uefi-analyze = "xmlcli.modules.uefi_analyzer.cli:main" [tool.poetry] packages = [{include = "xmlcli", from = "src"}] +# Include non-Python data files that the package reads at runtime. +# Poetry's build backend ignores setup.cfg/MANIFEST.in, so these must be +# listed here to be bundled in the wheel (fixes #97). +include = [ + {path = "src/xmlcli/xmlcli.config", format = ["sdist", "wheel"]}, + {path = "src/xmlcli/messages.json", format = ["sdist", "wheel"]}, + {path = "src/xmlcli/cfg/**/*", format = ["sdist", "wheel"]}, +] [tool.poetry.group.dev.dependencies] tox = ">=3.23.0"