tox: Simplify tox syntax
We can use negative factors now, and Qt 6.2/6.3 can be simplified too. See https://tox.wiki/en/latest/config.html#complex-factor-conditions
This commit is contained in:
parent
f7753550f2
commit
a516ad98fd
|
|
@ -215,14 +215,7 @@ def main():
|
|||
action='store_true')
|
||||
args = parser.parse_args()
|
||||
|
||||
if args.tox:
|
||||
# Workaround for the lack of negative factors in tox.ini
|
||||
if 'LINK_PYQT_SKIP' in os.environ:
|
||||
print('LINK_PYQT_SKIP set, exiting...')
|
||||
sys.exit(0)
|
||||
executable = get_tox_syspython(args.path)
|
||||
else:
|
||||
executable = sys.executable
|
||||
executable = get_tox_syspython(args.path) if args.tox else sys.executable
|
||||
|
||||
venv_path = get_venv_lib_path(args.path)
|
||||
link_pyqt(executable, venv_path)
|
||||
|
|
|
|||
9
tox.ini
9
tox.ini
|
|
@ -13,11 +13,8 @@ minversion = 3.20
|
|||
setenv =
|
||||
PYTEST_QT_API=pyqt5
|
||||
QUTE_QT_WRAPPER=PyQt5
|
||||
pyqt62: PYTEST_QT_API=pyqt6
|
||||
pyqt62: QUTE_QT_WRAPPER=PyQt6
|
||||
pyqt63: PYTEST_QT_API=pyqt6
|
||||
pyqt63: QUTE_QT_WRAPPER=PyQt6
|
||||
pyqt{,515,5152,62,63}: LINK_PYQT_SKIP=true
|
||||
pyqt{62,63}: PYTEST_QT_API=pyqt6
|
||||
pyqt{62,63}: QUTE_QT_WRAPPER=PyQt6
|
||||
cov: PYTEST_ADDOPTS=--cov --cov-report xml --cov-report=html --cov-report=
|
||||
passenv = PYTHON DISPLAY XAUTHORITY HOME USERNAME USER CI XDG_* QUTE_* DOCKER QT_QUICK_BACKEND FORCE_COLOR DBUS_SESSION_BUS_ADDRESS
|
||||
basepython =
|
||||
|
|
@ -37,7 +34,7 @@ deps =
|
|||
pyqt62: -r{toxinidir}/misc/requirements/requirements-pyqt-6.2.txt
|
||||
pyqt63: -r{toxinidir}/misc/requirements/requirements-pyqt-6.3.txt
|
||||
commands =
|
||||
{envpython} scripts/link_pyqt.py --tox {envdir}
|
||||
!pyqt-!pyqt515-!pyqt5152-!pyqt62-!pyqt63: {envpython} scripts/link_pyqt.py --tox {envdir}
|
||||
{envpython} -bb -m pytest {posargs:tests}
|
||||
cov: {envpython} scripts/dev/check_coverage.py {posargs}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue