aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShyamnath Premnadh <Shyamnath.Premnadh@qt.io>2023-01-31 13:28:52 +0100
committerShyamnath Premnadh <Shyamnath.Premnadh@qt.io>2023-02-01 09:58:32 +0100
commit3b3ea84dc2d7bc4967096e046bd1951b03a7bc06 (patch)
treea05cf217c486a5b6173e078b981a153ca0493eb7
parenteb9f91af7e327829bbaa0c6e27440430369ce039 (diff)
Fix cross compilation
- some regression from 2afcf8e7545c681e412e5b6d04ab8867e5edd5c7 pathlib changes Pick-to: 6.4 Change-Id: I32173bdffc1280e23b11006466f3dfb19a49fd8f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
-rw-r--r--build_scripts/build_info_collector.py6
-rw-r--r--build_scripts/main.py2
-rw-r--r--build_scripts/utils.py1
3 files changed, 5 insertions, 4 deletions
diff --git a/build_scripts/build_info_collector.py b/build_scripts/build_info_collector.py
index 4f2df94b6..7dccec75b 100644
--- a/build_scripts/build_info_collector.py
+++ b/build_scripts/build_info_collector.py
@@ -221,9 +221,9 @@ class BuildInfoCollectorMixin(object):
# when cross-compiling.
if 'prefix' in python_info:
py_prefix = python_info['prefix']
- self.py_prefix = py_prefix
+ self.py_prefix = Path(py_prefix).resolve()
- py_scripts_dir = py_prefix / 'bin'
+ py_scripts_dir = self.py_prefix / 'bin'
if py_scripts_dir.exists():
self.py_scripts_dir = py_scripts_dir
else:
@@ -284,7 +284,7 @@ class BuildInfoCollectorMixin(object):
self.sources_dir = Path(sources_dir)
self.build_dir = Path(build_dir)
self.install_dir = Path(install_dir)
- self.py_executable = Path(py_executable)
+ self.py_executable = Path(py_executable) if py_executable else None
self.py_include_dir = Path(py_include_dir)
if not self.is_cross_compile:
diff --git a/build_scripts/main.py b/build_scripts/main.py
index f7b34bf45..a04bea7d3 100644
--- a/build_scripts/main.py
+++ b/build_scripts/main.py
@@ -802,7 +802,7 @@ class PysideBuild(_build, CommandMixin, BuildInfoCollectorMixin):
cmake_cmd.append(f"-DQFP_QT_HOST_PATH={self.qt_host_path}")
if self.is_cross_compile and (not OPTION["SHIBOKEN_HOST_PATH"]
- or not OPTION["SHIBOKEN_HOST_PATH"].exists()):
+ or not Path(OPTION["SHIBOKEN_HOST_PATH"]).exists()):
raise SetupError("Please specify the location of host shiboken tools via "
"--shiboken-host-path=")
diff --git a/build_scripts/utils.py b/build_scripts/utils.py
index 0a6af2846..b95d491b7 100644
--- a/build_scripts/utils.py
+++ b/build_scripts/utils.py
@@ -902,6 +902,7 @@ def linux_fix_rpaths_for_library(patchelf, executable_path, qt_rpath, override=F
existing_rpaths = linux_get_rpaths(executable_path)
rpaths.extend(existing_rpaths)
+ qt_rpath = str(qt_rpath)
if linux_needs_qt_rpath(executable_path) and qt_rpath not in existing_rpaths:
rpaths.append(qt_rpath)