diff options
| -rw-r--r-- | build_scripts/options.py | 2 | ||||
| -rw-r--r-- | build_scripts/qtinfo.py | 23 |
2 files changed, 5 insertions, 20 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 e1395fe42..2333a61c4 100644 --- a/build_scripts/qtinfo.py +++ b/build_scripts/qtinfo.py @@ -67,24 +67,8 @@ class QtInfo(object): # Dict to cache mkspecs variables. self._mkspecs_dict = {} - @staticmethod - 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 - - def setup(self, qmake, qt_version): - self._qmake_command = self._effective_qmake_command(qmake, qt_version) + def setup(self, qmake): + self._qmake_command = qmake @property def qmake_command(self): @@ -167,7 +151,8 @@ class QtInfo(object): def _get_qmake_output(self, args_list=[], cwd=None): 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, cwd=cwd) output = proc.communicate()[0] |
