From 0a1710429333001fbf5a96cdc9043f9ec2f559ba Mon Sep 17 00:00:00 2001 From: Shyamnath Premnadh Date: Thu, 21 Sep 2023 16:38:49 +0200 Subject: Android Deployment: copy required plugins to libs - Copy the required Qt plugins from `site_packages` of the python bundled with the application to the `libs` folder of the Android gradle project. Android looks for required libraries in this `libs` folder. A similar step is also done by `androiddeployqt` when it created an Android gradle project from a C++ application. - Dependent Qt libraries found during processing of pyside6-android-deploy are also copied into the `libs` folder, if it does not exist already. - `plugins` key added to `pysidedeploy.spec`, which represents the plugins to be copied. - The Android dependency files shipped with Qt for Android platforms, are prased to obtain all the dependent Qt plugins of an application. - Some code refactoring to facilitate the plugin and library copy, by passing the plugin and library names to the PySide6 recipe template. `jinja2` does the job of using this template to create the PySide6 recipe to be used by python-for-android. - As an addition, fix some minor code issues and add extra logging. Task-number: PYSIDE-1612 Pick-to: 6.6 Change-Id: I63ca1e48aa1e4c98c912a87e68f3ae912ce89ca4 Reviewed-by: Friedemann Kleint --- sources/pyside-tools/deploy_lib/python_helper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sources/pyside-tools/deploy_lib/python_helper.py') diff --git a/sources/pyside-tools/deploy_lib/python_helper.py b/sources/pyside-tools/deploy_lib/python_helper.py index 0174a8fcf..af8753257 100644 --- a/sources/pyside-tools/deploy_lib/python_helper.py +++ b/sources/pyside-tools/deploy_lib/python_helper.py @@ -63,7 +63,7 @@ def find_pyside_modules(project_dir: Path, extra_ignore_dirs: List[Path] = None, logging.warning(IMPORT_WARNING_PYSIDE.format(str(py_file))) except Exception as e: - logging.error(f"Finding module import failed on file {str(py_file)}") + logging.error(f"[DEPLOY] Finding module import failed on file {str(py_file)}") raise e return set(modules) -- cgit v1.2.3