From 1a061b92076ee022aac643c326e8d37dff903fa6 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Wed, 15 Jun 2022 09:49:30 +0200 Subject: scripts: Add _is_qt6_version to mkvenv --- scripts/mkvenv.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/mkvenv.py b/scripts/mkvenv.py index e31ceb790..faee6f58f 100755 --- a/scripts/mkvenv.py +++ b/scripts/mkvenv.py @@ -137,6 +137,12 @@ def pyqt_versions() -> List[str]: return versions + ['auto'] +def _is_qt6_version(version: str) -> bool: + """Check if the given version is Qt 6.""" + # FIXME:qt6 Adjust once auto = Qt 6 + return version == "6" or version.startswith("6.") + + def run_venv( venv_dir: pathlib.Path, executable, @@ -303,7 +309,7 @@ def apply_xcb_util_workaround( if pyqt_type != 'binary': print("Workaround not needed: Not installing from PyQt binaries.") return - if pyqt_version not in ['auto', '5.15', '5']: # FIXME:qt6 Remove once auto = Qt 6 + if _is_qt6_version(pyqt_version): print("Workaround not needed: Not installing Qt 5.15.") return -- cgit v1.2.3-54-g00ecf