diff options
author | Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> | 2024-01-31 16:33:05 +0100 |
---|---|---|
committer | Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> | 2024-03-06 17:05:02 +0100 |
commit | 7526d9c4aa884a9d03700a76751158fd9c8bfece (patch) | |
tree | df4b3136e4b9175c768b17ee152a5c299380f2be /sources/pyside-tools/android_deploy.py | |
parent | fe62a95fe11cf2b4904fa09c57996089505a9438 (diff) |
Deployment: Find dependent modules
- Based on the desktop platform, find all the Qt module dependencies
of the application just like Android. These dependencies can help
in optimizing the plugins packaged with the application.
- Desktop deployment has new cl arguments: --extra-ignore-dirs
and --extra-modules that further complements finding the Qt
modules used by the application.
- Since the Qt dependencies are also required for desktop deployment,
'modules' field in pysidedeploy.spec is moved from under 'buildozer'
key to 'qt' key.
- dependency finding code moved to dependency_util.py. This also
helps in list the imports without conflicts in deploy_lib/__init__.py.
- Fix tests. Skip the deploy tests for macOS 11 as the CI does not
include dyld_info either via XCode or CommandLineTools.
Task-number: PYSIDE-1612
Change-Id: I3524e1996bfec76c5635d1b35ccbc4ecd6ba7b8d
Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
Diffstat (limited to 'sources/pyside-tools/android_deploy.py')
-rw-r--r-- | sources/pyside-tools/android_deploy.py | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/sources/pyside-tools/android_deploy.py b/sources/pyside-tools/android_deploy.py index 362fb3766..75269d622 100644 --- a/sources/pyside-tools/android_deploy.py +++ b/sources/pyside-tools/android_deploy.py @@ -9,7 +9,7 @@ from pathlib import Path from textwrap import dedent from deploy_lib import (create_config_file, cleanup, config_option_exists, PythonExecutable, - MAJOR_VERSION) + MAJOR_VERSION, HELP_EXTRA_IGNORE_DIRS, HELP_EXTRA_MODULES) from deploy_lib.android import AndroidData, AndroidConfig from deploy_lib.android.buildozer import Buildozer @@ -46,26 +46,6 @@ from deploy_lib.android.buildozer import Buildozer Note: This file is used by both pyside6-deploy and pyside6-android-deploy """ -HELP_EXTRA_IGNORE_DIRS = dedent(""" - Comma separated directory names inside the project dir. These - directories will be skipped when searching for python files - relevant to the project. - - Example usage: --extra-ignore-dirs=doc,translations - """) - -HELP_EXTRA_MODULES = dedent(""" - Comma separated list of Qt modules to be added to the application, - in case they are not found automatically. - - This occurs when you have 'import PySide6' in your code instead - 'from PySide6 import <module>'. The module name is specified - with either omitting the prefix of Qt or with it. - - Example usage 1: --extra-modules=Network,Svg - Example usage 2: --extra-modules=QtNetwork,QtSvg - """) - def main(name: str = None, pyside_wheel: Path = None, shiboken_wheel: Path = None, ndk_path: Path = None, sdk_path: Path = None, config_file: Path = None, init: bool = False, @@ -124,7 +104,7 @@ def main(name: str = None, pyside_wheel: Path = None, shiboken_wheel: Path = Non config.title = name try: - config.modules += extra_modules + config.modules += list(set(extra_modules).difference(set(config.modules))) # this cannot be done when config file is initialized because cleanup() removes it # so this can only be done after the cleanup() |