Update for Python 3

This repo is now Python 3 only, make a few updates:
* Move basepython to testenv
* Require newer tox version and ignore base conflicts
* update openstackdocstheme and sphinx versions
* Use newer TOX_x for constraints

Change-Id: I1407b408bee9e848243a60d40fd7df90bf1705d1
This commit is contained in:
Andreas Jaeger 2020-04-29 09:01:05 +02:00
parent 67b87e9ece
commit de799a89ca
2 changed files with 7 additions and 14 deletions

View File

@ -1,5 +1,4 @@
os-api-ref>=1.6.1 # Apache-2.0
openstackdocstheme>=1.30.0 # Apache-2.0
sphinx!=1.6.6,!=1.6.7,>=1.6.2,<2.0.0;python_version=='2.7' # BSD
sphinx!=1.6.6,!=1.6.7,>=1.6.2;python_version>='3.4' # BSD
openstackdocstheme>=2.0.0 # Apache-2.0
sphinx>=2.0.0,!=2.1.0 # BSD
reno>=2.11.3 # Apache-2.0

16
tox.ini
View File

@ -1,55 +1,51 @@
[tox]
envlist = py3,pep8,cover_report
skipsdist = True
minversion = 3.1.1
ignore_basepython_conflict = True
[testenv]
usedevelop = True
basepython = python3
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 = adjutant-api test {posargs}
setenv = VIRTUAL_ENV={envdir}
[testenv:pep8]
basepython = python3
commands =
flake8
doc8
[testenv:cover]
basepython = python3
commands =
coverage run --source='adjutant' .tox/cover/bin/adjutant-api test {posargs}
coverage html -d cover
coverage xml -o cover/coverage.xml
[testenv:cover_report]
basepython = python3
commands =
coverage run --source='.' .tox/cover_report/bin/adjutant-api test {posargs}
coverage report --include adjutant/* -m
[testenv:venv]
basepython = python3
commands = {posargs}
[testenv:docs]
basepython = python3
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}/doc/requirements.txt
commands =
sphinx-build -W -b html -d doc/build/doctrees doc/source doc/build/html
[testenv:api-ref]
basepython = python3
deps = {[testenv:docs]deps}
commands =
sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
[testenv:releasenotes]
basepython = python3
deps = {[testenv:docs]deps}
commands = sphinx-build -a -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
@ -66,11 +62,9 @@ ignore-path=.tox,*.egg-info,doc/build,releasenotes/build,api-ref/build,.eggs/*/E
extension=.txt,.rst,.inc
[testenv:black]
basepython = python3
commands =
black -t py36 .
[testenv:black_check]
basepython = python3
commands =
black -t py36 --check .