Skip to content

fix: exclude tests/ from built wheel#509

Merged
shbatm merged 1 commit into
v3.x.xfrom
fix/exclude-tests-from-wheel
May 8, 2026
Merged

fix: exclude tests/ from built wheel#509
shbatm merged 1 commit into
v3.x.xfrom
fix/exclude-tests-from-wheel

Conversation

@shbatm
Copy link
Copy Markdown
Collaborator

@shbatm shbatm commented May 8, 2026

Summary

The 3.6.0 wheel ships a top-level tests package because setup.py calls find_packages() without exclusions. This breaks downstream consumers that have their own tests/ directory — most notably Home Assistant Core, where hassfest fails:

[ERROR] [REQUIREMENTS] Package pyisy has a forbidden top level directory 'tests' in homeassistant

Adding exclude=["tests", "tests.*"] keeps the source tree shape but limits the wheel to the pyisy package.

Verification

$ python -m build --wheel
$ python -m zipfile -l dist/pyisy-*.whl | awk '{print $1}' | grep -c "^tests"
0

Follow-up

A 3.6.1 release is needed to unblock home-assistant/core#170136.

🤖 Generated with Claude Code

The 3.6.0 wheel shipped a top-level `tests` package because setup.py
called `find_packages()` without exclusions. This collides with
downstream consumers that have their own `tests/` directory — most
notably Home Assistant Core, where hassfest rejects the dependency:

    [ERROR] [REQUIREMENTS] Package pyisy has a forbidden top level
    directory 'tests' in homeassistant

Excluding both `tests` and `tests.*` keeps the source tree shape but
keeps the wheel limited to the `pyisy` package.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@shbatm shbatm merged commit 24b1523 into v3.x.x May 8, 2026
4 checks passed
@shbatm shbatm deleted the fix/exclude-tests-from-wheel branch May 8, 2026 16:24
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