From a70af8268e7f24aa037c6828e3fd8f4b34c97d08 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 10 Apr 2020 11:07:42 +0200 Subject: [PATCH] Cleanup py27 support Make a few cleanups: - Remove obsolete sections from setup.cfg - Cleanup doc/source/conf.py to remove now obsolete content. - Use newer openstackdocstheme version - Remove install_command from tox.ini, the default is fine; cleanup tox.ini for python3 Change-Id: I306fe1dd080839004e206ac08f3526812e406f19 --- doc/requirements.txt | 2 +- doc/source/conf.py | 5 +---- setup.cfg | 9 --------- tox.ini | 4 +--- 4 files changed, 3 insertions(+), 17 deletions(-) diff --git a/doc/requirements.txt b/doc/requirements.txt index 21d63940a..9dce8ea2d 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -6,7 +6,7 @@ sphinx>=1.6.2 # BSD actdiag blockdiag nwdiag -openstackdocstheme>=1.20.0 # Apache-2.0 +openstackdocstheme>=1.32.1 # Apache-2.0 seqdiag sphinxcontrib-actdiag sphinxcontrib-blockdiag # BSD diff --git a/doc/source/conf.py b/doc/source/conf.py index 3a23321a1..4f082db80 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -12,9 +12,6 @@ # serve to show the default. import datetime -import subprocess -import sys -import os # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the @@ -28,7 +25,7 @@ import os # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. -extensions = ['sphinx.ext.autodoc', +extensions = [ 'sphinx.ext.todo', 'sphinx.ext.viewcode', 'sphinxcontrib.blockdiag', diff --git a/setup.cfg b/setup.cfg index b62aa2185..4f6ca5907 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 = 1 - -[wheel] -universal = 1 diff --git a/tox.ini b/tox.ini index 54a64c6d6..5face04d8 100644 --- a/tox.ini +++ b/tox.ini @@ -4,13 +4,13 @@ envlist = docs,py36 skipsdist = True [testenv] +basepython = python3 usedevelop = True setenv = VIRTUAL_ENV={envdir} OS_LOG_CAPTURE={env:OS_LOG_CAPTURE:true} OS_STDOUT_CAPTURE={env:OS_STDOUT_CAPTURE:true} OS_STDERR_CAPTURE={env:OS_STDERR_CAPTURE:true} -install_command = pip install -U {opts} {packages} # Unit test requires docutils and it is recommended to install docutils via # sphinx. We use doc/requirements.txt as well to avoid duplicated entries. deps = @@ -19,11 +19,9 @@ deps = commands = stestr run --slowest {posargs} [testenv:venv] -basepython = python3 commands = {posargs} [testenv:docs] -basepython = python3 deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/doc/requirements.txt