From a2fb6b15a9542e2e6bfeaf3104f0c9e2dd77d00d Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Fri, 28 Apr 2017 15:42:43 +0200 Subject: Fix CMake bug where incorrect CMAKE_OSX_SYSROOT was chosen Apparently in earlier versions of CMake, if the OS version found in CMAKE_OSX_DEPLOYMENT_TARGET did not have a corresponding SDK with the same version in XCode, the CMake build would fail. Make sure to use the latest SDK available to XCode. Change-Id: Ie2317c1d285377b0cd5c7a75c94628b03aef557e Reviewed-by: Qt CI Bot Reviewed-by: Christian Tismer --- setup.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/setup.py b/setup.py index 885ab9865..da11ad0ca 100644 --- a/setup.py +++ b/setup.py @@ -825,6 +825,12 @@ class pyside_build(_build): if OPTION_OSX_SYSROOT: cmake_cmd.append("-DCMAKE_OSX_SYSROOT={}".format(OPTION_OSX_SYSROOT)) + else: + latest_sdk_path = run_process_output(['xcrun', '--show-sdk-path']) + if latest_sdk_path: + latest_sdk_path = latest_sdk_path[0] + cmake_cmd.append("-DCMAKE_OSX_SYSROOT={}".format(latest_sdk_path)) + if not OPTION_SKIP_CMAKE: log.info("Configuring module %s (%s)..." % (extension, module_src_dir)) -- cgit v1.2.3 From ef581e9e6687ff9b7ecab312d40cab41c0a0e792 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Wed, 3 May 2017 09:52:31 +0200 Subject: Fix syntax error for format method on Python 2.6 Change-Id: I5f2ecb29ca904b6b5a011f461debda62f38dbdc2 Reviewed-by: Christian Tismer --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index da11ad0ca..89b2c74fc 100644 --- a/setup.py +++ b/setup.py @@ -824,12 +824,12 @@ class pyside_build(_build): cmake_cmd.append("-DOSX_USE_LIBCPP=ON") if OPTION_OSX_SYSROOT: - cmake_cmd.append("-DCMAKE_OSX_SYSROOT={}".format(OPTION_OSX_SYSROOT)) + cmake_cmd.append("-DCMAKE_OSX_SYSROOT={0}".format(OPTION_OSX_SYSROOT)) else: latest_sdk_path = run_process_output(['xcrun', '--show-sdk-path']) if latest_sdk_path: latest_sdk_path = latest_sdk_path[0] - cmake_cmd.append("-DCMAKE_OSX_SYSROOT={}".format(latest_sdk_path)) + cmake_cmd.append("-DCMAKE_OSX_SYSROOT={0}".format(latest_sdk_path)) if not OPTION_SKIP_CMAKE: -- cgit v1.2.3 From 8db4d8ef585e5e3b41bf68ab76bfe9f936606da5 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Wed, 3 May 2017 09:51:47 +0200 Subject: Fix Python libraries to be found on OpenSuSE 13.01 Change-Id: I8bc9f18e5e85ff22ab4e6f24d9bf0917730b7a23 Reviewed-by: Christian Tismer --- setup.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setup.py b/setup.py index 89b2c74fc..fdaec4a50 100644 --- a/setup.py +++ b/setup.py @@ -574,6 +574,8 @@ class pyside_build(_build): else: # Python 2 lib_suff = '' lib_exts.append('.so.1') + # Suffix for OpenSuSE 13.01 + lib_exts.append('.so.1.0') lib_exts.append('.a') # static library as last gasp if sys.version_info[0] == 2 and dbgPostfix: -- cgit v1.2.3 From c192b9fdbd19e3538924aa6e25e95298f937d445 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Wed, 3 May 2017 09:53:16 +0200 Subject: Fix Python libraries to be found for macOS Python 2.6 interpreter Change-Id: I0dbd65a23bde599f923811c74d0565f329116c93 Reviewed-by: Christian Tismer --- setup.py | 58 ++++++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 40 insertions(+), 18 deletions(-) diff --git a/setup.py b/setup.py index fdaec4a50..070929ffc 100644 --- a/setup.py +++ b/setup.py @@ -585,33 +585,55 @@ class pyside_build(_build): # be built with a non-debug Python. lib_exts = [dbgPostfix + e for e in lib_exts] + lib_exts + python_library_found = False libs_tried = [] for lib_ext in lib_exts: lib_name = "libpython%s%s%s" % (py_version, lib_suff, lib_ext) py_library = os.path.join(py_libdir, lib_name) if os.path.exists(py_library): + python_library_found = True break libs_tried.append(py_library) else: - py_multiarch = get_config_var("MULTIARCH") - if py_multiarch: - try_py_libdir = os.path.join(py_libdir, py_multiarch) - libs_tried = [] - for lib_ext in lib_exts: - lib_name = "libpython%s%s%s" % (py_version, lib_suff, lib_ext) - py_library = os.path.join(try_py_libdir, lib_name) - if os.path.exists(py_library): - py_libdir = try_py_libdir - break - libs_tried.append(py_library) + # At least on macOS 10.11, the system Python 2.6 does not include a symlink + # to the framework file disguised as a .dylib file, thus finding the library would + # fail. Manually check if a framework file "Python" exists in the Python framework + # bundle. + if sys.platform == 'darwin' and sys.version_info[:2] == (2, 6): + # These manipulations essentially transform + # /System/Library/Frameworks/Python.framework/Versions/2.6/lib + # to /System/Library/Frameworks/Python.framework/Versions/2.6/Python + possible_framework_path = os.path.realpath(os.path.join(py_libdir, '..')) + possible_framework_version = os.path.basename(possible_framework_path) + possible_framework_library = os.path.join(possible_framework_path, 'Python') + + if possible_framework_version == '2.6' \ + and os.path.exists(possible_framework_library): + py_library = possible_framework_library + python_library_found = True else: - raise DistutilsSetupError( - "Failed to locate the Python library with %s" % - ', '.join(libs_tried)) - else: - raise DistutilsSetupError( - "Failed to locate the Python library with %s" % - ', '.join(libs_tried)) + libs_tried.append(possible_framework_library) + + # Try to find shared libraries which have a multi arch suffix. + if not python_library_found: + py_multiarch = get_config_var("MULTIARCH") + if py_multiarch and not python_library_found: + try_py_libdir = os.path.join(py_libdir, py_multiarch) + libs_tried = [] + for lib_ext in lib_exts: + lib_name = "libpython%s%s%s" % (py_version, lib_suff, lib_ext) + py_library = os.path.join(try_py_libdir, lib_name) + if os.path.exists(py_library): + py_libdir = try_py_libdir + python_library_found = True + break + libs_tried.append(py_library) + + if not python_library_found: + raise DistutilsSetupError( + "Failed to locate the Python library with %s" % + ', '.join(libs_tried)) + if py_library.endswith('.a'): # Python was compiled as a static library log.error("Failed to locate a dynamic Python library, using %s" -- cgit v1.2.3 From 48f179d684d97445c3b6c1426d81915e15049aed Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 17 May 2017 09:47:12 +0200 Subject: Blacklist QML bug_951 and javascript_exceptions for Python3 bug_951 was enabled by 424652bf651ea2a5179e18e918ad6f63eb33fc81, but seems to failing with Python3. Task-number: PYSIDE-431 Change-Id: I38386810e469275e73f26448b71dd7cc68e586b5 Reviewed-by: Christian Tismer --- build_history/blacklist.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build_history/blacklist.txt b/build_history/blacklist.txt index af7a93729..4099cc094 100644 --- a/build_history/blacklist.txt +++ b/build_history/blacklist.txt @@ -43,6 +43,10 @@ linux darwin win32 +[QtQml::bug_951] + py3 +[QtQml::javascript_exceptions] + py3 [QtScript::qscriptvalue_test] linux darwin -- cgit v1.2.3