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.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'sources/pyside-tools/deploy.py') diff --git a/sources/pyside-tools/deploy.py b/sources/pyside-tools/deploy.py index e13d97385..0c75350d3 100644 --- a/sources/pyside-tools/deploy.py +++ b/sources/pyside-tools/deploy.py @@ -43,15 +43,13 @@ def main(main_file: Path = None, name: str = None, config_file: Path = None, ini force: bool = False): logging.basicConfig(level=loglevel) - - if not config_file and not main_file.exists(): - print(dedent(""" + if config_file and not config_file.exists() and not main_file.exists(): + raise RuntimeError(dedent(""" Directory does not contain main.py file. Please specify the main python entrypoint file or the config file. Run "pyside6-deploy desktop --help" to see info about cli options. pyside6-deploy exiting...""")) - return # Nuitka command to run command_str = None -- cgit v1.2.3