From 88af089cb0419e1f1a27dc77e11f5513f9ddd8d0 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 3 Jun 2020 13:59:14 +0200 Subject: Potential fix for deploying with cx_freeze using zip_include_packages In __init.py__, check for a zip archive and do not add DLL paths relative to it. Amends d9cfec8e010b48036e5e879ccc99879538a4f7d2. Change-Id: I18320bd6a8f784f20287c4a5ed65e9229989031c Fixes: PYSIDE-1257 Reviewed-by: Cristian Maureira-Fredes --- sources/pyside2/PySide2/__init__.py.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sources/pyside2/PySide2/__init__.py.in b/sources/pyside2/PySide2/__init__.py.in index 8013ac68a..f860c6ac9 100644 --- a/sources/pyside2/PySide2/__init__.py.in +++ b/sources/pyside2/PySide2/__init__.py.in @@ -12,6 +12,9 @@ __version_info__ = (@BINDING_API_MAJOR_VERSION@, @BINDING_API_MINOR_VERSION@, @B def _additional_dll_directories(package_dir): # Find shiboken2 relative to the package directory. root = os.path.dirname(package_dir) + # Check for a flat .zip as deployed by cx_free(PYSIDE-1257) + if root.endswith('.zip'): + return [] shiboken2 = os.path.join(root, 'shiboken2') if os.path.isdir(shiboken2): # Standard case, only shiboken2 is needed return [shiboken2] -- cgit v1.2.3