From 5d528fcf8a7f45e7b5394bed02997a0c91b2d55d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 29 Mar 2024 17:00:41 +0000 Subject: [PATCH] feat(api): update via SDK Studio (#192) --- pyproject.toml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index c81f795d48e..7d652c5d80f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ name = "cloudflare" version = "3.0.0-beta.6" description = "The official Python library for the cloudflare API" -readme = "README.md" +dynamic = ["readme"] license = "Apache-2.0" authors = [ { name = "Cloudflare", email = "api@cloudflare.com" }, @@ -88,7 +88,7 @@ typecheck = { chain = [ "typecheck:mypy" = "mypy ." [build-system] -requires = ["hatchling"] +requires = ["hatchling", "hatch-fancy-pypi-readme"] build-backend = "hatchling.build" [tool.hatch.build] @@ -99,6 +99,17 @@ include = [ [tool.hatch.build.targets.wheel] packages = ["src/cloudflare"] +[tool.hatch.metadata.hooks.fancy-pypi-readme] +content-type = "text/markdown" + +[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]] +path = "README.md" + +[[tool.hatch.metadata.hooks.fancy-pypi-readme.substitutions]] +# replace relative links with absolute links +pattern = '\[(.+?)\]\(((?!https?://)\S+?)\)' +replacement = '[\1](https://github.com/cloudflare/cloudflare-python/tree/main/\g<2>)' + [tool.black] line-length = 120 target-version = ["py37"]