Repository navigation
Description
Overview
[tool.setuptools.packages.find] in seven library pyproject.toml files has only an exclude list. Any directory with an __init__.py gets packaged, so each local pip install . / python -m build re-packages the previous build/ one level deeper (build/lib/build/lib/…); autonerves.egg-info/top_level.txt lists build. Also, exclude = ["docs"] excludes only the top-level name, so the published autofit-2026.10.4.1 wheel installs stray top-level docs/, files/, paper/ and scripts/ directories into site-packages (105 files). An include allow-list, mirroring PyAutoHeart (include = ["heart*"]), fixes both.
Plan
- Add
include = ["<pkg>*"]to[tool.setuptools.packages.find]in each library, keeping the existing excludes (tests stay out). - Add
build/to PyAutoLens's.gitignore, which is the only one that doesn't ignore it. - Build a wheel per repo into a scratch dir and confirm its top level is only
<pkg>/+*.dist-info, with nobuild/left in the repo. - Confirm imports still work, then refresh the stale PyAutoNerves editable-install egg-info.
- Ship one PR per library repo in library order (Nerves → Array → Fit → Galaxy → Lens, then CTI, Reduce).
Tier: judge — merge mode: human /prm
Detailed implementation plan
Work Classification
Library
Affected Repositories
- PyAutoNerves (primary) —
include = ["autonerves*"] - PyAutoArray —
include = ["autoarray*"] - PyAutoFit —
include = ["autofit*"](drops the strayscripts/top-level package from the wheel) - PyAutoGalaxy —
include = ["autogalaxy*"] - PyAutoLens —
include = ["autolens*"]+.gitignorebuild/ - PyAutoCTI —
include = ["autocti*"] - PyAutoReduce —
include = ["autoreduce*"]
Branch Survey
All seven main checkouts are on main and clean. Claims were reviewed with worktree_check_conflict: Nerves is held by dashboard-section-disclosures; Array, Fit, Galaxy and Lens are held by community-pages and scribbler-wave2, both awaiting release. The human authorised coordination on 2026-10-07; this task touches pyproject.toml/.gitignore only, on separate branches.
Suggested branch: feature/setuptools-include-packages
Worktree root: ~/Code/PyAutoLabs-wt/setuptools-include-packages/
Implementation Steps
- In each
pyproject.toml, addinclude = ["<pkg>*"]above the existingexcludein[tool.setuptools.packages.find]. - Add
build/tolens/PyAutoLens/.gitignore. - Run
python -m build --wheel --outdir <scratch>per repo; list the wheel's top-level entries and delete anybuild/this creates. - Import check per package; run the existing unit tests as the ship gate.
- In the PyAutoNerves main checkout, regenerate
autonerves.egg-info(legacy editable) sotop_level.txtis justautonerves.
Key Files
<repo>/pyproject.toml—[tool.setuptools.packages.find]lens/PyAutoLens/.gitignore
Original Prompt
Click to expand starting prompt
See PyAutoMind active/setuptools_include_packages.md (request copied verbatim there).
Activity
Jammy2211 commentedon Oct 7, 2026
Shipped
All seven PRs merged 2026-10-07 (library order):
setuptools package discovery now uses an
includeallow-list, sobuild/(and other stray top-level dirs) can no longer be picked up as packages. For autofit this also removes the stray top-leveldocs/,files/,paper/andscripts/from the published wheel. Nerves/Array/Fit/Galaxy/Lens are pending release.fix: allow-list setuptools package discovery to autofit*