diff options
author | Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> | 2024-02-02 10:04:46 +0100 |
---|---|---|
committer | Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> | 2024-03-11 10:56:24 +0100 |
commit | 45d03020d756d302dca19e62288dde1bcd3526d1 (patch) | |
tree | 415fab112ba4005a439cf6cf231269ab01ff406d /sources/pyside-tools/deploy.py | |
parent | dec0ac7a94c787d100d1ca3f9298b7c3b07712aa (diff) |
Deployment: add permission support and create macOS bundle application
- 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>
Diffstat (limited to 'sources/pyside-tools/deploy.py')
-rw-r--r-- | sources/pyside-tools/deploy.py | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/sources/pyside-tools/deploy.py b/sources/pyside-tools/deploy.py index b54943ddf..aa03d13d0 100644 --- a/sources/pyside-tools/deploy.py +++ b/sources/pyside-tools/deploy.py @@ -39,6 +39,17 @@ from deploy_lib import (MAJOR_VERSION, DesktopConfig, cleanup, config_option_exi HELP_EXTRA_MODULES, HELP_EXTRA_IGNORE_DIRS) +TOOL_DESCRIPTION = dedent(f""" + This tool deploys PySide{MAJOR_VERSION} to desktop (Windows, Linux, + macOS) platforms. The following types of executables are produced as per + the platform: + + Windows = .exe + macOS = .app + Linux = .bin + """) + + def main(main_file: Path = None, name: str = None, config_file: Path = None, init: bool = False, loglevel=logging.WARNING, dry_run: bool = False, keep_deployment_files: bool = False, force: bool = False, extra_ignore_dirs: str = None, extra_modules_grouped: str = None): @@ -123,7 +134,8 @@ def main(main_file: Path = None, name: str = None, config_file: Path = None, ini qt_plugins=config.qt_plugins, excluded_qml_plugins=config.excluded_qml_plugins, icon=config.icon, - dry_run=dry_run) + dry_run=dry_run, + permissions=config.permissions) except Exception: print(f"[DEPLOY] Exception occurred: {traceback.format_exc()}") finally: @@ -137,11 +149,7 @@ def main(main_file: Path = None, name: str = None, config_file: Path = None, ini if __name__ == "__main__": - parser = argparse.ArgumentParser( - description=(f"This tool deploys PySide{MAJOR_VERSION} to desktop (Windows, Linux, macOS)" - "platforms"), - formatter_class=argparse.RawTextHelpFormatter, - ) + parser = argparse.ArgumentParser(description=TOOL_DESCRIPTION) parser.add_argument("-c", "--config-file", type=lambda p: Path(p).absolute(), default=(Path.cwd() / "pysidedeploy.spec"), |