diff options
| author | Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> | 2023-02-08 16:58:39 +0100 |
|---|---|---|
| committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2023-03-31 14:21:05 +0000 |
| commit | 2e458381e4847f46814518da9f7cfca097aa8bc4 (patch) | |
| tree | bd31c54bb24c26b5ba6b5a3fb815c7b44f625a4f /build_scripts/config.py | |
| parent | 22f35d990b5cb5b65a08823128ec42305822c21a (diff) | |
Deployment: New pyside6-android-deploy tool
- Preliminary support for PySide6 Android deployment
- Uses jinja2 to create PySide6 and shiboken6 recipes, to be used
by buildozer when python_for_android builds the app distribution
- Classes for Buildozer config interaction
- Run deployment to android. Typical command looks like:
"""
pyside6-android-deploy
--wheel-pyside=./PySide6-6.5.0a1-6.5.0-cp37-abi3-android_x86_64.whl
--wheel-shiboken=./shiboken6-6.5.0a1-6.5.0-cp37-abi3-android_x86_64.whl
--name=stringlistmodel
"""
- New entrypoint for pyside6-android-deploy
- Helper functinos for Android Deployment
- Remove unused function main_py_exists()
- Added the new files to deploy.pyproject
- Remove dry_run argument from install_python_dependencies()
- new Python packages added in requirements.txt to enable the
deploy and cross compile tool
Note: python-for-android uses my local fork. This will be changed
once it is merged into python-for-android dev.
Task-number: PYSIDE-1612
Change-Id: I7eb96fa5507a476b4e86ec0195a5e9869f0f85fd
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit 95abfa776411b6d7cd4296adf63bc7abce2270b6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'build_scripts/config.py')
| -rw-r--r-- | build_scripts/config.py | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/build_scripts/config.py b/build_scripts/config.py index 1f01ccdd4..1f2f0b25c 100644 --- a/build_scripts/config.py +++ b/build_scripts/config.py @@ -1,6 +1,7 @@ # Copyright (C) 2018 The Qt Company Ltd. # SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only +import sys from .log import log, LogLevel from pathlib import Path @@ -201,11 +202,20 @@ class Config(object): ] if qt_install_path: _pyside_tools = available_pyside_tools(qt_tools_path=qt_install_path) - setup_kwargs['entry_points'] = { - 'console_scripts': [f'{PYSIDE}-{tool} = {package_name}.scripts.pyside_tool:' - f'{tool}' - for tool in _pyside_tools] - } + + # replacing pyside6-android_deploy by pyside6-android-deploy for consistency + # Also, the tool should not exist in any other platform than Linux + _console_scripts = [] + if ("android_deploy" in _pyside_tools) and sys.platform.startswith("linux"): + _console_scripts = [(f"{PYSIDE}-android-deploy =" + " PySide6.scripts.pyside_tool:android_deploy")] + _pyside_tools.remove("android_deploy") + + _console_scripts.extend([f'{PYSIDE}-{tool} = {package_name}.scripts.pyside_tool:' + f'{tool}' for tool in _pyside_tools]) + + setup_kwargs['entry_points'] = {'console_scripts': _console_scripts} + self.setup_kwargs = setup_kwargs def get_long_description(self): |
