diff options
author | Florian Bruhin <me@the-compiler.org> | 2022-07-06 16:10:33 +0200 |
---|---|---|
committer | Florian Bruhin <me@the-compiler.org> | 2022-08-23 18:31:42 +0200 |
commit | a516ad98fdb4a9d18084eaf304749575b184c4f8 (patch) | |
tree | 9afa89abb28d5ed0d5a9a689cff1710bde096325 | |
parent | f7753550f2c1dcb2348e4779fd5287166754827e (diff) | |
download | qutebrowser-a516ad98fdb4a9d18084eaf304749575b184c4f8.tar.gz qutebrowser-a516ad98fdb4a9d18084eaf304749575b184c4f8.zip |
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
-rw-r--r-- | scripts/link_pyqt.py | 9 | ||||
-rw-r--r-- | tox.ini | 9 |
2 files changed, 4 insertions, 14 deletions
diff --git a/scripts/link_pyqt.py b/scripts/link_pyqt.py index 54c317cb6..e27a54a68 100644 --- a/scripts/link_pyqt.py +++ b/scripts/link_pyqt.py @@ -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) @@ -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} |