Workaround setuptools 61.0.0 package auto discovery problems

New setuptools is auto discoverying multiple package dirs in our repo
because multiple top level dirs contain python content. While auto
discovery excludes common dirs like doc/, testinfra/, and tools/ others
are not excluded from discovery like playbooks/ and docker/. This
results in an error as auto discovery is only valid if a single possible
package dir is discovered.

It would be preferable to exclude the additional dirs instead but I
can't seem to find a way to do that. The documentation can be found at:

To workaround this we tell setuptools to not auto discovery packages by
setting an empty packages list in setup.cfg. Then we rely on PBR to do
its job and find the package content via git repo information.

Change-Id: I4d334880acb84de709dfc3090a86ec2d43e406f8
Clark Boylan 10 months ago
parent 7a7edb11cd
commit 78b0ba5062

@ -14,6 +14,16 @@ classifier =
Operating System :: POSIX :: Linux
Programming Language :: Python
# This is here to workaround setuptools automatic package discovery problems.
# Setuptools finds multiple packages which is an error with autodiscovery.
# This is due to having python files in separate top level dirs that are not
# excluded from searching. All of this is documented at:
# We essentially bypass it by telling it there are no packages to discover
# then rely on PBR to find the package for us instead.
packages =
all_files = 1
build-dir = doc/build