Skip to content

Ship .pyc and .DS_Store test fixtures in the sdist#646

Merged
audreyfeldroy merged 1 commit intomainfrom
fix-sdist-test-fixtures
Mar 8, 2026
Merged

Ship .pyc and .DS_Store test fixtures in the sdist#646
audreyfeldroy merged 1 commit intomainfrom
fix-sdist-test-fixtures

Conversation

@audreyfeldroy
Copy link
Copy Markdown
Collaborator

Summary

Hatchling excludes .DS_Store via a hardcoded constant in
hatchling/builders/constants.py and .pyc files via
.gitignore's *.py[codz] glob. Both are test fixtures
that need to be in the archive for tests to pass when
run from the sdist.

force-include in pyproject.toml overrides both exclusion
mechanisms. A new test builds the sdist and verifies all
four fixtures are present.

Closes #641.

Test plan

  • test_sdist_includes_pyc_fixtures fails without the fix (red)
  • test_sdist_includes_pyc_fixtures passes with the fix (green)
  • Full test suite passes (213 tests)

Hatchling excludes .DS_Store via a hardcoded constant and .pyc
files via .gitignore's *.py[codz] glob. Both are test fixtures
that need to be in the archive. force-include overrides both
exclusion mechanisms.

Closes #641.
@audreyfeldroy audreyfeldroy merged commit cccc976 into main Mar 8, 2026
9 checks passed
@audreyfeldroy audreyfeldroy deleted the fix-sdist-test-fixtures branch March 8, 2026 14:49
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.

Missing test data in source distribution

1 participant