From fb7843ec5a0f006139376218564785e0e5391f1f Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 19 May 2020 11:02:05 +0200 Subject: [PATCH] Cleanup py27 support This repo is now testing only with Python 3, so let's make a few cleanups: - Remove python 2.7 stanza from setup.py - Remove obsolete sections from setup.cfg - Update classifiers - Remove install_command from tox.ini, the default is fine - Remove babel.cfg, it's not needed anymore. - Use TOX_CONSTRAINTS_FILE, UPPER_CONSTRAINTS_FILE is obsolete Change-Id: I235cf10f6a619fa6c41e688a17337385a1034aa2 --- babel.cfg | 2 -- setup.cfg | 33 ++------------------------------- setup.py | 9 --------- tox.ini | 8 +++++--- 4 files changed, 7 insertions(+), 45 deletions(-) delete mode 100644 babel.cfg diff --git a/babel.cfg b/babel.cfg deleted file mode 100644 index 15cd6cb..0000000 --- a/babel.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[python: **.py] - diff --git a/setup.cfg b/setup.cfg index 40f8cbc..dbe456b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -14,6 +14,8 @@ classifier = License :: OSI Approved :: Apache Software License Operating System :: POSIX :: Linux Programming Language :: Python + Programming Language :: Python :: Implementation :: CPython + Programming Language :: Python :: 3 :: Only Programming Language :: Python :: 3 Programming Language :: Python :: 3.6 Programming Language :: Python :: 3.7 @@ -21,34 +23,3 @@ classifier = [files] packages = devstack - -[build_sphinx] -source-dir = doc/source -build-dir = doc/build -all_files = 1 - -[upload_sphinx] -upload-dir = doc/build/html - -[entry_points] -console_scripts = - dsconf = devstack.cmd:main - -[compile_catalog] -directory = devstack/locale -domain = devstack - -[update_catalog] -domain = devstack -output_dir = devstack/locale -input_file = devstack/locale/devstack.pot - -[extract_messages] -keywords = _ gettext ngettext l_ lazy_gettext -mapping_file = babel.cfg -output_file = devstack/locale/devstack.pot - -[build_releasenotes] -all_files = 1 -build-dir = releasenotes/build -source-dir = releasenotes/source diff --git a/setup.py b/setup.py index 782bb21..0cdc8c2 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>=1.8'], pbr=True) diff --git a/tox.ini b/tox.ini index ed808da..ffaaf58 100644 --- a/tox.ini +++ b/tox.ini @@ -7,11 +7,12 @@ ignore_basepython_conflict = True [testenv] basepython = python3 usedevelop = True -install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages} setenv = VIRTUAL_ENV={envdir} PYTHONWARNINGS=default::DeprecationWarning -deps = -r{toxinidir}/test-requirements.txt +deps = + -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} + -r{toxinidir}/test-requirements.txt commands = python setup.py test --slowest --testr-args='{posargs}' [testenv:pep8] @@ -25,7 +26,7 @@ commands = python setup.py test --coverage --testr-args='{posargs}' [testenv:docs] 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}/doc/requirements.txt commands = @@ -34,6 +35,7 @@ commands = whitelist_externals = rm [testenv:releasenotes] +deps = {[testenv:docs]deps} commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html