From 002b0d6da1c717d54a5a3a0967e41bc7c6213e3e Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Thu, 8 Feb 2018 19:27:24 +0100 Subject: Fix typo in libicu detection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When libicu libraries are present in the qt lib dir, this caused trying to copy the files into the same folder where they are located which will obviously fail. Change-Id: Ibcabec2e44dac70e0c3c56e52ff0c8ac7749dbc0 Reviewed-by: Fredrik Averpil Reviewed-by: Simo Fält --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'setup.py') diff --git a/setup.py b/setup.py index 673c11e81..81e026c6a 100644 --- a/setup.py +++ b/setup.py @@ -1193,7 +1193,7 @@ class pyside_build(_build): # Check if ICU libraries were copied over to the destination Qt libdir. resolved_destination_lib_dir = destination_lib_dir.format(**vars) - maybe_icu_libs = find_files_using_glob(resolved_destination_lib_dir, "libcu*") + maybe_icu_libs = find_files_using_glob(resolved_destination_lib_dir, "libicu*") # If no ICU libraries are present in the Qt libdir (like when Qt is built against system # ICU, or in the Coin CI where ICU libs are in a different directory) try to -- cgit v1.2.3 From 3ee37ddd84a40e543f30b4a33efc728b9979f709 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Tue, 13 Feb 2018 17:21:32 +0100 Subject: Fix MACOSX_DEPLOYMENT_TARGET being set by distutils.spawn() Even though a user might specify a CMAKE_OSX_DEPLOYMENT_TARGET value, this will not automatically set the regular MACOSX_DEPLOYMENT_TARGET environment variable, which is picked up by the compiler to decide which standard library to use. Because CMake is invoked via run_process -> distutils.spawn(), spawn might decide to set its own value of MACOSX_DEPLOYMENT_TARGET. That is undesirable. Make sure to always specify the environment variable based on given value, or current OS version. (cherry picked from commit 6945dfb657a17fd66fd547e086c6fa9c76f06074) Change-Id: I7f2dcc546c447d30fc1585cda220e3437cee9491 Reviewed-by: Friedemann Kleint --- setup.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'setup.py') diff --git a/setup.py b/setup.py index 81e026c6a..3bb9699b6 100644 --- a/setup.py +++ b/setup.py @@ -977,9 +977,20 @@ class pyside_build(_build): latest_sdk_path = latest_sdk_path[0] cmake_cmd.append("-DCMAKE_OSX_SYSROOT={0}".format(latest_sdk_path)) + # If no explicit minimum deployment target is set, then use the current build OS + # version. Otherwise use the given version. + # This is required so that calling run_process -> distutils.spawn() does not + # set its own minimum deployment target environment variable, + # based on the python interpreter sysconfig value. Doing so could break the + # detected clang include paths for example. + current_os_version, _, _ = platform.mac_ver() + current_os_version = '.'.join(current_os_version.split('.')[:2]) + deployment_target = current_os_version if OPTION_OSX_DEPLOYMENT_TARGET: cmake_cmd.append("-DCMAKE_OSX_DEPLOYMENT_TARGET={0}" .format(OPTION_OSX_DEPLOYMENT_TARGET)) + deployment_target = OPTION_OSX_DEPLOYMENT_TARGET + os.environ['MACOSX_DEPLOYMENT_TARGET'] = deployment_target if not OPTION_SKIP_CMAKE: log.info("Configuring module %s (%s)..." % (extension, module_src_dir)) -- cgit v1.2.3 From ea66a78ea73f677a9025e1482e658409cecd7e2a Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Fri, 2 Feb 2018 19:03:23 +0100 Subject: Fix rpath of QtWebEngineProcess in standalone macOS framework build The rpath already present assumes the presence of some symlinks, which are not present when copying over the Qt frameworks. Thus the rpath needs adjustment. Task-number: PYSIDE-605 Change-Id: I2fec6f53c8b617a6e755718e9174cadd2c485b5e Reviewed-by: Cristian Maureira-Fredes Reviewed-by: Friedemann Kleint --- setup.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'setup.py') diff --git a/setup.py b/setup.py index 3bb9699b6..5918e2464 100644 --- a/setup.py +++ b/setup.py @@ -1277,6 +1277,18 @@ class pyside_build(_build): recursive=True, vars=vars, ignore=["*.la", "*.a", "*.cmake", "*.pc", "*.prl"], dir_filter_function=framework_dir_filter) + + # Fix rpath for WebEngine process executable. The already present rpath does not work + # because it assumes a symlink from Versions/5/Helpers, thus adding two more levels of + # directory hierarchy. + if 'QtWebEngineWidgets.framework' in framework_built_modules: + qt_lib_path = "{pyside_package_dir}/PySide2/Qt/lib".format(**vars) + bundle = "QtWebEngineCore.framework/Helpers/QtWebEngineProcess.app" + binary = "Contents/MacOS/QtWebEngineProcess" + webengine_process_path = os.path.join(bundle, binary) + final_path = os.path.join(qt_lib_path, webengine_process_path) + rpath = "@loader_path/../../../../../" + osx_fix_rpaths_for_library(final_path, rpath) else: ignored_modules = [] if 'WebEngineWidgets' not in built_modules: -- cgit v1.2.3