Skip to content

fix: allow-list setuptools package discovery (autolens*) - #775

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/setuptools-include-packages
Oct 7, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
feature/setuptools-include-packages

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

[tool.setuptools.packages.find] had only an exclude list. Discovery runs in namespace mode, so setuptools packaged every directory in the repo except the excluded names:

  • a local build/ was re-packaged one level deeper on each pip install . / python -m build (build/lib/build/lib/…), and top_level.txt listed build;
  • exclude = ["docs"] drops only the top-level name, so docs/ subdirectories, and in some repos files/, paper/ and scripts/, could reach the wheel. The PyPI autofit-2026.10.4.1 wheel 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 autolens package contents are unchanged.

Test Plan

  • python -m build --wheel into a scratch dir: the wheel's top level is only autolens/ + *.dist-info.
  • Rebuilding with a build/ directory present creates no nested build/ (checked on PyAutoNerves), and the regenerated top_level.txt is autonerves.
  • Unit tests: 832 passed, 1 xfailed
  • import autolens from the worktree.

Coordination with the other tasks holding this repo was authorised by the human on 2026-10-07. This PR touches only pyproject.toml and .gitignore, which now ignores build/ (the only library that did not).

Generated by the PyAutoLabs agent workflow.

🤖 Generated with Claude Code

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>
@Jammy2211 Jammy2211 added the pending-release PR queued for the next release build label Oct 7, 2026
@Jammy2211
Jammy2211 merged commit 5bfcd0b into main Oct 7, 2026
4 checks passed
@Jammy2211
Jammy2211 deleted the feature/setuptools-include-packages branch October 7, 2026 11:56
@Jammy2211 Jammy2211 removed the pending-release PR queued for the next release build label Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant