| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
- 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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- There was an issue where if you run pyside6-deploy from a folder
different from the project directory, it creates a new
'pysidedeploy.spec' every time unless you run
'pyside6-deploy -c <config_file>'. This patches fixes this issue by
always creating the pysidedeploy.spec in the main project directory
i.e. the parent directory of the main Python file.
- Additionally, the function 'create_config_file()' can be simplified
since it can never accept an empty 'main_file' argument and the
parameter 'config_file' can be removed.
Pick-to: 6.7
Task-number: PYSIDE-1612
Change-Id: I435f79e7222a55831cddcfbc50e07bc214e24cee
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Implements a comment suggestion from 11064d4dcd688db1d54d7273ad700761fabe3f50
- _find_and_set_** methods renamed to _find_** methods. They now
return the required property.
- Property setters now update the value in the config class as well.
This also aligns with the design of certain other properties.
- Adjust tests.
Task-number: PYSIDE-1612
Pick-to: 6.7
Change-Id: I135d0a64928381a863cbf7235240efc45421324a
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
| |
Add a future statement to all Python source files.
Task-number: PYSIDE-2786
Change-Id: Icd6688c7795a9e16fdcaa829686d57792df27690
Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- setup_python() moved to constructor of PythonExecutable.
-install_python_dependencies() moved under PythonExecutable in
python_helper.py.
- create_executable() of PythonExecutable removed. Instead, we call
Nuitka.create_executable() directly. This removes unncessary import
problems when using PythonExecutable class for Android Deployment.
- nuitka==1.8.0 changed to Nuitka=1.8 in default.spec to match with
the installed version. Otherwise, it forces the reinstall of
Nuitka==1.8 every time (bug).
- Remove recomputation of qt_plugins and local_libs. If the values
exist in pysidedeploy.spec, then they should not be computed again.
This serves the purposes of speeding up the deployment and also
to no modifying the already existing pysidedeploy.spec.
- find_pyside_modules() moved from python_helper.py to deploy_util.py.
- Adapt tests.
- Remove os.fspath wrapping from python.exe. This is not needed as
python.exe is already pathlib.Path.
Pick-to: 6.5 6.6
Task-number: PYSIDE-1612
Change-Id: Ic598e57cd2f2779c410b12fc9584cf60c5e94505
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Functions in buildozer.py for finding the local_libs, plugin and Qt
module dependencies of the application are related to the overall
config of the application and not buildozer. Hence, these functions
are moved to android_config.py.
- `ALL_PYSIDE_MODULES` moved to a function under deploy_lib/__init__.py
and `platform_map` moved to deploy_lib/android/__init__.py.
- Enable the user to pass both arm64-v8a and aarch64 as the
architecture type. Same for all the other architecures that are
synonymous.
- `verify_and_set_recipe_dir()` is now called explicitly from
android_deploy.py due to `cleanup()` deleting the recipe directories
during config initialization.
- New property `dependency_files` for AndroidConfig class.
- Fix --dry-run for Android Deployment.
- Adapt tests.
Pick-to: 6.6
Task-number: PYSIDE-1612
Change-Id: Icdf14001ae2b07dc8614af3f458f9cad11eafdac
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Fix general flake8 warnings in pyside-tools.
- add F401 to .flake8 to ignore unused imports from __init__.py files
- add E402 from __init__.py to prevent errors related to partial
initialization of modules.
Pick-to: 6.6 6.5
Change-Id: Ia848b08ff6f0d2808e04f6a83c46636e2d167c02
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- For Android deployment, by default kivy's icon is used when the
application is deployed. This patch makes use of PySide icon as the
default for all applications created with pyside6-android-deploy.
- Icon formats accepted by Nutika
windows: .ico
macOS: .icns (contains a 128x128 .png file)
linux: all standard image formats. We use .jpg
- For Desktop deployment
- change the option --linux-onefile-icon to --linux-icon. Both
are the same.
- Add icon options for macOS and Windows.
- Adapt deployment test accordingly.
- As an addition, add a default value to the --config-file option so
that it picks up the one in the project directory automatically, if
it exists. It aligns with the desktop deployment tool as per
6337e4a306babdb4015c248a14ad734b320ed2c1
- As another extra, remove an unused typing import from config.py
Pick-to: 6.6
Task-number: PYSIDE-1612
Change-Id: Ia67ea96f94ddffe4bc65652f91c8b394c4e56a33
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Move android related configurations into a new class AndroidConfig.
This class inherits from the class Config.
- Move configuration related code sections from `android_deploy.py`
to `android_config.py`
- get_config() renamed to create_config_file().
This simplifies a lot of code and makes Android deployment independent
of Desktop deployment.
- Move `generated_files_path` to `config.py`. As a result,
`generated_files_path` does not need to be passed as parameter to
to functions like `cleanup()`, `finalize()`, `Buildozer.initialize()`
as config is already passed.
- generated_files_path expression changed.
This is because we assume the project_dir is always the parent of the
source_file (i.e. main.py)
- `Buildozer` import removed from `android/__init__.py` to prevent
circular import issues.
- Change buildozer commands to use "python -m" as prefix.
Pick-to: 6.6
Task-number: PYSIDE-1612
Change-Id: Ie460dc459908dab44de82c3e269b806aff2c27c5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
| |
Task-number: PYSIDE-1612
Pick-to: 6.6
Change-Id: I620582409749b1ce1e36721f1308005c4f6d2828
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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 <Friedemann.Kleint@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Copy the required Qt plugins from `site_packages` of the python
bundled with the application to the `libs` folder of the Android
gradle project. Android looks for required libraries in this `libs`
folder. A similar step is also done by `androiddeployqt` when it
created an Android gradle project from a C++ application.
- Dependent Qt libraries found during processing of
pyside6-android-deploy are also copied into the `libs` folder, if it
does not exist already.
- `plugins` key added to `pysidedeploy.spec`, which represents the
plugins to be copied.
- The Android dependency files shipped with Qt for Android platforms,
are prased to obtain all the dependent Qt plugins of an application.
- Some code refactoring to facilitate the plugin and library copy,
by passing the plugin and library names to the PySide6 recipe
template. `jinja2` does the job of using this template to create
the PySide6 recipe to be used by python-for-android.
- As an addition, fix some minor code issues and add extra logging.
Task-number: PYSIDE-1612
Pick-to: 6.6
Change-Id: I63ca1e48aa1e4c98c912a87e68f3ae912ce89ca4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Enable automatic download of Android NDK and SDK for creating
Android PySide6 and shiboken6 wheels. Earlier, the user was
required to manually download it and supply as a command line
argument.
- They are downloaded into the HOME directory of the user into the
folder .pyside6_android_deploy. This is also similar to buildozer
which downloads them into .buildozer.
- The downloaded NDK is set to r25c, same as buildozer. The latest
Android SDK packages are downloaded.
- For the deployment tool, incase the NDK and SDK path are not
provided either through the command line or through the configuration
.spec file, the it will look for the NDK and SDK inside
.pyside6_android_deploy, before falling back to the default Android
NDK and SDK that buildozer supplies. buildozer will download them.
- As a addition, a small code rearranging is also done, along with
changing the deprecated subprocess.call() to subprocess.run().
Task-number: PYSIDE-1612
Change-Id: Ie8d51f8c7634b5b320b1dce2d4164985cbfbaaca
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- This is required for having callbacks from C++/CPython back to Python.
One example of this is when shiboken class="native" methods are called
. There are also other cases where we call back to a Python callable
through a callback from the wrapper code generated by Shiboken.
- The identified Qt modules are loaded by the python-for-android
recipe for PySide6.
Task-number: PYSIDE-1612
Change-Id: I5881ac2351fc0afb87367b4149f0f668ac1a8d37
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Use llvm-readelf to recursively find the dependencies of a dependent
Qt binary.
All the Qt dependencies are loaded at startup when loading the Android
application.
- Parse the revelant Python files of the project into ast, and
find the used Python modules. Once the Python file is parsed
into an ast, we find the imports of the following form:
from PySide6 import Qt<module>
from PySide6.Qt<module> import <classname>
This is then used to identify the module used, and we try to
load the binaries of this module. If the modules does not exist
in Qt for Android, then an error is thrown.
- The easiest way to find the relevant Python files in the project is
using a .pyproject file which lists all the relevant files. If this
is not there, then we find all the Python files in the project
folder excluding the following folders:
[".hg", ".svn", ".git", ".tox", "__pycache__", "env", "venv",
"deployment",".buildozer"]
- A new cli argument --extra-ignore-dirs, that lists the extra
directories to ignore when searching for all the relevant python
files in the project.
- A new cli argument --extra-modules, that lists the extra modules
to be added manually to the application incase they are not found
by `pyside6-android-deploy` automatically. Adding a module using
this argument means that the module binary is loaded by the Android
application on startup.
- sdk and ndk cli options are now mandatory to find the dependencies.
These two options will be removed later when pyside6-android-deploy
can automatically download them.
Task-number: PYSIDE-1612
Change-Id: Ifbdc20cbc70ab0935a23157ccc8cb7fde6992df2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Fix --dry-run in Android deployment
- Add option to control raising a warning when adding new entries
to config file
- Remove unnecessary code and comments
Pick-to: 6.5
Task-number: PYSIDE-1612
Change-Id: I5975d76024d6289fe6b9af1caeca374acb81e8cc
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
Pick-to: 6.5
Change-Id: I7eb96fa5507a476b4e86ec0195a5e9869f0f85fd
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
| |
|
| |
|
|
|