Skip to content

Commit 484b2bc

Browse files
Explicitly declare py.typed in the wheel manifest
Hatchling's default file selection already picks up py.typed via the ``packages`` directory, but declaring it explicitly via force-include is the documented PEP 561 pattern and keeps the intent obvious to anyone auditing the wheel contents (or to any future refactor of the source layout). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent f7bb86e commit 484b2bc

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

pyproject.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ dev = ["pytest>=8.0", "pytest-cov>=4.0", "mypy>=1.0", "ruff>=0.4"]
3434
[tool.hatch.build.targets.wheel]
3535
packages = ["src/dqlitewire"]
3636

37+
# Hatchling's default file-selection would already ship ``py.typed`` via
38+
# ``packages``, but declaring it explicitly is the documented PEP 561
39+
# pattern and makes the intent obvious to anyone auditing the wheel.
40+
[tool.hatch.build.targets.wheel.force-include]
41+
"src/dqlitewire/py.typed" = "dqlitewire/py.typed"
42+
3743
[tool.pytest.ini_options]
3844
testpaths = ["tests"]
3945
pythonpath = ["src"]

0 commit comments

Comments
 (0)