Hatch plugin that adds a packaging extra to the wheel metadata with pinned dependencies from uv.lock
.
# pyproject.toml
[build-system]
requires = [
"hatchling",
"hatch-pinned-extra",
]
build-backend = "hatchling.build"
[tool.hatch.metadata.hooks.pinned_extra]
name = "pinned"
If your package doesn't have any optional dependencies already, you will need to mark them as dynamic:
# pyproject.toml
[project]
dynamic = [
"optional-dependencies",
]