Repository navigation
fix(packaging): keep the wheel to an explicit product allowlist - #317
Merged
Zongwei9888 merged 1 commit intoNov 23, 2026
Merged
Conversation
setuptools.find_packages() enumerates the working tree rather than the tracked files, so ignored experiments or local helper directories at the repository root can enter a wheel. Pin the release surface with an include allowlist in setup.py, and assert the same list against the built wheel in scripts/verify_python_distribution.py. The allowlist reproduces exactly what the previous exclude-based call selected (40 packages, identical set on this checkout), so the published surface does not change for a clean tree. Tests: tests/test_python_distribution_release.py - 15 passed, plus a positive/negative control on verify_wheel_packages (product package accepted, working-tree experiment rejected).
Contributor
|
Thanks @raymondginger2018-sudo, merged on 2026-11-23 as 8e78a7a. We built wheels from One follow-up (a5da104):
|
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
setuptools.find_packages()enumerates the working tree, not the tracked files, soignored experiments or local helper directories at the repository root can end up in a
wheel. This pins the release surface explicitly and asserts the same list against the
built wheel.
Changes
setup.py: replacefind_packages(exclude=...)withfind_packages(include=PRODUCT_PACKAGES).scripts/verify_python_distribution.py: addPRODUCT_TOP_LEVEL_PACKAGESandverify_wheel_packages(), called fromverify_artifacts()on the wheel namelist.tests/test_python_distribution_release.py: two cases - a product package isaccepted, a working-tree experiment is rejected.
The published surface does not change
The allowlist reproduces exactly what the previous exclude-based call selected on this
checkout:
find_packages(exclude=...)-> 40 packages,find_packages(include=...)-> 40 packages, set difference empty in both directions.Tests
pytest tests/test_python_distribution_release.py -q-> 15 passedrun-ci-jobs.sh package(COMPARE_FROM=80634442) ->build_rc=0 twine_rc=0 verify_rc=0: the wheel was built and the verifier (includingthe new check) ran and passed
checkclean,format --checkcleanverify_wheel_packages: product package accepted,quant_trading/rejected with the allowlist errorNOT RUN
preflight. The full local pytest suite needs ~83 minutes on my machinewhile the harness caps the test leg at 2400s, so it can only ever end as
rc=124.I did not want to present a truncated run as a verdict; upstream CI is the
authoritative gate for this revision.
desktop/bundleare out of scope for this diff:scripts/ci_scope.pyreportsdesktop_changed=false(withruntime_changed=true).