From 276d2cf9b66ce1eacbf4156e74451609bcd5d2f3 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sun, 3 May 2020 16:01:21 +0200 Subject: [PATCH] Cleanup py27 support This repo is now testing only with Python 3, so let's make a few cleanups: - Add requires on python >= 3.6 to setup.cfg so that pypi and pip know about the requirement - Remove obsolete sections from setup.cfg - Update requirements, no need for python_version anymore - Use newer openstackdocstheme and Sphinx versions - Remove install_command from tox.ini, the default is fine - Remove babel.cfg, it's not needed - move basepython into testenv Change-Id: I4c0e3b9b12c6b46c3b6b6a2f8f96e6996421dd8d --- babel.cfg | 1 - requirements.txt | 2 +- setup.cfg | 9 +-------- test-requirements.txt | 5 ++--- tox.ini | 12 +++++------- 5 files changed, 9 insertions(+), 20 deletions(-) delete mode 100644 babel.cfg diff --git a/babel.cfg b/babel.cfg deleted file mode 100644 index efceab81..00000000 --- a/babel.cfg +++ /dev/null @@ -1 +0,0 @@ -[python: **.py] diff --git a/requirements.txt b/requirements.txt index aa25e429..6de9f4e8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,4 +2,4 @@ # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. -pbr>=0.5.21,<1.0 +pbr!=2.1.0,>=2.0.0 # Apache-2.0 diff --git a/setup.cfg b/setup.cfg index 96ccb072..843fe613 100644 --- a/setup.cfg +++ b/setup.cfg @@ -7,6 +7,7 @@ author = OpenStack author-email = openstack-discuss@lists.openstack.org license = Apache License (2.0) home-page = https://opendev.org/openstack/tripleo-puppet-elements +python-requires = >=3.6 classifier = Environment :: OpenStack Development Status :: 3 - Alpha @@ -18,11 +19,3 @@ classifier = [files] data_files = share/tripleo-puppet-elements = elements/* - -[wheel] -universal = 1 - -[build_sphinx] -all_files = 1 -build-dir = doc/build -source-dir = doc/source diff --git a/test-requirements.txt b/test-requirements.txt index 16a67a55..cfdd4f9d 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -5,9 +5,8 @@ hacking>=3.0,<3.1.0 # Apache-2.0 oslotest -sphinx>=1.8.0,<2.0.0;python_version=='2.7' # BSD -sphinx>=1.8.0,!=2.1.0;python_version>='3.4' # BSD -openstackdocstheme>=1.20.0 # Apache-2.0 +sphinx>=2.0.0,!=2.1.0 # BSD +openstackdocstheme>=2.0.0 # Apache-2.0 testrepository>=0.0.18 # This is required for the releasenotes build jobs diff --git a/tox.ini b/tox.ini index 7b88fc78..5bc53f67 100644 --- a/tox.ini +++ b/tox.ini @@ -1,24 +1,23 @@ [tox] -minversion = 2.0 +minversion = 3.1.1 skipsdist = True -envlist = pep8,py27,py37 +envlist = pep8,py36,py37 +ignore_basepython_conflict = True [testenv] usedevelop = True -install_command = pip install {opts} {packages} +basepython = python3 deps = - -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} + -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt commands= python setup.py testr --slowest --testr-args='{posargs}' [testenv:venv] -basepython = python3 commands = {posargs} [testenv:pep8] -basepython = python3 commands = ./run-flake8 [flake8] @@ -27,5 +26,4 @@ exclude = .venv,.tox,dist,*.egg,build,releasenotes show-source = true [testenv:releasenotes] -basepython = python3 commands = bash -c tools/releasenotes_tox.sh