Files
ceilometer/tox.ini
Elod Illes 2bc5d748f0 [stable-only] Cap virtualenv/setuptools
With latest virtualenv release (20.24.0) and its bundled setuptools
version, stable/victoria gates started to fail [1], because setuptools
is not compatible with the pbr version (5.5.0) which is in victoria
branch's upper constraint [2]. pbr's next release (5.5.1) removed the
failing code, this is why the change is only needed in stable/victoria.

This patch caps virtualenv to <20.24.0 to fix stable/victoria's gate,
and also caps tox for the 'inner' virtualenv, otherwise tox>4 would be
installed, that would introduce failures (those failures are fixed in
newer stable branches, but it would need several backports and 'outer'
tox is capped <4 anyway, so no worth dealing with it here).

[1] AttributeError: module 'setuptools.command.easy_install' has no attribute 'get_script_header'
[2] 636b6b3bde/upper-constraints.txt (L44)

Change-Id: Ifdfe2b74257bf4eabdddc43cce4bd8904cd7580c
2023-07-17 17:20:08 +02:00

96 lines
2.7 KiB
INI

[tox]
minversion = 3.1.0
skipsdist = True
envlist = py{36,37},pep8
ignore_basepython_conflict=true
# Cap setuptools via virtualenv to prevent compatibility issue with victoria
# branch's upper constraint of pbr package (5.5.0). Tox is also needed to be
# constrained for the 'inner' tox to be installed with the constrained venv.
requires =
virtualenv<20.24.0
tox<4
[testenv]
basepython = python3
deps = -r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/victoria}
usedevelop = True
setenv = VIRTUAL_ENV={envdir}
CEILOMETER_TEST_BACKEND={env:CEILOMETER_TEST_BACKEND:none}
passenv = OS_TEST_TIMEOUT OS_STDOUT_CAPTURE OS_STDERR_CAPTURE OS_LOG_CAPTURE CEILOMETER_*
commands =
stestr run {posargs}
oslo-config-generator --config-file=etc/ceilometer/ceilometer-config-generator.conf
whitelist_externals = bash
[testenv:cover]
setenv =
PYTHON=coverage run --source ceilometer --parallel-mode
commands =
stestr run {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
[testenv:pep8]
deps = hacking>=3.0,<=3.1.0
doc8
commands =
flake8
doc8 {posargs}
# Check that .po and .pot files are valid:
bash -c "find ceilometer -type f -regex '.*\.pot?' -print0|xargs -0 -n 1 msgfmt --check-format -o /dev/null"
[testenv:releasenotes]
deps = -r{toxinidir}/doc/requirements.txt
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:genconfig]
commands = oslo-config-generator --config-file=etc/ceilometer/ceilometer-config-generator.conf
[testenv:docs]
deps = -r{toxinidir}/doc/requirements.txt
commands = sphinx-build -b html doc/source doc/build/html
setenv = PYTHONHASHSEED=0
[testenv:pdf-docs]
deps = {[testenv:docs]deps}
whitelist_externals =
make
commands =
sphinx-build -W -b latex doc/source doc/build/pdf
make -C doc/build/pdf
[testenv:venv]
commands = {posargs}
setenv = PYTHONHASHSEED=0
[doc8]
ignore = D000
ignore-path = .venv,.git,.tox,*ceilometer/locale*,*lib/python*,ceilometer.egg*,doc/build,doc/source/api,releasenotes/*
[flake8]
# E123 closing bracket does not match indentation of opening bracket's line
# W503 line break before binary operator
# W504 line break after binary operator
ignore = E123,W503,W504
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,install-guide
show-source = True
[hacking]
import_exceptions =
ceilometer.i18n
[flake8:local-plugins]
extension =
C301 = checks:no_log_warn
C302 = checks:no_os_popen
paths = ./ceilometer/hacking
[testenv:lower-constraints]
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt