Skip to content

Commit 5d528fc

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
feat(api): update via SDK Studio (#192)
1 parent b705bb6 commit 5d528fc

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

pyproject.toml

+13-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "cloudflare"
33
version = "3.0.0-beta.6"
44
description = "The official Python library for the cloudflare API"
5-
readme = "README.md"
5+
dynamic = ["readme"]
66
license = "Apache-2.0"
77
authors = [
88
{ name = "Cloudflare", email = "[email protected]" },
@@ -88,7 +88,7 @@ typecheck = { chain = [
8888
"typecheck:mypy" = "mypy ."
8989

9090
[build-system]
91-
requires = ["hatchling"]
91+
requires = ["hatchling", "hatch-fancy-pypi-readme"]
9292
build-backend = "hatchling.build"
9393

9494
[tool.hatch.build]
@@ -99,6 +99,17 @@ include = [
9999
[tool.hatch.build.targets.wheel]
100100
packages = ["src/cloudflare"]
101101

102+
[tool.hatch.metadata.hooks.fancy-pypi-readme]
103+
content-type = "text/markdown"
104+
105+
[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]]
106+
path = "README.md"
107+
108+
[[tool.hatch.metadata.hooks.fancy-pypi-readme.substitutions]]
109+
# replace relative links with absolute links
110+
pattern = '\[(.+?)\]\(((?!https?://)\S+?)\)'
111+
replacement = '[\1](https://github.com/cloudflare/cloudflare-python/tree/main/\g<2>)'
112+
102113
[tool.black]
103114
line-length = 120
104115
target-version = ["py37"]

0 commit comments

Comments
 (0)