| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Add a future statement to all Python source files.
Task-number: PYSIDE-2786
Change-Id: Icd6688c7795a9e16fdcaa829686d57792df27690
Reviewed-by: Adrian Herrmann <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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 <[email protected]>
Reviewed-by: Qt CI Bot <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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 <[email protected]>
Reviewed-by: Friedemann Kleint <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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 <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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 <[email protected]>
|
|
|
|
|
|
|
|
|
| |
Removed for 6.6 because we don't support Python 3.7 from PySide 6.6
Pick-to: 6.6
Change-Id: I2aea80ef28dad7bd346ff9f2321f01b3481e8762
Reviewed-by: Qt CI Bot <[email protected]>
Reviewed-by: Cristian Maureira-Fredes <[email protected]>
|
|
|
|
|
|
|
|
| |
Task-number: PYSIDE-1612
Pick-to: 6.6
Change-Id: I620582409749b1ce1e36721f1308005c4f6d2828
Reviewed-by: Cristian Maureira-Fredes <[email protected]>
Reviewed-by: Friedemann Kleint <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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 <[email protected]>
Reviewed-by: Qt CI Bot <[email protected]>
Reviewed-by: Cristian Maureira-Fredes <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- `--config-file` now defaults to pysidedeploy.spec. This enables to
automatically find the config file, in case if it is present,
without specifying it through the `--config-file` option.
- Use `pip freeze` also to check if a Python package in installed. This
is useful for packages like `patchelf` which does not provide
a Python module, but only an executable.
- Change some `logging.exception()` to actual exceptions because the
the exception requires some manual intervention for resolution.
- Some of the config options were earlier reevaluated even when an
existing config file exists. This is now adapted to skip the
reevaluation when a config file exists.
- In case of pyenv python, add `--static-libpython=no` as extra argument
accepted by Nuitka. This is because pyenv Python uses `--enable-shared`
by default since release 2.3.10 -
https://github.com/pyenv/pyenv/pull/2554
- Some general fixes related to logging.
Task-number: PYSIDE-1612
Pick-to: 6.6
Change-Id: Ib0fa0ca0ec3a08c07140c0c2fa32f422658d04d8
Reviewed-by: Qt CI Bot <[email protected]>
Reviewed-by: Friedemann Kleint <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- This patch adds an extra step to check the existence of Python files
generated from `pyside6-uic` and `pyside6-qrc` for identifying the
imported Qt modules in the application.
This only applies when the application has a .pyproject file. When
the project does not have a .pyproject file, all the Python files
in the application are checked for Qt module imports.
The .pyproject file does not consider the generated Python files and
hence the need of this patch.
- For pyside6-deploy, this patch is irrelevant because Nuitka identifies
all the required Python files of the project.
Task-number: PYSIDE-1612
Pick-to: 6.6
Change-Id: Ic9a2812c42226b6baebab1b23fac8e410910578e
Reviewed-by: Friedemann Kleint <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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 <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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 <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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 <[email protected]>
Reviewed-by: Qt CI Bot <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- As the deployment tool's code base grows larger, I realized that
the ability to create a venv using pyside6-deploy was a bit of
over engineering. There are instances where I have to use the
current Python interpreter to fetch some information from the
newly created venv Python, which results in weird code.
Note: The tool would still work even if the user is using a
globally installed Python interpreter with PySide6 installed.
- Now, the user is warned if he is not in a virtual environment and
prompted the requirement to install further Python packages. If
the user input's "no", then the tool exits.
- dry_run used to create an empty 'pysidedeploy.spec' which can
wreck the normal deployment process. This is fixed by
pyside6-deploy using the 'default.spec' instead of creating
a new 'pysidedeploy.spec'.
Fixes: PYSIDE-2258
Task-number: PYSIDE-1612
Pick-to: 6.4 6.5
Change-Id: I376d2a6aea9f93582eab7a904a81f48426bfee18
Reviewed-by: Adrian Herrmann <[email protected]>
Reviewed-by: Friedemann Kleint <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
| |
Since Python 3.8 there is a submodule for metadata,
which makes a pip installation of import_metadata unnecessary.
Task-number: PYSIDE-1564
Change-Id: I93ed8aa36e617f7c6c756cb6d750d858e983f82d
Pick-to: 6.4
Reviewed-by: Adrian Herrmann <[email protected]>
Reviewed-by: Shyamnath Premnadh <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Specific package versions can be specified as
{package_name}=={version}
- Nuitka 1.5.1 breaks with PySide6, so use version 1.4.8
- new package "importlib_metadata" required to find a python package's
version at run time. This is added to Python from 3.8, but since
we support 3.7 the package "importlib_metadata" is required
- modify test accordingly
Task-number: PYSIDE-1612
Pick-to: 6.4
Change-Id: Ie74273ba2a116f0f94f3a3e10120b2de78482724
Reviewed-by: Cristian Maureira-Fredes <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Added more Nuitka options to reduce the size of QML executable.
Some binaries which cause the QML executable to become heavy eg:
QtWebEngine are removed, if they are not used
- Add new log messages for --verbose option
- Add deploy.pyproject file
- Modifies pyside6-deploy tests to consider the QML options, by
mocking pyside6-qmlimportscanner
Task-number: PYSIDE-1612
Change-Id: Id2e94217e99eedbf41ecfc8de1a37e94c7edaa52
Reviewed-by: Friedemann Kleint <[email protected]>
|
|
|
|
|
|
|
|
|
| |
- In the case of dry_run==True, the initial call returns the Nuitka
command being run to the main function
Task-number: PYSIDE-1612
Change-Id: I48a6d686346dee691f01911c07901fac7f3af4c2
Reviewed-by: Friedemann Kleint <[email protected]>
|
|
|
|
|
|
|
|
|
|
| |
- to distinguish between deploy.py and deploy folder, since both
are Python modules. This is especially useful when testing since
our tests are located in sources/pyside6/tests/tools.
Task-number: PYSIDE-1612
Change-Id: Ideb35b23f454ec64415421e00464cfb1f7055401
Reviewed-by: Friedemann Kleint <[email protected]>
|
| |
|
| |
|
|
|