From 28330e91f81ad350dc8e17a9ec8b81fdf7fd4187 Mon Sep 17 00:00:00 2001 From: zhurong Date: Mon, 11 May 2020 10:11:47 +0800 Subject: [PATCH] Cleanup py27 support This repo is now testing only with Python 3, so let's make a few cleanups: - Remove obsolete sections from setup.cfg - Remove babel.cfg, this is not needed here at all - Update requirements, no need for python_version anymore - Switch to using sphinx-build - Use newer openstackdocstheme and Sphinx versions - Cleanup */source/conf.py to remove now obsolete content. - Remove install_command from tox.ini, the default is fine - Use TOX_CONSTRAINTS_FILE, UPPER_CONSTRAINTS_FILE is obsolete Change-Id: Ie04a0c0c5270ae49097c3784bac3467c8e43acca --- babel.cfg | 1 - doc/requirements.txt | 4 ++-- lower-constraints.txt | 4 ++-- releasenotes/source/conf.py | 4 ---- setup.cfg | 14 -------------- tox.ini | 7 +++---- 6 files changed, 7 insertions(+), 27 deletions(-) delete mode 100644 babel.cfg diff --git a/babel.cfg b/babel.cfg deleted file mode 100644 index efceab818..000000000 --- a/babel.cfg +++ /dev/null @@ -1 +0,0 @@ -[python: **.py] diff --git a/doc/requirements.txt b/doc/requirements.txt index b48c934ab..3d5e4b8e9 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -1,8 +1,8 @@ # The order of packages is significant, because pip processes them in the order # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. -sphinx!=1.6.6,!=1.6.7,!=2.1.0,>=1.6.2 # BSD -openstackdocstheme>=1.20.0 # Apache-2.0 +sphinx>=2.0.0,!=2.1.0 # BSD +openstackdocstheme>=2.0.0 # Apache-2.0 sphinxcontrib-pecanwsme>=0.10.0 # Apache-2.0 sphinxcontrib-httpdomain>=1.6.1 # BSD reno>=2.7.0 # Apache-2.0 diff --git a/lower-constraints.txt b/lower-constraints.txt index c98f2c463..32313fdd1 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -56,7 +56,7 @@ munch==2.2.0 netaddr==0.7.19 netifaces==0.10.6 nose==1.3.7 -openstackdocstheme==1.20.0 +openstackdocstheme==2.0.0 openstacksdk==0.12.0 os-client-config==1.29.0 os-service-types==1.2.0 @@ -117,7 +117,7 @@ Routes==2.4.1 simplegeneric==0.8.1 simplejson==3.13.2 snowballstemmer==1.2.1 -Sphinx==1.6.5 +Sphinx==2.0.0 sphinxcontrib-httpdomain==1.6.1 sphinxcontrib-pecanwsme==0.10.0 sphinxcontrib-websupport==1.0.1 diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py index 5b4802211..3b86f7bd7 100644 --- a/releasenotes/source/conf.py +++ b/releasenotes/source/conf.py @@ -196,10 +196,6 @@ repository_name = 'openstack/solum' bug_project = 'solum' bug_tag = '' -# Must set this variable to include year, month, day, hours, and minutes. -html_last_updated_fmt = '%Y-%m-%d %H:%M' - - # -- Options for LaTeX output --------------------------------------------- latex_elements = { diff --git a/setup.cfg b/setup.cfg index f27adc8a8..36fc2e7b8 100644 --- a/setup.cfg +++ b/setup.cfg @@ -25,20 +25,6 @@ classifier = packages = solum -[compile_catalog] -directory = solum/locale -domain = solum - -[update_catalog] -domain = solum -output_dir = solum/locale -input_file = solum/locale/solum.pot - -[extract_messages] -keywords = _ gettext ngettext l_ lazy_gettext -mapping_file = babel.cfg -output_file = solum/locale/solum.pot - [entry_points] console_scripts = solum-api = solum.cmd.api:main diff --git a/tox.ini b/tox.ini index 63141b03a..6502e3630 100644 --- a/tox.ini +++ b/tox.ini @@ -7,11 +7,10 @@ ignore_basepython_conflict = True [testenv] basepython = python3 usedevelop = True -install_command = pip install -U {opts} {packages} setenv = VIRTUAL_ENV={envdir} 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 whitelist_externals = find @@ -44,7 +43,7 @@ commands = oslo_debug_helper -t solum/tests {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 = @@ -68,7 +67,7 @@ commands = [testenv:releasenotes] 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 = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html