Repository navigation
Conversation
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 intel#97
There was a problem hiding this comment.
🔵 Needs a closer look
A clean wheel build and install is needed to verify poetry-core’s resource placement and the nvram import, which cannot be validated in the dependency-free review environment.
No open issues 🎉
What changed in this PR
Addresses #97 by updating Poetry’s packaging configuration to include runtime data needed by wheel-installed modules such as xmlcli.modules.nvram.
Changes:
- Explicitly includes
xmlcli.config,messages.json, andcfg/**/*in both source and wheel distributions. - Adds comments explaining why the package-data entries are needed.
| File | Description |
|---|---|
pyproject.toml |
Adds explicit Poetry inclusion rules for runtime configuration and data files. |
Review effort: Balanced
There was a problem hiding this comment.
🟡 Changes recommended
The added packaging block is redundant and does not change wheel contents or fix #97, leaving a misleading comment and the actual cause of the missing files unresolved.
1 open issue
Review effort: Max
| # 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"]}, | ||
| ] |
|
Thanks @copilot, you were right. I built the package both ways on current The report in #97 is for 2.2.6 installed under |

Summary
Fixes #97.
Importing any xmlcli module that loads the config at import time (e.g.
xmlcli.modules.nvram) raisesconfigparser.NoSectionError: No section: 'GENERAL_SETTINGS'when xmlcli is installed from a wheel.Root cause
The project uses poetry-core as its build backend (
[build-system]inpyproject.toml). Poetry's build backend does not readsetup.cfgorMANIFEST.in, so the non-Python data files (xmlcli.config,messages.json, everything undercfg/) are silently omitted from the wheel even thoughMANIFEST.inlists them for sdist builds.Fix
Add an explicit
includelist to[tool.poetry]so Poetry bundles the required data files in both the sdist and the wheel:Verification