Drop python 2

Remove python 2 support, use python3 as basepython in tox everywhere.

Change-Id: I487ad8a7e1c30b60917c33ccefc337caf218484b
This commit is contained in:
Andreas Jaeger 2020-01-11 17:13:59 +01:00
parent ae37effc4a
commit 944a6187c7
2 changed files with 3 additions and 19 deletions

View File

@ -13,10 +13,9 @@ classifier =
License :: OSI Approved :: Apache Software License
Operating System :: POSIX :: Linux
Programming Language :: Python
Programming Language :: Python :: 2
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
[global]
setup-hooks =
@ -33,11 +32,3 @@ data_files =
console_scripts =
gerrit-dash-creator = gerrit_dash_creator.cmd.creator:main
gerrit-bug-dash = gerrit_dash_creator.cmd.bugs:main
[build_sphinx]
source-dir = doc/source
build-dir = doc/build
all_files = 1
[upload_sphinx]
upload-dir = doc/build/html

11
tox.ini
View File

@ -1,11 +1,11 @@
[tox]
minversion = 1.6
envlist = py36,py27,pypy,pep8,checksyntax,dashboards
envlist = py36,pypy,pep8,checksyntax,dashboards
skipsdist = True
[testenv]
basepython = python3
usedevelop = True
install_command = pip install -U {opts} {packages}
setenv =
VIRTUAL_ENV={envdir}
deps = -r{toxinidir}/requirements.txt
@ -13,23 +13,18 @@ deps = -r{toxinidir}/requirements.txt
whitelist_externals = bash
[testenv:pep8]
basepython = python3
commands = flake8
[testenv:venv]
basepython = python3
commands = {posargs}
[testenv:checksyntax]
basepython = python3
commands = python gerrit_dash_creator/cmd/creator.py --check-only dashboards
[testenv:cover]
basepython = python3
commands = python setup.py testr --coverage --testr-args='{posargs}'
[testenv:docs]
basepython = python3
commands =
# not happy with generated dashboard pages
# doc8 -e .rst doc CONTRIBUTING.rst HACKING.rst README.rst
@ -45,13 +40,11 @@ builtins = _
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build
[testenv:dashboards]
basepython = python3
commands =
bash -c "tools/generate_dashboards.sh"
sphinx-build -b html doc/source/ doc/build/html
[testenv:bindep]
basepython = python3
# Do not install any requirements. We want this to be fast and work even if
# system dependencies are missing, since it's used to tell you what system
# dependencies are missing! This also means that bindep must be installed