Skip to content

Commit 92cb89f

Browse files
fix(packaging): prevent unwanted files and tests from being installed
Explicitly define included packages and disable automatic package data inclusion. This ensures that: - Dev-only paths like `tools/` and `example/` are not installed. - The `codespell_lib.tests` subpackage is excluded from the wheel. - Only files explicitly listed in `package-data` are bundled. Signed-off-by: Mikel Olasagasti Uranga <mikel@olasagasti.info>
1 parent 0cf8151 commit 92cb89f

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

pyproject.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,17 @@ requires = ["setuptools>=77", "setuptools_scm[toml]>=6.2, != 8.0.0"]
7070
[tool.setuptools_scm]
7171
write_to = "codespell_lib/_version.py"
7272

73+
[tool.setuptools]
74+
include-package-data = false
75+
7376
[tool.setuptools.packages.find]
77+
include = ["codespell_lib", "codespell_lib.*"]
7478
exclude = [
7579
"dist",
7680
"snap",
81+
"tools",
82+
"example",
83+
"codespell_lib.tests*",
7784
]
7885

7986
[tool.setuptools.package-data]

0 commit comments

Comments
 (0)