Skip to content

fix: exclude tests and benchmarks from wheels - #1556

Closed
nightcityblade wants to merge 1 commit into
python-jsonschema:mainfrom
nightcityblade:fix/issue-1552
Closed

fix: exclude tests and benchmarks from wheels#1556
nightcityblade wants to merge 1 commit into
python-jsonschema:mainfrom
nightcityblade:fix/issue-1552

Conversation

@nightcityblade

Copy link
Copy Markdown

What Problem This Solves

The wheel currently bundles the test suite and benchmarks even though neither is needed at runtime. This adds unnecessary files and size to installed distributions.

Fixes #1552.

Why This Change Was Made

The Hatch wheel target now excludes jsonschema/tests and jsonschema/benchmarks while the source distribution continues to include both. The build session also inspects the generated wheel and fails if either directory is bundled again.

User Impact

Future wheels contain only runtime package files, producing a smaller, cleaner installation without changing library behavior or source distributions.

Evidence

  • Full test suite: 8,512 tests completed (7,809 passed, 703 skipped)
  • Ruff: passed
  • Distribution build, wheel-content assertion, Twine strict validation, and changelog validation: passed
  • Verified the source distribution still includes tests and benchmarks

@nightcityblade

Copy link
Copy Markdown
Author

Superseded by #1557. I corrected the branch history and opened the clean two-file, one-commit version there.

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.

Avoid shipping benchmarks and tests in wheels

1 participant