Skip to article frontmatterSkip to article content

Declaring Data Files with Hatchling

Data Files are only specified for the wheel builder:

pyproject.toml
1
2
3
4
5
[tool.hatch.build.targets.wheel.shared-data]
# Under /share
"a-file.json" = "share/arrow_to_knee/a-file.json"
# Under /etc
"a-directory" = "etc/arrow_to_knee/a-directory"

Program 1 places two data files/folders under the sys.prefix: one under /share and one under /etc.