Skip to content

Commit bb54f40

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
fix(project): use absolute github links on PyPi (#216)
1 parent 41dcb8c commit bb54f40

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 = "orb-billing"
33
version = "1.47.1"
44
description = "The official Python library for the orb API"
5-
readme = "README.md"
5+
dynamic = ["readme"]
66
license = "Apache-2.0"
77
authors = [
88
{ name = "Orb", 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/orb"]
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/orbcorp/orb-python/tree/main/\g<2>)'
112+
102113
[tool.black]
103114
line-length = 120
104115
target-version = ["py37"]

0 commit comments

Comments
 (0)