From c91fbd13b8425714721488e7fcef035228983333 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sun, 10 May 2020 14:29:56 +0200 Subject: [PATCH] Cleanup cruft Let's make a few cleanups: - Remove python 2.7 stanza from setup.py - Remove obsolete sections from setup.cfg - Update classifiers - Update requirements, no need for python_version anymore - Use newer openstackdocstheme and Sphinx versions - Remove install_command from tox.ini, the default is fine; move constraints into deps - Remove Babel from requirements, it's not needed for running; remove babel.cfg - Use TOX_CONSTRAINTS_FILE, UPPER_CONSTRAINTS_FILE is obsolete - update to hacking 3.0 Change-Id: Ic8426d14ba489a88ab73d7dd02e6dfd71b312ca3 --- babel.cfg | 2 -- doc/requirements.txt | 5 ++--- setup.cfg | 25 ++----------------------- setup.py | 9 --------- test-requirements.txt | 2 +- tox.ini | 9 +++++---- 6 files changed, 10 insertions(+), 42 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/doc/requirements.txt b/doc/requirements.txt index ddf8411..805ecb6 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -3,9 +3,8 @@ # process, which may cause wedges in the gate later. sphinxcontrib-apidoc>=0.2.0 # BSD -sphinx!=1.6.6,!=1.6.7,>=1.6.2,<2.0.0;python_version=='2.7' # BSD -sphinx!=1.6.6,!=1.6.7,>=1.6.2,!=2.1.0;python_version>='3.4' # BSD -openstackdocstheme>=1.18.1 # Apache-2.0 +sphinx>=2.0.0,!=2.1.0 # BSD +openstackdocstheme>=2.0.0 # Apache-2.0 # releasenotes reno>=2.5.0 # Apache-2.0 diff --git a/setup.cfg b/setup.cfg index 8c31e64..e255892 100644 --- a/setup.cfg +++ b/setup.cfg @@ -13,6 +13,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 @@ -24,26 +26,3 @@ packages = [entry_points] tempest.test_plugins = trove_tests = trove_tempest_plugin.plugin:TroveTempestPlugin - -[build_sphinx] -all-files = 1 -warning-is-error = 1 -source-dir = doc/source -build-dir = doc/build - -[upload_sphinx] -upload-dir = doc/build/html - -[compile_catalog] -directory = trove_tempest_plugin/locale -domain = trove_tempest_plugin - -[update_catalog] -domain = trove_tempest_plugin -output_dir = trove_tempest_plugin/locale -input_file = trove_tempest_plugin/locale/trove_tempest_plugin.pot - -[extract_messages] -keywords = _ gettext ngettext l_ lazy_gettext -mapping_file = babel.cfg -output_file = trove_tempest_plugin/locale/trove_tempest_plugin.pot 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/test-requirements.txt b/test-requirements.txt index 47c128f..1e278d1 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -2,7 +2,7 @@ # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. -hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0 +hacking>=3.0,<3.1.0 # Apache-2.0 coverage!=4.4,>=4.0 # Apache-2.0 python-subunit>=1.0.0 # Apache-2.0/BSD diff --git a/tox.ini b/tox.ini index 424baa6..a5649db 100644 --- a/tox.ini +++ b/tox.ini @@ -7,14 +7,15 @@ 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 OS_STDOUT_CAPTURE=1 OS_STDERR_CAPTURE=1 OS_TEST_TIMEOUT=60 -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 = stestr run {posargs} [testenv:pep8] @@ -35,14 +36,14 @@ commands = [testenv:docs] deps = + -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/doc/requirements.txt commands = rm -rf doc/build sphinx-build -W -b html doc/source doc/build/html [testenv:releasenotes] -deps = - -r{toxinidir}/doc/requirements.txt +deps = {[testenv:docs]deps} commands = rm -rf releasenotes/build sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html