summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2022-07-06 16:10:33 +0200
committerFlorian Bruhin <me@the-compiler.org>2022-07-06 16:10:33 +0200
commit181183a0c4fa61d5f39e64c5d0299df706a16cb3 (patch)
tree6e2c1f8f56b1774e6149e4b71f18df46f5ea9cf9
parent5a4a2efe5cee66be3161a1df839af6b6623219dc (diff)
downloadqutebrowser-181183a0c4fa61d5f39e64c5d0299df706a16cb3.tar.gz
qutebrowser-181183a0c4fa61d5f39e64c5d0299df706a16cb3.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.py9
-rw-r--r--tox.ini9
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)
diff --git a/tox.ini b/tox.ini
index 2655e16f4..a6caf9319 100644
--- a/tox.ini
+++ b/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}