diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-06-15 13:57:27 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-06-17 22:50:24 +0200 |
commit | 654694a90b76759c4846ac638a28f4379fb1e4fa (patch) | |
tree | 17114d7f894730686a04f28f086bf1fd9b9647db | |
parent | d41e3f95767bef7c266841e8d2613d8366ad3bc6 (diff) |
build scripts: Remove qtchooser handling
qtchooser does not exist in Qt 6. Change _qmake_command to a string.
Task-number: QTBUG-75870
Change-Id: I6eb69fbd839567ba0e67c9d792666662126494cc
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
(cherry picked from commit 579372b8d45f847ddaae14b361b9d8ca54c044f3)
-rw-r--r-- | build_scripts/options.py | 2 | ||||
-rw-r--r-- | build_scripts/qtinfo.py | 28 |
2 files changed, 6 insertions, 24 deletions
diff --git a/build_scripts/options.py b/build_scripts/options.py index 6971c188e..a6c29aafb 100644 --- a/build_scripts/options.py +++ b/build_scripts/options.py @@ -298,7 +298,7 @@ class DistUtilsCommandMixin(object): qmake_abs_path = os.path.abspath(self.qmake) OPTION['QMAKE'] = qmake_abs_path OPTION['QT_VERSION'] = self.qt - QtInfo().setup(qmake_abs_path, self.qt) + QtInfo().setup(qmake_abs_path) OPTION['CMAKE'] = os.path.abspath(self.cmake) OPTION['OPENSSL'] = self.openssl OPTION['SHIBOKEN_CONFIG_DIR'] = self.shiboken_config_dir diff --git a/build_scripts/qtinfo.py b/build_scripts/qtinfo.py index 6c20f3f9d..166a16d65 100644 --- a/build_scripts/qtinfo.py +++ b/build_scripts/qtinfo.py @@ -43,22 +43,6 @@ import re import subprocess -def _effective_qmake_command(qmake, qt_version): - """Check whether qmake path is a link to qtchooser and append the - desired Qt version in that case""" - result = [qmake] - # Looking whether qmake path is a link to qtchooser and whether the link - # exists - if os.path.islink(qmake) and os.path.lexists(qmake): - if not qt_version: - print('--qt must be specified when using qtchooser.') - sys.exit(-1) - # Set -qt=X here. - if "qtchooser" in os.readlink(qmake): - result.append(f"-qt={qt_version}") - return result - - class QtInfo(object): class __QtInfo: # Python singleton def __init__(self): @@ -68,14 +52,11 @@ class QtInfo(object): # Dict to cache mkspecs variables. self._mkspecs_dict = {} - def setup(self, qmake, qt_version): - self._qmake_command = _effective_qmake_command(qmake, qt_version) + def setup(self, qmake): + self._qmake_command = qmake def get_qmake_command(self): - qmake_command_string = self._qmake_command[0] - for entry in self._qmake_command[1:]: - qmake_command_string = f"{qmake_command_string} {entry}" - return qmake_command_string + return self._qmake_command def get_version(self): return self.get_property("QT_VERSION") @@ -137,7 +118,8 @@ class QtInfo(object): def _get_qmake_output(self, args_list=[]): assert(self._qmake_command) - cmd = self._qmake_command + args_list + cmd = [self._qmake_command] + cmd.extend(args_list) proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, shell=False) output = proc.communicate()[0] proc.wait() |