aboutsummaryrefslogtreecommitdiffstats
path: root/build_scripts/platforms/linux.py
diff options
context:
space:
mode:
authorShyamnath Premnadh <Shyamnath.Premnadh@qt.io>2022-07-12 11:24:19 +0200
committerShyamnath Premnadh <Shyamnath.Premnadh@qt.io>2023-03-06 15:51:59 +0100
commitb3bcb3ce269e6cb559cae62fb1d749c7e13ff87d (patch)
treef953541a7f9554af599231425110a49237ef635b /build_scripts/platforms/linux.py
parent5cd43380bf375a1c45c63db06454cbb27848a03a (diff)
Android Deployment - cross building for android wheels
- basically controls what goes into the android wheels - presently restricted to Qt essential modules - controlled using the --plat_name=android_aarch64, --plat_name=android_armv7 etc - the libQt6*.so libraries in Android do not have the version in the end.This is the same for all the Android Qt installations. Hence we look for libQt6*.so* instead of libQt6*.so.? - folders like 'glue', 'typesystems', 'support' are not relevant for for cross compiled wheels because shiboken6_generator is not cross compiled - for Android cross compilation, the 'examples' folder is also not relevant in addition to the above folder Task-number: PYSIDE-1612 Change-Id: Icc7561a6e990ed9b080f55cb30bac34e4774be7f Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'build_scripts/platforms/linux.py')
-rw-r--r--build_scripts/platforms/linux.py17
1 files changed, 12 insertions, 5 deletions
diff --git a/build_scripts/platforms/linux.py b/build_scripts/platforms/linux.py
index ecfa248d6..f5f2d7140 100644
--- a/build_scripts/platforms/linux.py
+++ b/build_scripts/platforms/linux.py
@@ -11,7 +11,7 @@ from ..utils import (copy_icu_libs, copydir, copyfile, find_files_using_glob,
from .. import PYSIDE
-def prepare_standalone_package_linux(pyside_build, _vars, cross_build=False):
+def prepare_standalone_package_linux(pyside_build, _vars, cross_build=False, is_android=False):
built_modules = _vars['built_modules']
constrain_modules = None
@@ -36,16 +36,23 @@ def prepare_standalone_package_linux(pyside_build, _vars, cross_build=False):
destination_qt_dir = destination_dir / "Qt"
destination_qt_lib_dir = destination_qt_dir / "lib"
- accepted_modules = ['libQt6*.so.?']
+ # android libs does not have the Qt major version
+ if is_android:
+ lib_regex = 'libQt6*.so*'
+ else:
+ lib_regex = 'libQt6*.so.?'
+
+ accepted_modules = [lib_regex]
if constrain_modules:
- accepted_modules = [f"libQt6{module}*.so.?" for module in constrain_modules]
+ accepted_modules = [f"libQt6{module}*.so.?" if not is_android else f"libQt6{module}*.so*"
+ for module in constrain_modules]
accepted_modules.append("libicu*.so.??")
copydir("{qt_lib_dir}", destination_qt_lib_dir,
_filter=accepted_modules,
recursive=False, _vars=_vars, force_copy_symlinks=True)
- if should_copy_icu_libs:
+ if should_copy_icu_libs and not cross_build and not is_android:
# Check if ICU libraries were copied over to the destination
# Qt libdir.
maybe_icu_libs = find_files_using_glob(destination_qt_lib_dir, "libicu*")
@@ -58,7 +65,7 @@ def prepare_standalone_package_linux(pyside_build, _vars, cross_build=False):
# libs to the Pyside Qt dir if necessary.
# We choose the QtCore lib to inspect, by
# checking which QtCore library the shiboken6 executable uses.
- if not maybe_icu_libs and not cross_build:
+ if not maybe_icu_libs:
copy_icu_libs(pyside_build._patchelf_path, destination_qt_lib_dir)
# Set RPATH for Qt libs.