-
Notifications
You must be signed in to change notification settings - Fork 194
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
25 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
[build-system] | ||
build-backend = "hatchling.build" | ||
requires = ["hatchling<2"] | ||
requires = ["hatchling<2", "hatch-fancy-pypi-readme"] | ||
|
||
[project] | ||
name = "pymc-marketing" | ||
description = "Marketing Statistical Models in PyMC" | ||
requires-python = ">=3.10" | ||
readme = "README.md" | ||
license = { file = "LICENSE" } | ||
dynamic = ["version"] | ||
dynamic = ["version", "readme"] | ||
maintainers = [{ name = "PyMC Labs", email = "[email protected]" }] | ||
classifiers = [ | ||
"Development Status :: 5 - Production/Stable", | ||
|
@@ -97,8 +96,29 @@ packages = [ | |
[tool.hatch.version] | ||
path = "pymc_marketing/version.py" | ||
|
||
[tool.setuptools.dynamic] | ||
version = { file = "pymc_marketing/version.txt" } | ||
# <https://github.com/hynek/hatch-fancy-pypi-readme> | ||
[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]] | ||
# Image links should go to the raw content on GitHub | ||
# <https://stackoverflow.com/a/46875147> | ||
pattern = '\[(.*?)\]\(((?!https?://)\S+\.(png|jpe?g|svg|gif))\)' | ||
replacement = '[\1](https://raw.githubusercontent.com/pymc-labs/pymc-marketing/main/\g<2>)' | ||
|
||
[[tool.hatch.metadata.hooks.fancy-pypi-readme.substitutions]] | ||
# Handle also HTML image tags | ||
pattern = '''(<img\b[^>]*\bsrc=)(['"])((?!https?://)[^'"]+)(['"][^>]*>)''' | ||
replacement = '<img src="https://raw.githubusercontent.com/pymc-labs/pymc-marketing/main/\g<3>\g<4>' | ||
|
||
[[tool.hatch.metadata.hooks.fancy-pypi-readme.substitutions]] | ||
# Remaining non-image relative links map to the normal absolute GitHub URL | ||
# <https://stackoverflow.com/a/46875147> | ||
pattern = '\[(.*?)\]\(((?!https?://)\S+)\)' | ||
replacement = '[\1](https://github.com/pymc-labs/pymc-marketing/tree/main/\g<2>)' | ||
|
||
[project.urls] | ||
repository = "https://github.com/pymc-labs/pymc-marketing" | ||
|