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
Comment on lines
+33
to
+40
| # 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"]}, | ||
| ] |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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