aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside-tools/deploy_lib
Commit message (Collapse)AuthorAgeFilesLines
* Desktop Deployment: Add more testsShyamnath Premnadh2024-12-091-1/+1
| | | | | | | | | | | | | - Added tests for extra modules and directories to ignore. These are cli options. - Fixed an issue where updating a Python set was not functioning correctly. Task-number: PYSIDE-2945 Pick-to: 6.8 Change-Id: Ia6b0e9ef98e2e0999bc4782168b3889598cca682 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Desktop Deployment: Disregard more non existent pluginsShyamnath Premnadh2024-12-062-5/+6
| | | | | | | | | | | - Amends 05b3c28099c1eaff74bba8b06004cc8205b24f45 - Also, ignores 'scenegraph' and 'networkaccess' Pick-to: 6.8 Task-number: PYSIDE-1612 Change-Id: Ibc1a0ea1525f7d56ed884bc652612d8985479258 Reviewed-by: Jaime Resano <Jaime.RESANO-AISA@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* deploy: use tuple instead of list for lru_cache functionCristián Maureira-Fredes2024-12-041-1/+5
| | | | | | | | | One cannot use list in the arguments of a function using lru_cache Fixes: PYSIDE-2945 Pick-to: 6.8 Change-Id: I2305dab868a634bfb8a3f240d403c07281f7edb8 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Desktop Deployment: Upgrade Nuitka to 2.5.1Shyamnath Premnadh2024-11-272-1/+8
| | | | | | | | | | | | | | - Nuitka 2.5.1 imposes strict checking for the Qt plugins included through the --include-qt-plugins option by checking if the plugin actually exists in PySide6 installation. Consequently, the plugins "accessiblebridge", and "platforms/darwin" which are not required by Nuitka are removed from the list of plugins to be included. - Adapt tests. Pick-to: 6.8 Task-number: PYSIDE-1612 Change-Id: I89cef4acf102e01c229b1dd6063fc08903ea686d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Deployment: Support .webp filesShyamnath Premnadh2024-11-262-6/+3
| | | | | | | | | | | | - Ignoring .webp files are not needed in the newer Nuitka version. - Additionally, also adds a comment differentiating between the `plugins` fields used in the deployment configuration file. - Adapt tests. Pick-to: 6.8 Task-number: PYSIDE-1612 Change-Id: Ibbaab03021fa50e4777caa346a2c128fd5e1a06c Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Deployment: Fix crash when from . import x is usedJaime Resano2024-11-251-1/+1
| | | | | | | | | | | | When ast library parses a "from . import x" statement, it will return a module name of None. Therefore, using .startswith() on None will raise an exception. Task-number: PYSIDE-1612 Pick-to: 6.8 Change-Id: I6532f4ebc469695ee977840c3cb40f641fb3cdb6 Reviewed-by: Jaime Resano <Jaime.RESANO-AISA@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Avoid including dev folders in deployed executableJaime Resano2024-11-202-3/+3
| | | | | | | | | | | The .git, __pycache__ and .vscode folders should not be included in the deployed executable. Windows, it causes permission errors when the cleanup is performed Pick-to: 6.8 Task-number: PYSIDE-1612 Change-Id: Icfcbe6aa0d3cb2b869a0bb9a68dbe8d1e1d9a5ec Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Deployment: Use include-data-dirShyamnath Premnadh2024-10-152-4/+18
| | | | | | | | | | | | | | | | - Use --include-data-dir to include the QML modules. This would reduce the command length significantly. - Additionally, package all the subdirectories of the application directory. The user may have other relevant resources required by the application eg: images, fonts, etc. - Add two new directories for directories to be ignored - docs and examples. These directories are not required for the application to run. Pick-to: 6.8 Task-number: PYSIDE-1612 Change-Id: I6269f77c0fd94a54e3b7a44f317bc144bd68e5ec Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Deployment: Support Design Studio projectsShyamnath Premnadh2024-10-074-34/+108
| | | | | | | | | | | | | | | | | | - new class 'DesignStudio' to handle Design Studio projects. - Currently uses a way of monkey patching to override the 'main.py' to use 'main_patch.py' which has the same content but with 'app_dir' set to the parent of `main.py``. The reason for doing this is that Nuitka requires the `main.py` to be in the same directory as other resources required for the project. Once the corresponding patch, to alternate between evaluating 'app_dir' based on whether the application is deployed or called through the Python interpreter, is merged then this temporary fix of creating 'main_patch.py' can be removed. - Add tests. Pick-to: 6.7 Change-Id: I79e6572bdbbf4576fbdd9039a4922997a22139f8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Deployment: Create pyside6-deploy always in main project directoryShyamnath Premnadh2024-10-071-7/+3
| | | | | | | | | | | | | | | | | - 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>
* Deployment: Change the order of set_or_fetch functionShyamnath Premnadh2024-09-051-6/+12
| | | | | | | | | | | | | - The value provided through cli is prioritized over the value in the config file. - Update the docstring for the set_or_fetch function. - Additionally, fix an error on run_qmlimportscanner() where the first argument was passed as a list instead of a tuple. Pick-to: 6.7 Task-number: PYSIDE-1612 Change-Id: I6afb25c8e88f7ee2fb4a88539d2b8b3170dcdd00 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Deployment: Fix formatting when writing back to config fileShyamnath Premnadh2024-09-051-2/+21
| | | | | | | | | | | | | | | | - Configparser does not preserve the formatting of the original file. As a result when writing into the config file, the formatting is lost. In the case of pysidedeploy.spec, the blank lines are lost making the entire config file rather hard to read. - This patch adds a blank line before the comment lines thus retaining the original formatting of the file. Pick-to: 6.7 Task-number: PYSIDE-1612 Change-Id: Icd1ebe52d364f4dc9197220161ed6daa6ed577a0 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* Deployment: Exclude directories from qmlimportscanner checkShyamnath Premnadh2024-09-052-24/+14
| | | | | | | | | | | | - ac55d94395849a5a4af2883d2dab82982252c92d helps to fix a TODO where we can exclude directories from the qmlimportscanner check directly without moving all the QML files into a temporary directory - Amend b32183d2cd5fbbd1ac6a53827edf5d40428855ff Task-number: PYSIDE-1612 Task-number: PYSIDE-2803 Change-Id: I2524af7154b32730d2d823fda6973b9a2c8a76a3 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Desktop Deployment: Unify API design of Config classShyamnath Premnadh2024-09-023-135/+154
| | | | | | | | | | | | | | - 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>
* Desktop Deployment: Upgrade Nuitka to version 2.4.8Shyamnath Premnadh2024-08-301-1/+1
| | | | | | | Pick-to: 6.7 Task-number: PYSIDE-1612 Change-Id: I001f0f446d41330e1ef0a798c82297a0e7c47021 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Deployment: make run_qmlimportscanner() parameters hashableShyamnath Premnadh2024-08-232-2/+3
| | | | | | | | | - Required for @lru_cache decorator Task-number: PYSIDE-1612 Pick-to: 6.7 Change-Id: I5e62ad93f20f7000e2e0ef37617aa756b3272314 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Desktop Deployment: Fix final application nameShyamnath Premnadh2024-08-091-2/+2
| | | | | | | | | - Additionally, adapt wheel_tester.py Pick-to: 6.7 Fixes: PYSIDE-2806 Change-Id: If2c0d8f186142797f3280136298ed299643824f5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Desktop Deployment: Handle long command lines on WindowsShyamnath Premnadh2024-08-061-0/+43
| | | | | | | | | | | | | | | | | | | | - When the Nuitka command line becomes more than 8191 characters in Windows, the subprocess call fails with the error message "The command line is too long". This patch fixes the issue. - The patch involves moving the contents of the main Python file to an intermediate file called 'deploy_main.py' and modifying the deploy_main.py file to start with '# nuitka_project: <nuitka_option>'. This way, Nuitka picks up the option directly from deploy_main.py rather than the command line. - Add relevant tests to consider the scenario. Pick-to: 6.7 Task-number: PYSIDE-1612 Fixes: PYSIDE-2803 Change-Id: Iacdaa66283cb41dee6df99c9015b4679e299b02e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Desktop Deployment: Change qmlimportscanner usage parametersShyamnath Premnadh2024-08-052-17/+29
| | | | | | | | | | | | | | | | | | | | | | | | | - Previously, pyside6-qmlimportscanner was run on each of the QML files by listing the QML files. For projects with a large number of QML files, this leads to a long command line that exceeds the maximum command line length on Windows. - This change modifies the command to use `-rootPath` command line option to specify the root path of the project directory. This will recursively find all the QML files in the project directory and its subdirectories, and find the QML modules used. - This solution moves all the '.qml' files in the project directory into a temporary directory and running pyside6-qmlimportscanner on this temporary directory. - Additionally, memoize the function run_qmlimportscanner() to avoid running the qmlimportscanner multiple times for the same project. Pick-to: 6.7 Task-number: PYSIDE-1612 Task-number: PYSIDE-2803 Change-Id: Ie82fc4e5071debe505fae7b5815b76c89d99ff4c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Desktop Deployment: Consider 'dist-packages'Shyamnath Premnadh2024-08-011-2/+5
| | | | | | | | | | | - For certain debian systems, the system Python uses 'dist-packages' directory for installing Python packages instead of 'site-packages'. This patchs adds a check for 'dist-packages' directory. Pick-to: 6.7 Fixes: PYSIDE-2785 Change-Id: I697e2939ff4114cad0e696d8920322d080be9386 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* deploy: use shlex to split argsCristián Maureira-Fredes2024-07-301-1/+3
| | | | | | | | | Pick-to: 6.7 6.5 6.2 Fixes: PYSIDE-2814 Change-Id: I88aa5ecf6a22808fe5efd2c52fd6675b153da936 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Desktop Deployment: Ignore directoriesShyamnath Premnadh2024-07-083-22/+14
| | | | | | | | | | | | | | | | - Among the directories ".qtcreator", "site-packages", "deployment" etc were excluded when finding the QML files and the Python files in the project. - Simplify find_and_set_qml_files(self) function by removing the unnecessary code. - Memoize pyside_module_imports(). Pick-to: 6.7 Task-number: PYSIDE-1612 Change-Id: I55ccb67300c27de73843ad9996da655ba04403fb Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Desktop Deployment: Update Nuitka to 2.3.7Shyamnath Premnadh2024-06-261-1/+1
| | | | | | | | | | | | - Fixes sporadic crashes with Python 3.12 - Supports Numpy 2.0. This is not relevant for us currently, but it's good to have the latest version. Pick-to: 6.7 Fixes: PYSIDE-2781 Task-number: PYSIDE-1612 Change-Id: I96a437795018792906ba6cf44e6466dacc154dbf Reviewed-by: Christian Tismer <tismer@stackless.com>
* Fix flake8 and typing issuesAdrian Herrmann2024-06-211-1/+1
| | | | | | | | | Fix a number of miscellaneous flake8 and typing issues exposed after updating to the modern typing syntax from 3.10 onwards. Task-number: PYSIDE-2786 Change-Id: I5476d1208dd1da3fa93bdec02bc6124a80b247fc Reviewed-by: Christian Tismer <tismer@stackless.com>
* Use modern typing syntaxAdrian Herrmann2024-06-207-26/+19
| | | | | | | | | | | | We can already use the modern typing syntax introduced with Python 3.10 in 3.9 via future statement definitions, even before we raise the minimum Python version to 3.10. Note that direct expressions with "|" don't work yet. Task-number: PYSIDE-2786 Change-Id: Ie36c140fc960328322502ea29cf6868805a7c558 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Python-3.10: Allow the new syntax for Python 3.9Christian Tismer2024-06-2013-0/+13
| | | | | | | | Add a future statement to all Python source files. Task-number: PYSIDE-2786 Change-Id: Icd6688c7795a9e16fdcaa829686d57792df27690 Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
* Deployment Docs: Add instructions to generate a bug reportShyamnath Premnadh2024-06-171-2/+0
| | | | | | | | | | - Additionally, remove some comments from default.spec that are not relevant anymore. Pick-to: 6.7 Task-number: PYSIDE-1612 Change-Id: Iea2fed95507b6e649285e409cf8678287bf15a56 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Desktop Deployment: Fix errorShyamnath Premnadh2024-06-171-7/+8
| | | | | | | | | | | | | | | In the scenario where 'pyside6-deploy --init' is used on the first run and for the consequent invocations, only running just 'pyside6-deploy' without any additional options, the deployment should have worked. This currently had a bug where it overrides the main Python entrypoint file with the default option of 'main.py'. This issue is caused due to the order of 'if' loop in the changed function. Pick-to: 6.7 Task-number: PYSIDE-1612 Change-Id: I605c4b9ff2035e85c0b5f73049a3ecc84d0fd80c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Android Deployment: Enable pyside6-android-deploy in macOSShyamnath Premnadh2024-06-142-2/+9
| | | | | | | | | | - enable the tool for macOS - add dependency .xml to the Android wheels Pick-to: 6.7 Task-number: PYSIDE-2766 Change-Id: I77495466b8a9cc3565c640beac202d533ee1d2a6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Desktop Deployment: Update Nuitka to 2.3.2Shyamnath Premnadh2024-06-111-1/+1
| | | | | | | | | | - Full support for Python 3.12 - Experiemental support for Python 3.13 Pick-to: 6.7 Task-number: PYSIDE-1612 Change-Id: Ib4699351ec4105de756b4ac16cd7b3a49054a614 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Desktop Deployment: Enable Nuitka --standalone modeShyamnath Premnadh2024-06-104-9/+43
| | | | | | | | | | | | | - enables the standalone mode of Nuitka for pyside6-deploy - the mode can be set either through the command line or the config file - adapt tests - update documentation Pick-to: 6.7 Fixes: PYSIDE-2622 Task-number: PYSIDE-1612 Change-Id: I5a10c857d3e79174d2643139eb2e4f7b5e10d955 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Android Deployment: Use develop branch of p4aShyamnath Premnadh2024-05-281-0/+7
| | | | | | | | | | | | - Temporary requirement since my latest changes are not yet merged into the master branch of p4a. This will be remove once the changes are in the master branch of p4a. Pick-to: 6.7 Task-number: PYSIDE-1612 Change-Id: I0e992b053de727660f4090779ee395e7a85451e6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
* Desktop Deployment: ignore .qsb, .webp, .cpp.o and .qen filesShyamnath Premnadh2024-05-211-0/+14
| | | | | | | | | | | | | | | - These files have to be ignored in the deployment process because Nuitka is not able to recognize these file formats and considers them to the dlls instead of data files. - The missing .webp files breaks the usage of BusyIndicator type of QtQuick Controls. Hence, a bug report for that is raised in Nuitka : https://github.com/Nuitka/Nuitka/issues/2854 - Adapt tests Pick-to: 6.7 6.5 Change-Id: Ic4b3b6c65e059ec618a26361caa62b9d7c608690 Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Deployment: Adapt checking for plugin dependenciesShyamnath Premnadh2024-04-052-4/+14
| | | | | | | | | | | | | - Check if package e.g. PySide6_AddOns is installed before checking for the .json file - If a package is missing, add log warning for the missing package. If the .json file is missing inspite of the package being installed, then raise a proper warning. Pick-to: 6.7 6.7.0 Task-number: PYSIDE-1612 Change-Id: Ia65b06df15df7b334438f439762b135d9f61981d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Android Deployment: Update NDK version in the toolShyamnath Premnadh2024-03-131-1/+1
| | | | | | | | | - updated to r26b in accordance with Qt 6.7 Task-number: PYSIDE-1612 Change-Id: I7efa6d827b84d92a5571c4e2d337b6545810406a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
* Upgrade Nuitka to 2.1.0Shyamnath Premnadh2024-03-111-1/+1
| | | | | | | Task-number: PYSIDE-1612 Change-Id: Ieab3a7c7fd43e50e83c30d97cb70f6f1135b69e3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
* Deployment: add permission support and create macOS bundle applicationShyamnath Premnadh2024-03-116-62/+200
| | | | | | | | | | | | | | | | | | - Look at the ast of the python files of the application to identify the permissions used by the application. Once the permissions are identified, pass the necessary NS property list key to be added to the Info.plist file to Nuitka. - For macOS, when deploying create a macOS application bundle (.app) by default. This makes it align more with Apple recommendations and Qt deployment. - Fix tests. - Fix wheel_tester.py to consider .app for macOS. Task-number: PYSIDE-1612 Task-number: PYSIDE-2468 Change-Id: Ie225c9a92c845b432a8e7eaa791a8aeb86ecd988 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Desktop Deployment: Optimize the plugins includedShyamnath Premnadh2024-03-074-29/+99
| | | | | | | | | | | | | | | | - Applications that use certain modules like Multimedia does not work because the plugins for it were not included. However, including all the plugins can make the application executable huge. This patch filters out the necessary plugins by looking at PySide6_Essentials.json and PySide6_Addons.json shipped with the wheels and only bundles these necessary plugins with the application. - Adjust tests. Task-number: PYSIDE-1612 Task-number: PYSIDE-2597 Change-Id: I35c74907a1782ae5101fb7c0861adcb97db5792d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Deployment: Find dependent modulesShyamnath Premnadh2024-03-066-142/+324
| | | | | | | | | | | | | | | | | | | | - 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>
* Deployment Config: Remove Nuitka dependenciesShyamnath Premnadh2024-03-011-1/+1
| | | | | | | | | | | | - ordered_set and zstandard are installed along with Nuitka. We don't need to explicitly specify them anymore. If they are not existing, it means that the user might have explicitly removed them. - Adapt tests. Pick-to: 6.6 Task-number: PYSIDE-1612 Change-Id: I21657cb6df95f2d33f48a719a71f49efab84990c Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Deployment: More Refactoring and minor bug fixesShyamnath Premnadh2024-03-015-194/+170
| | | | | | | | | | | | | | | | | | | | | | | | | | - 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>
* Deployment: RefactoringShyamnath Premnadh2024-02-296-248/+270
| | | | | | | | | | | | | | | | | | | | | | | | - 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>
* PySide Tools: Fix flake8 warningsShyamnath Premnadh2024-02-028-27/+25
| | | | | | | | | | | | - 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>
* Android Deployment: Remove personal fork of p4aShyamnath Premnadh2024-01-311-4/+0
| | | | | | | | | | | - Android deployment worked by using my own fork of p4a. This can be removed now that the changes are merged into the master branch of p4a. Pick-to: 6.6 Task-number: PYSIDE-1612 Change-Id: I530c6f6b6cbeffa80b3833c1d6efb50154eb47e9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Android Deployment: Explicit android group in config fileShyamnath Premnadh2024-01-312-8/+10
| | | | | | | | | | | | | - Distinguishes the changes fields as only relevant for Android Deployment. - This distinguishing group makes it clearer when we finally have iOS wheels. Pick-to: 6.6 Task-number: PYSIDE-1612 Change-Id: I215d2deec0117ae855e6d9a061642984eccd36ef Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Android Deployment: Install `buildozer` with --init cli argumentShyamnath Premnadh2023-12-081-1/+7
| | | | | | | | | | | | - When the --init option is used the config files are created, but to create buildozer.spec from pysideconfig.spec, buildozer has to be installed. This patch installs `buildozer` when --init option is passed. Task-number: PYSIDE-1612 Pick-to: 6.6 Change-Id: I6917496e509a0b4a203346145d1c3fe8dc73ba14 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Android Deployment: Remove redundant updating of config fileShyamnath Premnadh2023-12-041-8/+0
| | | | | | | | | | - These can be removed since the update is done after initialization in android_deploy.py Task-number: PYSIDE-1612 Pick-to: 6.6 Change-Id: I7fa86e3c11a4161141a90ffd326c5748f149263d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Deployment: Add icon for applicationShyamnath Premnadh2023-12-048-8/+50
| | | | | | | | | | | | | | | | | | | | | | | | | - 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>
* Upgrade Nuitka to 1.8.0Shyamnath Premnadh2023-12-041-2/+2
| | | | | | | | | | | | - No more warning on 3.11. Still no support for 3.12. - As a drive by, remove deployment related packages from the project's requirements.txt file. Pick-to: 6.6 6.5 Task-number: PYSIDE-1612 Change-Id: I1d379b4241d3e40de107ceb8c8d28b893de39dec Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Android Deployment: Add QtQuick dependency when presentShyamnath Premnadh2023-11-282-2/+17
| | | | | | | | | | | | | | | - Currently the dependencies are identified by checking the dependency files shipped with Qt and checking the Python files related to the project for PySide imports, to identify the Qt modules used. - This patch extends the dependency check by also checking the QML files related to the project for QtQuick and QtQuickControls2 import. Pick-to: 6.6 Task-number: PYSIDE-1612 Change-Id: Ia92ff9c2d06c383a6357b69f0f19160b1b522afa Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>