Repository navigation
fix: allow-list setuptools package discovery (autolens*) - #775
Merged
Merged
Conversation
packages.find had only an exclude list, so setuptools packaged every importable directory: a local build/ was re-packaged one level deeper on each build, and docs/ subdirectories leaked into the wheel. include = ["autolens*"] mirrors PyAutoHeart; existing excludes are kept. Also ignore build/ in .gitignore (the only library that did not). Refs PyAutoLabs/PyAutoNerves#194 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
[tool.setuptools.packages.find]had only anexcludelist. Discovery runs in namespace mode, so setuptools packaged every directory in the repo except the excluded names:build/was re-packaged one level deeper on eachpip install ./python -m build(build/lib/build/lib/…), andtop_level.txtlistedbuild;exclude = ["docs"]drops only the top-level name, sodocs/subdirectories, and in some reposfiles/,paper/andscripts/, could reach the wheel. The PyPIautofit-2026.10.4.1wheel installs 105 such stray files at the top level of site-packages.This PR adds
include = ["autolens*"], the same style as PyAutoHeart (include = ["heart*"]). The existing excludes stay, so tests remain out.Refs PyAutoLabs/PyAutoNerves#194. This is one of the per-library PRs for that issue.
API Changes
None — internal changes only. This is packaging metadata; the
autolenspackage contents are unchanged.Test Plan
python -m build --wheelinto a scratch dir: the wheel's top level is onlyautolens/+*.dist-info.build/directory present creates no nestedbuild/(checked on PyAutoNerves), and the regeneratedtop_level.txtisautonerves.import autolensfrom the worktree.Coordination with the other tasks holding this repo was authorised by the human on 2026-10-07. This PR touches only
pyproject.tomland.gitignore, which now ignoresbuild/(the only library that did not).Generated by the PyAutoLabs agent workflow.
🤖 Generated with Claude Code