From b93852b204ef6a94d68d213cd689714ceb04c89c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jelmer=20Vernoo=C4=B3?= Date: Mon, 10 Nov 2025 22:37:17 +0000 Subject: [PATCH] Fix packaging configuration warnings - Added explicit documentation files inclusion to MANIFEST.in to ensure all doc/*.rst and doc/*.py files are included in source distributions - Added wheel build configuration to properly specify package contents with only-include directive, addressing the implicit zip_safe concerns - The doc/_build prune directive is kept to exclude build artifacts Fixes: https://bugs.launchpad.net/testtools/+bug/803845 --- MANIFEST.in | 1 + pyproject.toml | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/MANIFEST.in b/MANIFEST.in index f8cfd680..abc347be 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -4,4 +4,5 @@ include MANIFEST.in include NEWS include README.rst include .gitignore +recursive-include doc *.rst *.py prune doc/_build diff --git a/pyproject.toml b/pyproject.toml index 00783e32..a0f5cec3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,6 +49,10 @@ version = {version!r} __version__ = {version_tuple!r} """ +[tool.hatch.build.targets.wheel] +# testtools is not zip safe due to dynamic imports and resource loading +only-include = ["testtools"] + [tool.mypy] warn_redundant_casts = true warn_unused_configs = true