Skip to content

Commit

Permalink
Use same behaviour as with setup.py for finding packages
Browse files Browse the repository at this point in the history
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
  • Loading branch information
oyvindio committed Oct 4, 2024
1 parent 91d2d7e commit 258508a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 258508a

Please sign in to comment.