Skip to content

Commit a9b5bb2

Browse files
committed
jsonschema deserves a ✨fancy✨ readme
1 parent 0c4aaaf commit a9b5bb2

File tree

1 file changed

+22
-3
lines changed

1 file changed

+22
-3
lines changed

pyproject.toml

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[build-system]
2-
requires = ["hatchling", "hatch-vcs"]
2+
requires = ["hatchling", "hatch-vcs", "hatch-fancy-pypi-readme"]
33
build-backend = "hatchling.build"
44

55
[tool.hatch.version]
@@ -8,7 +8,6 @@ source = "vcs"
88
[project]
99
name = "jsonschema"
1010
description = "An implementation of JSON Schema validation for Python"
11-
readme = "README.rst"
1211
requires-python = ">=3.7"
1312
license = {text = "MIT"}
1413
keywords = ["validation", "data validation", "jsonschema", "json"]
@@ -30,7 +29,7 @@ classifiers = [
3029
"Programming Language :: Python :: Implementation :: CPython",
3130
"Programming Language :: Python :: Implementation :: PyPy",
3231
]
33-
dynamic = ["version"]
32+
dynamic = ["version", "readme"]
3433

3534
dependencies = [
3635
"attrs>=17.4.0",
@@ -77,6 +76,26 @@ Tidelift = "https://tidelift.com/subscription/pkg/pypi-jsonschema?utm_source=pyp
7776
Changelog = "https://github.com/python-jsonschema/jsonschema/blob/main/CHANGELOG.rst"
7877
Source = "https://github.com/python-jsonschema/jsonschema"
7978

79+
[tool.hatch.metadata.hooks.fancy-pypi-readme]
80+
content-type = "text/x-rst"
81+
82+
[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]]
83+
path = "README.rst"
84+
85+
[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]]
86+
text = """
87+
88+
89+
===================
90+
Release Information
91+
===================
92+
93+
"""
94+
95+
[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]]
96+
path = "CHANGELOG.rst"
97+
pattern = "(^v.+?)\nv"
98+
8099
[tool.isort]
81100
from_first = true
82101
include_trailing_comma = true

0 commit comments

Comments
 (0)