Skip to content

fix: include license and tests in sdist - #661

Open
nightcityblade wants to merge 1 commit into
elapouya:masterfrom
nightcityblade:fix/issue-660-sdist
Open

fix: include license and tests in sdist#661
nightcityblade wants to merge 1 commit into
elapouya:masterfrom
nightcityblade:fix/issue-660-sdist

Conversation

@nightcityblade

Copy link
Copy Markdown

Fixes #660

Summary

  • explicitly include LICENSE.txt in PDM source distributions
  • include the complete tests/ tree for downstream packagers without adding it to wheels

Testing

  • uv build (sdist and wheel)
  • verified the archived license is byte-identical to LICENSE.txt
  • verified the sdist contains 92 test entries and the wheel contains none
  • uv run --project .. --frozen python runtests.py (from tests/)
  • uv run --frozen flake8 docxtpl tests setup.py --count --max-line-length=127 --show-source --statistics

@CAOShurong CAOShurong left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the exact PR head 055d03f627d41af111eff55ef5238d1363e7ab63 independently.

  • The published PyPI 0.20.2 sdist has 0 license entries and 0 test entries.
  • A build from this PR contains the byte-identical LICENSE.txt (SHA-256 06eb1c44...) and 92 test entries in the sdist.
  • The wheel contains the license under .dist-info/licenses/ and contains no tests.
  • The 36 non-CLI test scripts passed in a clean wheel-installed Python 3.13 environment; the module CLI path also passed separately and produced a 13,419-byte DOCX.
  • The repository's flake8 command and git diff --check both passed.

The latest pdm-backend also happens to include these files implicitly when rebuilding the base commit today, but declaring source-includes explicitly makes the intended sdist contents robust instead of depending on backend-default drift. This looks correct and focused to me.

OpenAI Codex assisted with the reproduction and verification. I reviewed the diff and the observed results before approving.

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 LICENSE.txt in 0.20.2

2 participants