summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2022-06-15 09:49:30 +0200
committerFlorian Bruhin <me@the-compiler.org>2022-08-23 18:31:42 +0200
commit66b210ea7d42272794fde223d60a5aff078dde16 (patch)
tree1382e74000a1b6727c5c7e57c539ec3ecbe8ae0b
parent867dace9fb366f58e6d61ba665f24f440070b36d (diff)
downloadqutebrowser-66b210ea7d42272794fde223d60a5aff078dde16.tar.gz
qutebrowser-66b210ea7d42272794fde223d60a5aff078dde16.zip
scripts: Add _is_qt6_version to mkvenv
-rwxr-xr-xscripts/mkvenv.py8
1 files changed, 7 insertions, 1 deletions
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