From 43398c0c4736090cd674a68fa71c4fa04b384817 Mon Sep 17 00:00:00 2001 From: Riccardo Pittau Date: Wed, 12 May 2021 16:24:50 +0200 Subject: [PATCH] Update tox config Update tox min version to something more contemporary. Default basepython to python3. Update dependencies of docs and pdf-docs to include upper-constraints. Move to stestrs and remote os-test from requirements. Change-Id: I30313dda1a3f56eff2f54632c46cfbdd03aa3cb7 --- test-requirements.txt | 2 +- tox.ini | 33 ++++++++++++++++++++------------- 2 files changed, 21 insertions(+), 14 deletions(-) diff --git a/test-requirements.txt b/test-requirements.txt index b8b18d72..66afba2c 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -4,5 +4,5 @@ doc8 # Apache-2.0 stestr!=2.3.1 # Apache-2.0 -os-testr>=1.0.0 # Apache-2.0 testtools>=0.9.34 + diff --git a/tox.ini b/tox.ini index 9dcdaaff..5bf67c66 100644 --- a/tox.ini +++ b/tox.ini @@ -1,30 +1,37 @@ [tox] -minversion = 2.0 +minversion = 3.9.0 envlist = linters,docs -skipsdist = True +skipsdist = true +ignore_basepython_conflict = true [testenv] usedevelop = True +basepython = python3 setenv = VIRTUAL_ENV={envdir} deps = - -r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt + -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} + -r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt commands = - ostestr {posargs} + stestr run {posargs} doc8 priorities/ specs/ doc/source README.rst [testenv:venv] -basepython = python3 -commands = {posargs} +commands = {posargs:} [testenv:docs] -basepython = python3 -commands = sphinx-build -W -b html doc/source doc/build/html +sitepackages = False +deps = + -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} + -r{toxinidir}/requirements.txt +commands = + sphinx-build -b html doc/source doc/build/html [testenv:pdf-docs] -basepython = python3 whitelist_externals = make -commands = sphinx-build -W -b latex doc/source doc/build/pdf - make -C doc/build/pdf - +sitepackages = False +deps = {[testenv:docs]deps} +commands = + sphinx-build -b latex doc/source doc/build/pdf + make -C doc/build/pdf