refactor(build): auto-discover subpackages with setuptools find#115
Open
CyanoTex wants to merge 1 commit intorepowise-dev:mainfrom
Open
refactor(build): auto-discover subpackages with setuptools find#115CyanoTex wants to merge 1 commit intorepowise-dev:mainfrom
CyanoTex wants to merge 1 commit intorepowise-dev:mainfrom
Conversation
Replace the hand-maintained [tool.setuptools] packages list with [tool.setuptools.packages.find], scanning all three packages/*/src roots. Prevents the missing-subpackage drift class that produced PR repowise-dev#97 and PR repowise-dev#110 (issue repowise-dev#109).
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
Follow-up to #110 (and previously #97). Switches
[tool.setuptools]from a hand-maintained explicit packages list to[tool.setuptools.packages.find], scanning the threepackages/*/srcroots. New subpackages now ship in the wheel automatically — no more drift.What changed
pyproject.toml:[tool.setuptools] packages = [...]list.[tool.setuptools.packages.find]withwhere = ["packages/core/src", "packages/cli/src", "packages/server/src"],include = ["repowise*"],namespaces = true(top-levelrepowiseis a PEP 420 namespace package across the three src roots).[tool.setuptools.package-dir]mapping and[tool.setuptools.package-data]entries are unchanged.Net diff: +5/-33 lines.
Verification
Built the wheel before and after the edit on the same
origin/main(0.4.1) base and diffed the package list inside the wheel. Identical contents, both manifests have 26 packages, all 15.scmquery files and 12.j2template files are still bundled.Spot-check on package-data:
Open questions / risks
namespaces = trueis required because norepowise/__init__.pyexists in any of the three src roots; the top-levelrepowiseis a PEP 420 namespace package. Verified byfind packages -path "*/repowise/__init__.py"returning nothing.package-dirmapping is kept as-is — it's consistent with whatfinddiscovers and removing it would be an orthogonal cleanup.Test plan
uv build --wheelsucceeds on the new configorigin/main.scmand.j2package-data files still ship