aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside-tools
Commit message (Collapse)AuthorAgeFilesLines
* 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-212-2/+2
| | | | | | | | | 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>
* Coin: Add support for Android wheelsSimo Fält2024-06-211-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Split coin instructions into separate files specifically for Desktop, Android and common instructions - Make changes to cross_compilation script to support coin. - new 'coin' cli argument introduced. This is required because Qt installation from CI servers differ from the Qt installation from the maintenance tool. - Add a shell script to override the Python used for cross-compilation for the macOS 13 x86_64 system. This system is responsible for building the arm64 Android wheels. The system by default uses Python 3.10. However, python-for-android requires Python 3.11. Hence, we manually install python 3.11 into a non default path and use it for cross-compilation. The default Python of the aforementioned system has been updated to 3.11, but system still uses qt5#6.7. Hence it is not reflected yet. When ac72bb1d489f7442fe8d9aa168298a94ff62d941 is merged, we will finally get 3.11 and the need for this script can be removed. - Add markupsafe==2.0.1 to the requirements.txt file. This is required to prevent an error while installing Jinja2. ToDo: Tag Jinja2 version so that this requirements can possibly be removed. - Currently only x86_64 and arm64 wheels are produced since they are the most important. Most Android devices these days are arm64. This can be expanded to also include x86, but armv7 requires a Windows host and that is currently not possible with the CI. For armv7 wheels, users will have to build the wheels themselves using the provided cross compilation Python script. Task-number: PYSIDE-1612 Task-number: PYSIDE-2766 Change-Id: I8f15a85887e207a5c6605fd8696d15b4646fb2fd Reviewed-by: Simo Fält <simo.falt@qt.io>
* Use modern typing syntaxAdrian Herrmann2024-06-2013-76/+70
| | | | | | | | | | | | 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-2032-0/+32
| | | | | | | | 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-143-4/+12
| | | | | | | | | | - 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: fix --modeShyamnath Premnadh2024-06-131-1/+1
| | | | | | | | | | Amends 32e353e9d91f45c23dcb07b0798237c79795cf0a Pick-to: 6.7 Task-number: PYSIDE-1612 Task-number: PYSIDE-2622 Change-Id: If14d53e5547d2f91d6cdad6a3460a50b375cdd9f 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-105-13/+62
| | | | | | | | | | | | | - 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>
* Tooling: Add pyside6-balsamuiShyamnath Premnadh2024-04-192-1/+6
| | | | | | | | | | - Add documentation for the tool - Add a screenshot of the tool Pick-to: 6.7 6.6 6.5 Task-number: PYSIDE-2629 Change-Id: I63d1d7e65d92ec37012ce40bb319dfeef9c9695b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* pyside6-project: Add a rule for pyside6-qsbFriedemann Kleint2024-04-182-1/+8
| | | | | | | Pick-to: 6.7 Task-number: PYSIDE-2629 Change-Id: I46303c172bb82654186def51908317c269c7c5e7 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Tooling: add pyside6-balsamShyamnath Premnadh2024-04-182-1/+6
| | | | | | | | | - Also add the relevant documentation Pick-to: 6.7 6.6 6.5 Task-number: PYSIDE-2629 Change-Id: Ic2e7798a5f0ff7015cb87089dda2420ed6327ca2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Tooling: Add pyside6-qsbShyamnath Premnadh2024-04-182-1/+6
| | | | | | | | | | | - Analogous to the qsb tool in Qt - Add pyside6-qsb tool to the documentation - Update developer documentation Pick-to: 6.7 6.6 6.5 Task-number: PYSIDE-2629 Change-Id: I93058ebb2864491e951f4f828d703d8893fbcbe7 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>
* pyside6-qml: error fixShyamnath Premnadh2024-03-141-2/+2
| | | | | | | | | - QQuickView should be used when the rootobject is a QQuickItem. Pick-to: 6.6 Task-number: PYSIDE-2640 Change-Id: I1ee866d7fbd732500111db139f052f4bd3024740 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>
* Android Deployment: Adjust with 6.7Shyamnath Premnadh2024-03-111-3/+0
| | | | | | | | | - Amend according with d1760bc8100c94a831f80080a5433a360266c5e2 - Update Android NDK to r26b aligning with Qt Task-number: PYSIDE-1612 Change-Id: I4ddb99568617d73213f83536f2c2a2e028d927ee Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@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-117-68/+214
| | | | | | | | | | | | | | | | | | - 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-075-29/+100
| | | | | | | | | | | | | | | | - 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-0610-172/+355
| | | | | | | | | | | | | | | | | | | | - 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-017-206/+186
| | | | | | | | | | | | | | | | | | | | | | | | | | - 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-297-248/+271
| | | | | | | | | | | | | | | | | | | | | | | | - 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>
* pyside6-project: Fix --dry-runShyamnath Premnadh2024-02-153-19/+39
| | | | | | | | Bug caused from 10715102f01bfee9c0122f21680f05414a947357 Pick-to: 6.6 6.5 Change-Id: I50631239134f154baebab0eef4d36c52e8ba398b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* pyside6-project: Add a command for running lupdateFriedemann Kleint2024-02-122-4/+34
| | | | | | | | | [ChangeLog][PySide6] pyside6-project now has an lupdate mode updating translation files (.ts) from the sources. Change-Id: I853e55455fff2c0c22a7099c650e4bd3b2fc52c4 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* pyside6-project: Add a build rule for building .qm files from .ts filesFriedemann Kleint2024-02-122-0/+8
| | | | | | | | | [ChangeLog][PySide6] pyside6-project now also builds translation (.qm) files. Pick-to: 6.6 6.5 Change-Id: I9863ff3d031499ae7a74c04ec988ca2085a75cfa Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* pyside6-project: Ensure rc_.py files are built lastFriedemann Kleint2024-02-121-1/+11
| | | | | | | | | Resource might depend on generated files. Introduce a sort function to ensure .qrc goes last. Pick-to: 6.6 6.5 Change-Id: I8188eda00247cb192a485f30755100862d6895a1 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* metaobjectdump.py: Handle string type specifications in @Slot, @PropertyFriedemann Kleint2024-02-081-3/+12
| | | | | | Pick-to: 6.6 6.5 Change-Id: Ia940796bd129522e703ae35ffa2963bf21d9680f Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* metaobjectdump.py: Silence warning about unknown decoratorsFriedemann Kleint2024-02-081-2/+2
| | | | | | | | We are only interested in Qt decorators. Pick-to: 6.6 6.5 Change-Id: Idb9737f5151e6fe4db383e8682b0c6019c3cb61d Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* PySide Tools: Fix flake8 warningsShyamnath Premnadh2024-02-0217-49/+45
| | | | | | | | | | | | - 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>
* pyside_tool.py: Work around console encoding issues on WindowsFriedemann Kleint2024-01-301-7/+4
| | | | | | | | | | Use subprocess.call() instead of capturing the output. As a drive-by, use stderr for error messages. Pick-to: 6.6 6.5 Change-Id: I28c9623754b0718cd4a5041475f451247ac5811f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Tismer <tismer@stackless.com>
* Fix pyside6-designer crash with pyenv on UnixShyamnath Premnadh2024-01-051-1/+24
| | | | | | | | | | | | | | | | | | - With pyenv installed Python, we need to explicitly add the full Python library path to LD_PRELOAD(Linux) and DYLD_INSERT_LIBRARIES(macOS). Otherwise, these libraries are searched in the default search paths of ld and dyld, and it won't be able to find them. - for macOS, the python installed with pyenv won't be a framework build unless explicitly specified. Thus we use the same approach for linux by looking for the Python library inside the path in `LIBDIR`. In the case of a framework build with pyenv, 'PYTHONFRAMEWORKPREFIX' will not be empty and hence no explcit changes are required. Fixes: PYSIDE-2568 Pick-to: 6.2 6.5 6.6 Change-Id: I94815b721acb85fa0b7f28d1bbb00a49717120c3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@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: Add requirements.txtShyamnath Premnadh2023-12-043-6/+11
| | | | | | | | | | | | - Adds a requirements-android.txt file - Simplifies code in pyside_tool.py - Sets up installing requirements in tests without redundantly listing the dependent packages Task-number: PYSIDE-1612 Pick-to: 6.6 Change-Id: If98f6458673bc72103c898e078e6a16f1cf38b12 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-0410-9/+53
| | | | | | | | | | | | | | | | | | | | | | | | | - 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>
* Deployment: Code RefactoringShyamnath Premnadh2023-11-289-284/+327
| | | | | | | | | | | | | | | | | | | | | | | | | - 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>
* Deployment: Relative path bug fixShyamnath Premnadh2023-11-231-2/+3
| | | | | | | | | | | | | | | | | | | | - The qml files are identified and stored as relative path and line under consideration tries to do a 'relative_to()' on an absolute path which causes the error ValueError: {qml_file} is not in the subpath of 'project_path' OR one path is relative and the other is absolute. The error only appears on the first run of pyside6-deploy with a project that does not have a .pyproject file. For the subsequent runs, absolute path are used because the path is fetched from the deploy config file. - This patch fixes this error by using absolute path for each qml_file Pick-to: 6.6 6.5 Task-number: PYSIDE-1612 Change-Id: Ib54edded404bd1be87ab5f22f61e2d30416b7dae Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* PySide build - remove importlib_metadataShyamnath Premnadh2023-11-091-6/+1
| | | | | | | | | 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 <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Deployment cleanup: isort and flake8Shyamnath Premnadh2023-10-2312-37/+42
| | | | | | | | 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>
* deploy: Apply fixes when using pyenv and provide readable errorsChristian Tismer2023-10-181-2/+3
| | | | | | | | | | | | | | | | | | | | When the patch for pyenv was applied, some tests in test_pyside6_deploy.py were broken, which shows up locally but not (yet) in CI. For better understanding, the test classes were further broken up into three groups (irrelevant, might be undone). Things became clearer by writing a special version of unittest.TestCase that handles long strings as lists. REMARK: We are at Python 3.8 and can use ":=" now :=) Task-number: PYSIDE-1612 Change-Id: I3a479f48b96dd5f95864b8a94af6d01b42ffc196 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>