From a7f7ab6ef12005f4ca86c5a4934c33d2539a23e5 Mon Sep 17 00:00:00 2001 From: Shyamnath Premnadh Date: Tue, 10 Oct 2023 12:19:10 +0200 Subject: Deployment: More code fixes - Formatting and text updates. - extract_and_copy_jar() returns the extracted path to the jar directory - Buildozer class is now initialized when `pyside6-android-deploy` is run with --init. This is because it updates the recipes folder. - Buildozer defaults for Android NDK cannot be used anymore because `pyside6-android-deploy` uses llvm-readelf from the NDK to find the binary dependencies. - Change print statement to RuntimeError incase `main.py` does not exist - Change logging.exception to RuntimeError for the function `find_pyside_modules` Pick-to: 6.6 Task-number: PYSIDE-1612 Change-Id: I6ef5d5dfe9acae5f0029553ca2c6f07d91b6e462 Reviewed-by: Friedemann Kleint Reviewed-by: Qt CI Bot Reviewed-by: Cristian Maureira-Fredes --- sources/pyside-tools/deploy_lib/python_helper.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (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 32bf04f2c..7a91ddfa1 100644 --- a/sources/pyside-tools/deploy_lib/python_helper.py +++ b/sources/pyside-tools/deploy_lib/python_helper.py @@ -62,10 +62,9 @@ def find_pyside_modules(project_dir: Path, extra_ignore_dirs: List[Path] = None, full_mod_name = imported_module.name if full_mod_name == "PySide6": logging.warning(IMPORT_WARNING_PYSIDE.format(str(py_file))) - except Exception as e: - logging.error(f"[DEPLOY] Finding module import failed on file {str(py_file)}") - raise e + raise RuntimeError(f"[DEPLOY] Finding module import failed on file {str(py_file)} with " + f"error {e}") return set(modules) -- cgit v1.2.3