From 8bc0f1136633277c6790d4d3b83e73fb796ec05a Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sun, 5 Apr 2020 10:27:56 +0200 Subject: [PATCH] Cleanup py27 support Make a few cleanups: - Remove python 2.7 stanza from setup.py - Add requires on python >= 3.6 to setup.cfg so that pypi and pip know about the requirement - Remove obsolete sections from setup.cfg: * Wheel is not needed for python 3 only repo * Some other sections are obsolete - tox.ini: Move constraints into deps, remove install_command since the default is fine Change-Id: Ifc4c123f30451ab6844d8b2f704b930760ebcef8 --- setup.cfg | 7 +------ setup.py | 9 --------- tox.ini | 2 +- 3 files changed, 2 insertions(+), 16 deletions(-) diff --git a/setup.cfg b/setup.cfg index 08e3de9..7b3547b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -3,6 +3,7 @@ name = sahara-extra summary = Extras for Sahara: hadoop-swiftfs description-file = README.rst license = Apache Software License +python-requires = >=3.6 classifiers = Intended Audience :: Information Technology Intended Audience :: System Administrators @@ -11,9 +12,3 @@ classifiers = author = OpenStack author-email = openstack-discuss@lists.openstack.org home-page = https://docs.openstack.org/sahara/latest/ - -[global] -setup-hooks = pbr.hooks.setup_hook - -[wheel] -universal = 1 diff --git a/setup.py b/setup.py index 566d844..cd35c3c 100644 --- a/setup.py +++ b/setup.py @@ -13,17 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -# THIS FILE IS MANAGED BY THE GLOBAL REQUIREMENTS REPO - DO NOT EDIT import setuptools -# In python < 2.7.4, a lazy loading of package `pbr` will break -# setuptools if some other modules registered functions in `atexit`. -# solution from: http://bugs.python.org/issue15881#msg170215 -try: - import multiprocessing # noqa -except ImportError: - pass - setuptools.setup( setup_requires=['pbr>=2.0.0'], pbr=True) diff --git a/tox.ini b/tox.ini index c64b50d..303f604 100644 --- a/tox.ini +++ b/tox.ini @@ -6,10 +6,10 @@ skipsdist = True [testenv] basepython = python3 usedevelop = True -install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} {opts} {packages} setenv = VIRTUAL_ENV={envdir} deps = + -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt