From 9ce57f3f396bbfa8e9be461e19fb68bd85a7808d Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sat, 9 May 2020 16:26:51 +0200 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: If3228ad42346d6f405e0c6b6580ecd48a7511525 --- babel.cfg | 2 -- doc/source/conf.py | 3 --- lower-constraints.txt | 4 ++-- releasenotes/source/conf.py | 3 --- setup.cfg | 24 ------------------------ test-requirements.txt | 4 ++-- tox.ini | 6 +++--- 7 files changed, 7 insertions(+), 39 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/source/conf.py b/doc/source/conf.py index f616817..6880cfd 100755 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -63,9 +63,6 @@ repository_name = 'openstack/murano-pkg-check' bug_project = 'murano-pkg-check' bug_tag = '' -# Must set this variable to include year, month, day, hours, and minutes. -html_last_updated_fmt = '%Y-%m-%d %H:%M' - # Output file base name for HTML help builder. htmlhelp_basename = '%sdoc' % project diff --git a/lower-constraints.txt b/lower-constraints.txt index 28a344c..fe88c19 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -17,7 +17,7 @@ MarkupSafe==1.0 mccabe==0.2.1 mock==2.0.0 mox3==0.20.0 -openstackdocstheme==1.18.1 +openstackdocstheme==2.0.0 os-client-config==1.28.0 oslo.i18n==3.15.3 oslotest==3.2.0 @@ -36,7 +36,7 @@ requests==2.14.2 requestsexceptions==1.2.0 semantic-version==2.3.1 snowballstemmer==1.2.1 -Sphinx==1.6.2 +Sphinx==2.0.0 sphinxcontrib-websupport==1.0.1 stevedore==1.20.0 stestr==1.0.0 diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py index 4c813d8..6dd7e1f 100644 --- a/releasenotes/source/conf.py +++ b/releasenotes/source/conf.py @@ -118,9 +118,6 @@ repository_name = 'openstack/murano-pkg-check' bug_project = 'murano-pkg-check' bug_tag = '' -# Must set this variable to include year, month, day, hours, and minutes. -html_last_updated_fmt = '%Y-%m-%d %H:%M' - # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. diff --git a/setup.cfg b/setup.cfg index 5985e31..56c7a53 100644 --- a/setup.cfg +++ b/setup.cfg @@ -24,30 +24,6 @@ classifier = packages = muranopkgcheck -[egg_info] -tag_build = -tag_date = 0 -tag_svn_revision = 0 - -[compile_catalog] -directory = muranopkgcheck/locale -domain = muranopkgcheck - -[update_catalog] -domain = murano-pkg-check -output_dir = muranopkgcheck/locale -input_file = muranopkgcheck/locale/muranopkgcheck.pot - -[extract_messages] -keywords = _ gettext ngettext l_ lazy_gettext -mapping_file = babel.cfg -output_file = muranopkgcheck/locale/muranopkgcheck.pot - [entry_points] console_scripts = murano-pkg-check = muranopkgcheck.cmd.run:main - -[build_releasenotes] -all_files = 1 -build-dir = releasenotes/build -source-dir = releasenotes/source diff --git a/test-requirements.txt b/test-requirements.txt index 2223644..9c7524b 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -6,8 +6,8 @@ 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 -sphinx!=1.6.6,!=1.6.7,>=1.6.2;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 oslotest>=3.2.0 # Apache-2.0 testrepository>=0.0.18 # Apache-2.0/BSD testscenarios>=0.4 # Apache-2.0/BSD diff --git a/tox.ini b/tox.ini index 5ea8359..df8ef8e 100644 --- a/tox.ini +++ b/tox.ini @@ -8,11 +8,10 @@ basepython = python3 usedevelop = True whitelist_externals = bash find -install_command = pip install {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 commands = stestr run {posargs} @@ -37,7 +36,7 @@ commands = deps = -r{toxinidir}/doc/requirements.txt commands = python tools/gen_errors.py - python setup.py build_sphinx + sphinx-build -W -b html doc/source doc/build/html [testenv:pdf-docs] deps = {[testenv:docs]deps} @@ -49,6 +48,7 @@ commands = [testenv:releasenotes] +deps = {[testenv:docs]deps} commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html