Skip to content

fix: resolve the `Multiple top-level packages discovered in a flat-layout` error with pip install

Baptiste Rousseau requested to merge fix-pip into dev

In order to fix the Multiple top-level packages discovered in a flat-layout error when doing pip install -e ., I explicitly removed some directories from the path where setuptools should search for packages.

Other workarounds I found are also by altering setuptools settings in the toml:

[tool.setuptools]
include-package-data = false

[tool.setuptools.packages.find]
where = ["madbot_api"]

or

[tool.setuptools]
py-modules = []

But they both seems to remove the installation of madbot_api. These workarounds are based on the thread of this issue - https://github.com/pypa/setuptools/issues/3197

Edited by Baptiste Rousseau

Merge request reports