Revert "cleanup setup.py config"

This reverts commit 6c976e61a9.

Reason for revert:
Removal of setup.py caused problems with installation in tripleo-quickstart:

2022-03-31 16:20:19.128604 | primary | ERROR: openstack-ansible-os_tempest from file:///home/zuul/src/opendev.org//openstack/openstack-ansible-os_tempest/#egg=openstack-ansible-os_tempest (from -r quickstart-extras-requirements.txt (line 5)) does not appear to be a Python project: neither 'setup.py' nor 'pyproject.toml' found.

Disable setuptools auto discovery

Jobs are broken due to a release of setuptools 61.0 introducing
non-backwards compatible breaking changes [1]

Setting py_modules to an empty string here will disable autodiscovery
and should permit jobs to run as before.

[1] https://github.com/pypa/setuptools/issues/3197

Signed-off-by: Neil Hanlon <neil@shrug.pw>

Change-Id: I8ee5fa36a6b0cbce2d1811d9f40202fd083e4767
This commit is contained in:
Dariusz Smigiel 2022-03-31 20:35:55 +00:00 committed by Marc Gariepy
parent 6c976e61a9
commit 395d70f086
3 changed files with 47 additions and 1 deletions

23
setup.cfg Normal file
View File

@ -0,0 +1,23 @@
[metadata]
name = openstack-ansible-os_tempest
summary = os_tempest for OpenStack Ansible
description-file =
README.rst
author = OpenStack
author-email = openstack-discuss@lists.openstack.org
home-page = https://docs.openstack.org/openstack-ansible-os_tempest/latest/
classifier =
Intended Audience :: Developers
Intended Audience :: System Administrators
License :: OSI Approved :: Apache Software License
Operating System :: POSIX :: Linux
[files]
data_files =
usr/local/share/ansible/roles/os_tempest/defaults = defaults/*
usr/local/share/ansible/roles/os_tempest/meta = meta/*
usr/local/share/ansible/roles/os_tempest/tasks = tasks/*
usr/local/share/ansible/roles/os_tempest/templates = templates/*
usr/local/share/ansible/roles/os_tempest/files = files/*
usr/local/share/ansible/roles/os_tempest/vars = vars/*

21
setup.py Normal file
View File

@ -0,0 +1,21 @@
# Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import setuptools
setuptools.setup(
setup_requires=['pbr>=2.0.0'],
py_modules=[],
pbr=True)

View File

@ -6,7 +6,9 @@ ignore_basepython_conflict = True
[testenv]
basepython = python3
usedevelop = False
usedevelop = True
install_command =
pip install -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} {opts} {packages}
commands =
/usr/bin/find . -type f -name "*.pyc" -delete
passenv =