diff options
| author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-06-16 09:43:28 +0200 |
|---|---|---|
| committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-06-16 13:10:43 +0200 |
| commit | e284e630bf57338a1f02323a2f8c3d126a4c5769 (patch) | |
| tree | 9b8b4ff957a22808b8bab04e6c6d4b1fb650e410 /build_scripts/platforms/macos.py | |
| parent | cd1022b1216dbf67bb553b7fc65106d91e95643d (diff) | |
build scripts: Extract helper functions to patch executables
Prepare for adding more binaries.
Task-number: PYSIDE-1378
Change-Id: I1e3a39db28da19fe9a307145d599d7448428652d
Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'build_scripts/platforms/macos.py')
| -rw-r--r-- | build_scripts/platforms/macos.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/build_scripts/platforms/macos.py b/build_scripts/platforms/macos.py index b1e0911f3..6db0ef2b7 100644 --- a/build_scripts/platforms/macos.py +++ b/build_scripts/platforms/macos.py @@ -44,6 +44,15 @@ from ..config import config from ..versions import PYSIDE +def _macos_patch_executable(name, vars=None): + """ Patch an executable to run with the Qt libraries. """ + upper_name = name[0:1].upper() + name[1:] + bundle = f"{{st_build_dir}}/{{st_package_name}}/{upper_name}.app".format(**vars) + binary = f"{bundle}/Contents/MacOS/{upper_name}" + rpath = "@loader_path/../../../Qt/lib" + macos_add_rpath(rpath, binary) + + def prepare_standalone_package_macos(self, vars): built_modules = vars['built_modules'] @@ -80,10 +89,7 @@ def prepare_standalone_package_macos(self, vars): # Patching designer to use the Qt libraries provided in the wheel if config.is_internal_pyside_build(): - designer_bundle = "{st_build_dir}/{st_package_name}/Designer.app".format(**vars) - designer_binary = f"{designer_bundle}/Contents/MacOS/Designer" - rpath = "@loader_path/../../../Qt/lib" - macos_add_rpath(rpath, designer_binary) + _macos_patch_executable('designer', vars) # <qt>/lib/* -> <setup>/{st_package_name}/Qt/lib if self.qt_is_framework_build(): |
