| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
This patch cleans up the pyside6-deploy tool code.
Adds some type hints and fixes some casing consistency issues.
Change-Id: I16988ebf8a15bd3d2bfd12366ebacb3ffe4001e2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Just adding some type hints and a bit of code cleanup
None of the existing logic should be affected by this change.
Task-number: PYSIDE-1612
Pick-to: 6.8
Change-Id: I42175426a03dc463b8da82aa560c3f13ab842392
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- The Qt Sql driver has a hard dependency on certain external
libraries on macOS. macdeployqt solves by patching the Qt Sql
driver by changing its RPATH and bundling the external library.
This is not possible with pyside6-deploy and should be ideally
done via Nuitka.
- Until this is solved by Nuitka, we raise an error message that
informs the user that deployment on macOS is not possible when
QtSql is used.
- Corresponding Nuitka issue:
https://github.com/Nuitka/Nuitka/issues/3079
Pick-to: 6.7
Task-number: PYSIDE-2835
Change-Id: I35d580ec8bcb9d1d1a4472cc01caee88deb5468e
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
| |
Add a future statement to all Python source files.
Task-number: PYSIDE-2786
Change-Id: Icd6688c7795a9e16fdcaa829686d57792df27690
Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- `--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 <qt_ci_bot@qt-project.org>
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>
|
|
|
|
|
|
|
|
|
|
| |
- breaks source compatibility otherwise
Task-number: PYSIDE-1612
Pick-to: 6.5
Change-Id: Ie0fd353872b7a93c94b650b09aa0fa53692e2455
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- moving code into functions so that Android can re-use them
- new file "deploy_util.py" to store all the common utility functions
that can be reused for Android deployment tool
- new option "--name" to set the application name
- Change some print statements to log statements
- Adapt depoyment tests
- In default.spec, rename "packages" to "desktop_packages"
- Fix relative Qml file error in config.py i.e. it errors when the
path is already relative
Task-number: PYSIDE-1612
Pick-to: 6.5
Change-Id: Iaaea8837cc362b3cc8035b96247194c4a9679579
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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 <adrian.herrmann@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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 <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
| |
- 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 <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
- 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 <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
- This enables better testing of the tool, without requiring to
to use the subprocess module
- This also enables to mock functions and classes involved
Pick-to: 6.4
Task-number: PYSIDE-1612
Change-Id: Ic2fb387e3f49c770f5ade05279ed1639e473d64b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Before this patch one could run pyside6-deploy on a non-project
directory, which would eventually fail because there is no main
python file or a config file
- This patch adds an error message when neither the config file nor
the main python file is given (or found, incase the file is named
main.py) with the pyside6-deploy command
Pick-to: 6.4
Change-Id: I5e44efecfcdf50f48b5393fbbbd0e1fb721c0409
Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Move code sections from deploy.py into config.py
- Add check to find .pyproject file and use the files within it to
identify project files eg: QML files, Python files
- Remove redundant colon in the log messages
Pick-to: 6.4
Task-number: PYSIDE-1612
Change-Id: Id92b6caa15da446196196192d117de00518e5cb9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
| |
- As deploy.py was getting bigger, each class is split into
respective modules inside psyide-tools/deploy/
Pick-to: 6.4.0
Task-number: PYSIDE-1912
Change-Id: I465a25773343cb842cbfd603941476ed6d575321
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- One step solution to deploy PySide6 applications using nuitka without
worrying about the plethora of cli options provided by nuitka, at the
same time retaining the option to specify advanced nuitka options.
- Target: Windows, Linux, Mac
- All options are specified through a config file. This makes it easier
for expansion to android deployment
- Tested for projects with QML files, ui files and rc files
Task-number: PYSIDE-1612
Change-Id: Iefbdb55fa1c999295fac2a86b1f6d9b9ec45a0b1
Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
|
| |
|
|
|