From 34d54f2812b7d54431d548cff08fe8da7f838124 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sat, 11 Apr 2020 15:24:54 +0200 Subject: [PATCH] Cleanup py27 support and docs This repo is now testing docs only with Python 3, so let's make a few cleanups: - Remove obsolete sections from setup.cfg - Switch to using sphinx-build - Cleanup doc/source/conf.py to remove now obsolete content. - Use newer openstackdocstheme version - Remove install_command from tox.ini, the default is fine Change-Id: Iffd00261e6a15e2dd7c98e96bbcc9db3e86c0c65 --- doc/requirements.txt | 2 +- doc/source/conf.py | 5 ----- setup.cfg | 9 --------- tox.ini | 7 +++---- 4 files changed, 4 insertions(+), 19 deletions(-) diff --git a/doc/requirements.txt b/doc/requirements.txt index 3f79c1bce..b2f4df795 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -3,4 +3,4 @@ # process, which may cause wedges in the gate later. sphinx!=1.6.6,!=1.6.7,!=2.1.0,>=1.6.2 sphinxcontrib-blockdiag>=1.1.0 -openstackdocstheme>=1.18.1 # Apache-2.0 +openstackdocstheme>=1.31.2 # Apache-2.0 diff --git a/doc/source/conf.py b/doc/source/conf.py index 067c0b587..10d3526c3 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -63,11 +63,6 @@ html_theme = 'openstackdocs' # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ['_static'] -# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, -# using the given strftime format. -# html_last_updated_fmt = '%b %d, %Y' -html_last_updated_fmt = '%Y-%m-%d %H:%M' - # The theme to use for HTML and HTML Help pages. Major themes that come with # Sphinx are currently 'default' and 'sphinxdoc'. # html_theme_path = ["."] diff --git a/setup.cfg b/setup.cfg index bc4bd9082..e605e19ab 100644 --- a/setup.cfg +++ b/setup.cfg @@ -10,12 +10,3 @@ classifier = Intended Audience :: Developers License :: OSI Approved :: Apache Software License Operating System :: POSIX :: Linux - -[build_sphinx] -all_files = 1 -build-dir = doc/build -source-dir = doc/source -warning-is-error = True - -[wheel] -universal = 1 diff --git a/tox.ini b/tox.ini index 4bca6cc01..ab9709776 100644 --- a/tox.ini +++ b/tox.ini @@ -6,7 +6,6 @@ ignore_basepython_conflict = True [testenv] basepython = python3 -install_command = pip install -U {opts} {packages} setenv = VIRTUAL_ENV={envdir} deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} passenv = *_proxy *_PROXY @@ -17,7 +16,7 @@ commands = {posargs} [testenv:docs] deps = -r{toxinidir}/doc/requirements.txt commands = - bash -c "rm -rf doc/build" - python setup.py build_sphinx + rm -rf doc/build + sphinx-build -W -b html doc/source doc/source/html whitelist_externals = - bash + rm