Skip to content

build: include test suite in sdist package (#114) - #116

Open
chiragjangiir wants to merge 1 commit into
beetbox:masterfrom
chiragjangiir:fix/sdist-include-tests
Open

chiragjangiir wants to merge 1 commit into
beetbox:masterfrom
chiragjangiir:fix/sdist-include-tests

Conversation

@chiragjangiir

Copy link
Copy Markdown

Closes #114

Problem

As reported in #114, the test/ directory and its fixtures were missing from the published PyPI source distribution (sdist), causing pytest runs directly from the sdist tarball (e.g., in downstream package maintainer pipelines) to collect 0 items and fail.

Solution

Configured poetry's include table in pyproject.toml to package test into sdist distributions:

[tool.poetry]
include = [
    { path = "test", format = "sdist" },
]

Verification

  1. Built sdist with python3 -m build --sdist:
    • Verified with tar -tzf dist/mediafile-*.tar.gz that test/__init__.py, test/_common.py, and all test/rsrc/* media fixtures are present.
  2. Built wheel with python3 -m build --wheel:
    • Verified with unzip -l dist/*.whl that the binary wheel remains lean and contains only mediafile package code, license, and metadata without test bloat.

This branch has not been deployed

No deployments
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.

Include the test suite in PyPI source distributions

1 participant