Skip to content

fix(packaging): populate PyPI project description via readme field#189

Merged
tmgbedu merged 1 commit into
mainfrom
task/pypi-readme-metadata-1146
Jul 19, 2026
Merged

fix(packaging): populate PyPI project description via readme field#189
tmgbedu merged 1 commit into
mainfrom
task/pypi-readme-metadata-1146

Conversation

@tmgbedu

@tmgbedu tmgbedu commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Root cause

PyPI's "Project description" section renders the long description (Description body / Description-Content-Type in METADATA), which comes from [project].readme in pyproject.toml. The #682 fix (PR #148) added description (Summary), keywords, and [project.urls], but never added a readme field.

Confirmed by building the package before this fix and inspecting the wheel's dist-info/METADATA:

  • Summary: was populated correctly.
  • No Description-Content-Type header and no description body at all.

Also confirmed against the live PyPI API (https://pypi.org/pypi/fastapi-startkit/json) — the currently published 0.50.0 release has info.description as an empty string, even though it was published after the #682 fix. So this is not a "no release since the fix" issue — every version published since #682 (0.47.0 through 0.50.0) has this problem, because the root misconfiguration (missing readme) was never addressed.

Fix

Add readme = "README.md" to [project] in fastapi_startkit/pyproject.toml, pointing at the existing fastapi_startkit/README.md.

Verification

Built the package locally with uv build before and after the change and inspected the wheel METADATA:

  • Before: no Description-Content-Type, no description body.
  • After: Description-Content-Type: text/markdown present, and the full README content appended as the METADATA body.
  • twine check passes on both the sdist and wheel.

No dependency, version, or behavior changes — metadata only.

Note: this PR does not publish to PyPI or merge anything. Sign-off required before publish/merge.

pyproject.toml never declared [project].readme, so the built wheel/sdist
METADATA has no Description body or Description-Content-Type — only the
short Summary was populated. This is why PyPI renders 'no project
description provided' even after the #682 description/keywords/urls fix,
and it affects every version published since then, including the
currently-live 0.50.0.
@codecov

codecov Bot commented Jul 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@tmgbedu
tmgbedu merged commit ead6e43 into main Jul 19, 2026
6 checks passed
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