From 57b7a13a34fccceec77ce1f555a13754d05b1e23 Mon Sep 17 00:00:00 2001 From: Shyamnath Premnadh Date: Mon, 19 Aug 2024 15:31:11 +0200 Subject: Deployment: Error message with QtSql - 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 Reviewed-by: Christian Tismer --- sources/pyside-tools/deploy.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'sources/pyside-tools/deploy.py') diff --git a/sources/pyside-tools/deploy.py b/sources/pyside-tools/deploy.py index a9d2b9d67..c93d90584 100644 --- a/sources/pyside-tools/deploy.py +++ b/sources/pyside-tools/deploy.py @@ -29,6 +29,7 @@ from __future__ import annotations """ +import sys import argparse import logging import traceback @@ -133,6 +134,15 @@ def main(main_file: Path = None, name: str = None, config_file: Path = None, ini logging.info(f"[DEPLOY]: Config file {config.config_file} created") return + # If modules contain QtSql and the platform is macOS, then pyside6-deploy will not work + # currently. The fix ideally will have to come from Nuitka. + # See PYSIDE-2835 + # TODO: Remove this check once the issue is fixed in Nuitka + # Nuitka Issue: https://github.com/Nuitka/Nuitka/issues/3079 + if "Sql" in config.modules and sys.platform == "darwin": + print("[DEPLOY] QtSql Application is not supported on macOS with pyside6-deploy") + return + try: # create executable if not dry_run: -- cgit v1.2.3