aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside-tools/android_deploy.py
diff options
context:
space:
mode:
authorShyamnath Premnadh <Shyamnath.Premnadh@qt.io>2024-10-08 11:35:44 +0200
committerShyamnath Premnadh <Shyamnath.Premnadh@qt.io>2024-10-08 14:06:31 +0000
commite558171da3cb5c0b70827259642f4ef005d6c008 (patch)
treef481f26e903b6f9a8a135f77afa16c5b88c41d45 /sources/pyside-tools/android_deploy.py
parent072c2892b7cea034c367f9c4e513b1b4218de5f1 (diff)
Android Deployment: Add error for Python 3.12+
- pyside6-android-deploy does not work with Python 3.12+ due to the a restriction from the 'buildozer' package. This should be fixed in their next release and we can remove this RuntimeError. - Additonally modify the help message for --ndk-path. Pick-to: 6.8 Task-number: PYSIDE-1612 Change-Id: I94e677a6845f31d71f5a008ce7beda53d25ed0e1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'sources/pyside-tools/android_deploy.py')
-rw-r--r--sources/pyside-tools/android_deploy.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/sources/pyside-tools/android_deploy.py b/sources/pyside-tools/android_deploy.py
index 88b310341..46adad610 100644
--- a/sources/pyside-tools/android_deploy.py
+++ b/sources/pyside-tools/android_deploy.py
@@ -2,6 +2,7 @@
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
from __future__ import annotations
+import sys
import argparse
import logging
import shutil
@@ -187,8 +188,9 @@ if __name__ == "__main__":
required=not config_option_exists())
parser.add_argument("--ndk-path", type=lambda p: Path(p).resolve(),
- help=("Path to Android NDK. If omitted, the tool's cache at "
- ".pyside6_android_deploy is checked to find the NDK")
+ help=("Path to Android NDK. The required version is r26b."
+ "If not provided, the tool will check its cache at "
+ ".pyside6_android_deploy to find the NDK.")
)
parser.add_argument("--sdk-path", type=lambda p: Path(p).resolve(),
@@ -203,6 +205,11 @@ if __name__ == "__main__":
args = parser.parse_args()
+ # check if the Python version is greater than 3.12
+ if sys.version_info >= (3, 12):
+ raise RuntimeError("[DEPLOY] Android deployment requires Python version 3.11 or lower. "
+ "This is due to a restriction in buildozer.")
+
main(args.name, args.wheel_pyside, args.wheel_shiboken, args.ndk_path, args.sdk_path,
args.config_file, args.init, args.loglevel, args.dry_run, args.keep_deployment_files,
args.force, args.extra_ignore_dirs, args.extra_modules)