From c94e47c89697f569ea908ff2714ec56da0bc3458 Mon Sep 17 00:00:00 2001 From: Shyamnath Premnadh Date: Fri, 8 Dec 2023 11:04:30 +0100 Subject: Android Deployment: Install `buildozer` with --init cli argument - When the --init option is used the config files are created, but to create buildozer.spec from pysideconfig.spec, buildozer has to be installed. This patch installs `buildozer` when --init option is passed. Task-number: PYSIDE-1612 Pick-to: 6.6 Change-Id: I6917496e509a0b4a203346145d1c3fe8dc73ba14 Reviewed-by: Friedemann Kleint --- sources/pyside-tools/deploy_lib/deploy_util.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'sources/pyside-tools') diff --git a/sources/pyside-tools/deploy_lib/deploy_util.py b/sources/pyside-tools/deploy_lib/deploy_util.py index 368ad682e..48e4951ea 100644 --- a/sources/pyside-tools/deploy_lib/deploy_util.py +++ b/sources/pyside-tools/deploy_lib/deploy_util.py @@ -89,14 +89,20 @@ def install_python_dependencies(config: Config, python: PythonExecutable, init: """ Installs the python package dependencies for the target deployment platform """ + packages = config.get_value("python", packages).split(",") if not init: # install packages needed for deployment logging.info("[DEPLOY] Installing dependencies") - packages = config.get_value("python", packages).split(",") python.install(packages=packages) # nuitka requires patchelf to make patchelf rpath changes for some Qt files if sys.platform.startswith("linux") and not is_android: python.install(packages=["patchelf"]) + elif is_android: + # install only buildozer + logging.info("[DEPLOY] Installing buildozer") + buildozer_package_with_version = ([package for package in packages + if package.startswith("buildozer")]) + python.install(packages=list(buildozer_package_with_version)) def finalize(config: Config): -- cgit v1.2.3