system-config/setup.cfg
Clark Boylan 78b0ba5062 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:

  https://setuptools.pypa.io/en/latest/userguide/package_discovery.html#automatic-discovery

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
2022-03-30 08:07:35 -07:00

32 lines
1.1 KiB
INI

[metadata]
name = openstack-infra-config
summary = OpenStack Infrastructure Config
description-file =
README.rst
author = OpenDev Contributors
author-email = service-discuss@lists.opendev.org
home-page = http://docs.openstack.org/infra/system-config/
classifier =
Environment :: OpenStack
Intended Audience :: Information Technology
Intended Audience :: System Administrators
License :: OSI Approved :: Apache Software License
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:
# https://setuptools.pypa.io/en/latest/userguide/package_discovery.html#automatic-discovery
# We essentially bypass it by telling it there are no packages to discover
# then rely on PBR to find the package for us instead.
[options]
packages =
[build_sphinx]
all_files = 1
build-dir = doc/build
source-dir = doc/source
warning-is-error = 1