From 258508a1ae5b323c9d0c98c08fd7ac7240c70826 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20Ingebrigtsen=20=C3=98vergaard?= Date: Fri, 4 Oct 2024 14:05:42 +0200 Subject: [PATCH] Use same behaviour as with setup.py for finding packages When using find_packages via pyproject.toml, namespaced packages are automatically included. This means all directories in the repository root is included by default and we don't want that. The ideal solution might be to change the repo structure to src-layout[1], but for now use namespaces=false to use the same behaviour with setup.py find_packages to keep the changeset as small as possible. [1]: https://setuptools.pypa.io/en/latest/userguide/package_discovery.html#src-layout --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index b9ee7002..c2184125 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,9 +6,9 @@ requires = [ ] build-backend = "setuptools.build_meta" - [tool.setuptools.packages.find] -exclude = ["tests"] +exclude = ["tests*"] +namespaces = false # only consider directories with __init__.py as packages (old setuptools setup.py behaviour) [project] name = "fiaas-deploy-daemon"