Skip to content

build: render README alerts as bold notes on PyPI#19

Merged
jeqcho merged 1 commit into
mainfrom
pypi-readme-alerts
Jul 9, 2026
Merged

build: render README alerts as bold notes on PyPI#19
jeqcho merged 1 commit into
mainfrom
pypi-readme-alerts

Conversation

@jeqcho

@jeqcho jeqcho commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

GitHub's > [!NOTE] alert syntax renders as a callout on github.com but shows up as literal [!NOTE] text on PyPI project pages (PyPI's renderer doesn't support the alerts extension). With the early-development note now in the README, the next release would have shipped that literal text to PyPI.

This PR adds hatch-fancy-pypi-readme so the PyPI long description is generated from README.md with alert markers rewritten to portable bold blockquotes (> [!NOTE]> **Note:**; TIP/IMPORTANT/WARNING/CAUTION likewise). The README itself is unchanged — GitHub keeps rendering the nice callout.

Why here and not a sed step in release.yml: rewriting the README mid-workflow would dirty the tag checkout and make hatch-vcs emit a +dYYYYMMDD local version, which PyPI rejects. The metadata-hook approach keeps the tree clean and also fixes local uv build.

  • uv.lock unchanged — build-system requirements aren't part of the dependency lock.
  • Verified locally: uv build sdist PKG-INFO and a wheel built from the extracted sdist both contain > **Note:** and no literal [!NOTE] (README.md was already in the sdist include list).

🤖 Generated with Claude Code

GitHub alert syntax ([!NOTE] etc.) shows up literally on PyPI. Generate
the long description via hatch-fancy-pypi-readme, rewriting alerts to
bold blockquotes at build time; the README keeps the GitHub callout.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@jeqcho
jeqcho merged commit 228da17 into main Jul 9, 2026
9 checks passed
@jeqcho
jeqcho deleted the pypi-readme-alerts branch July 9, 2026 21:07
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