aboutsummaryrefslogtreecommitdiffstats
path: root/build_scripts/main.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/main.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/main.py')
-rw-r--r--build_scripts/main.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/build_scripts/main.py b/build_scripts/main.py
index 76941c276..17e69e94d 100644
--- a/build_scripts/main.py
+++ b/build_scripts/main.py
@@ -43,7 +43,7 @@ from .utils import (copydir, copyfile, detect_clang,
linux_fix_rpaths_for_library, macos_fix_rpaths_for_library,
platform_cmake_options, remove_tree, run_process,
run_process_output, update_env_path, which)
-from . import PYSIDE, PYSIDE_MODULE, SHIBOKEN
+from . import PYSIDE, PYSIDE_MODULE, SHIBOKEN, ANDROID_ESSENTIALS
from .wheel_override import get_bdist_wheel_override, wheel_module_exists
from .wheel_utils import (get_package_timestamp, get_package_version,
macos_plat_name, macos_pyside_min_deployment_target)
@@ -637,6 +637,10 @@ class PysideBuild(_build, CommandMixin, BuildInfoCollectorMixin):
module_sub_set += ';'
module_sub_set += m
cmake_cmd.append(f"-DMODULES={module_sub_set}")
+ elif str(OPTION['PLAT_NAME']).startswith("android"):
+ modules = ';'.join(ANDROID_ESSENTIALS)
+ cmake_cmd.append(f"-DMODULES={modules}")
+
if OPTION["SKIP_MODULES"]:
skip_modules = ''
for m in OPTION["SKIP_MODULES"].split(','):
@@ -1057,7 +1061,7 @@ class PysideBuild(_build, CommandMixin, BuildInfoCollectorMixin):
if self.is_cross_compile:
if 'darwin' in self.plat_name or 'macos' in self.plat_name:
filters = darwin_filters
- elif 'linux' in self.plat_name:
+ elif 'linux' in self.plat_name or 'android' in self.plat_name:
filters = unix_filters
else:
log.warning(f"No shared library filters found for platform {self.plat_name}. "