aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2017-08-25 12:54:33 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2017-08-28 11:37:11 +0200
commit2b134d46c21c86dd1cf66ba5e9c961714d73b3b3 (patch)
treed4908ae8d78a228ad161e1237a1b0b5d3c5d98af
parent84597fa46a6c0134cef514f749c3f072bfe6fe14 (diff)
parent117e0ff91275b4bc06dd5383f19e7028c5ef6ff8 (diff)
Merge remote-tracking branch 'origin/5.6' into 5.9
-rw-r--r--build_history/blacklist.txt2
-rw-r--r--setup.py13
-rw-r--r--sources/pyside2/CMakeLists.txt29
-rw-r--r--sources/pyside2/PySide2/CMakeLists.txt4
-rw-r--r--sources/pyside2/cmake/Macros/PySideModules.cmake2
-rw-r--r--sources/pyside2/libpyside/PySide2Config-spec.cmake.in2
-rw-r--r--sources/pyside2/libpyside/pyside2.pc.in2
7 files changed, 21 insertions, 33 deletions
diff --git a/build_history/blacklist.txt b/build_history/blacklist.txt
index bf3cc6d8..ddb1ad14 100644
--- a/build_history/blacklist.txt
+++ b/build_history/blacklist.txt
@@ -62,6 +62,8 @@
# Crashes with Python 2 on Windows
[QtQml::qqmlnetwork_test]
py2 win32
+[QtQml::qquickitem_grabToImage]
+ darwin
[smart::smart_pointer]
win32
# PYSIDE-474
diff --git a/setup.py b/setup.py
index 8a428dff..5542e813 100644
--- a/setup.py
+++ b/setup.py
@@ -820,7 +820,6 @@ class pyside_build(_build):
cmake_cmd = [
OPTION_CMAKE,
"-G", self.make_generator,
- "-DQT_QMAKE_EXECUTABLE='%s'" % self.qtinfo.qmake_command,
"-DBUILD_TESTS=%s" % self.build_tests,
"-DQt5Help_DIR=%s" % self.qtinfo.docs_dir,
"-DCMAKE_BUILD_TYPE=%s" % self.build_type,
@@ -842,18 +841,6 @@ class pyside_build(_build):
cmake_cmd.append("-DUSE_PYTHON_VERSION=3.3")
if sys.platform == 'darwin':
- # Shiboken supports specifying multiple include paths separated by a colon on *nix
- # systems.
- # In a framework build, two paths should be included:
- # path_to_qt/lib -> which contains framework folders with headers, and
- # path_to_qt/include -> which contains headers for static libraries.
- # A non-framework build contains all headers in the path_to_qt/include folder.
- path_separator = ":"
- includes_dir = '-DALTERNATIVE_QT_INCLUDE_DIR=' + self.qtinfo.headers_dir
- if os.path.isdir(self.qtinfo.headers_dir + "/../lib/QtCore.framework"):
- includes_dir += path_separator + self.qtinfo.headers_dir + "/../lib/"
- cmake_cmd.append(includes_dir)
-
if OPTION_OSXARCH:
# also tell cmake which architecture to use
cmake_cmd.append("-DCMAKE_OSX_ARCHITECTURES:STRING={}".format(OPTION_OSXARCH))
diff --git a/sources/pyside2/CMakeLists.txt b/sources/pyside2/CMakeLists.txt
index 1215e259..ac4669de 100644
--- a/sources/pyside2/CMakeLists.txt
+++ b/sources/pyside2/CMakeLists.txt
@@ -97,7 +97,7 @@ option(ENABLE_VERSION_SUFFIX "Used to use current version in suffix to generated
set(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)" )
set(LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}" CACHE PATH "The subdirectory relative to the install prefix where libraries will be installed (default is /lib${LIB_SUFFIX})" FORCE)
if(CMAKE_HOST_APPLE)
- set(ALTERNATIVE_QT_INCLUDE_DIR "" CACHE PATH "The Alternative value to QT_INCLUDE_DIR. Necessary to fix bug on cmake 2.8 MACOS users")
+ set(ALTERNATIVE_QT_INCLUDE_DIR "" CACHE PATH "Deprecated. CMake now finds the proper include dir itself.")
set(OSX_USE_LIBCPP "OFF" CACHE BOOL "Explicitly link the libc++ standard library (useful for osx deployment targets lower than 10.9.")
if(OSX_USE_LIBCPP)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
@@ -119,11 +119,12 @@ list(GET Qt5Core_INCLUDE_DIRS 0 QT_INCLUDE_DIR)
get_target_property(QtCore_is_framework Qt5::Core FRAMEWORK)
if (QtCore_is_framework)
+ # Get the path to the framework dir.
get_filename_component(QT_FRAMEWORK_INCLUDE_DIR "${QT_INCLUDE_DIR}/../" ABSOLUTE)
message(STATUS "*** QT_FRAMEWORK_INCLUDE_DIR is ${QT_FRAMEWORK_INCLUDE_DIR}")
- # QT_INCLUDE_DIR points to the QtCore.framework directory, so need to adjust this to point
- # to the actual include directory.
+ # QT_INCLUDE_DIR points to the QtCore.framework directory, so we need to adjust this to point
+ # to the actual include directory, which has include files for non-framework parts of Qt.
get_filename_component(QT_INCLUDE_DIR "${QT_INCLUDE_DIR}/../../include" ABSOLUTE)
endif()
@@ -145,18 +146,16 @@ else()
endif()
if(CMAKE_HOST_APPLE)
- if (NOT QT_INCLUDE_DIR)
- set(QT_INCLUDE_DIR "/Library/Frameworks")
- endif()
- if(NOT QT_INCLUDE_DIR AND ALTERNATIVE_QT_INCLUDE_DIR)
+ # ALTERNATIVE_QT_INCLUDE_DIR is deprecated, because CMake takes care of finding the proper
+ # include folders using the qmake found in the environment. Only use it for now in case
+ # something goes wrong with the cmake process.
+ if(ALTERNATIVE_QT_INCLUDE_DIR AND NOT QT_INCLUDE_DIR)
set(QT_INCLUDE_DIR ${ALTERNATIVE_QT_INCLUDE_DIR})
endif()
- string(REPLACE " " ":" QT_INCLUDE_DIR ${QT_INCLUDE_DIR})
endif()
endif()
message(STATUS "*** computed QT_INCLUDE_DIR as ${QT_INCLUDE_DIR}")
-
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE ${SHIBOKEN_BUILD_TYPE})
endif()
@@ -291,7 +290,8 @@ ENDIF()
COLLECT_MODULE_IF_FOUND(TextToSpeech opt)
COLLECT_MODULE_IF_FOUND(Charts opt)
COLLECT_MODULE_IF_FOUND(Svg opt)
-if(Qt5Designer_FOUND)
+find_package(Qt5UiTools)
+if(Qt5UiTools_FOUND)
COLLECT_MODULE_IF_FOUND(UiTools opt)
else()
set(DISABLE_QtUiTools 1)
@@ -373,19 +373,19 @@ add_custom_target(dist
echo "Source package created at ${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar.bz2.\n"
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
-if (NOT SITE_PACKAGE)
+if (NOT PYTHON_SITE_PACKAGES)
execute_process(
COMMAND ${SHIBOKEN_PYTHON_INTERPRETER} -c "if True:
from distutils import sysconfig
from os.path import sep
print(sysconfig.get_python_lib(1, 0, prefix='${CMAKE_INSTALL_PREFIX}').replace(sep, '/'))
"
- OUTPUT_VARIABLE SITE_PACKAGE
+ OUTPUT_VARIABLE PYTHON_SITE_PACKAGES
OUTPUT_STRIP_TRAILING_WHITESPACE)
- if (NOT SITE_PACKAGE)
+ if (NOT PYTHON_SITE_PACKAGES)
message(FATAL_ERROR "Could not detect Python module installation directory.")
elseif (APPLE)
- message(STATUS "!!! The generated bindings will be installed on ${SITE_PACKAGE}, is it right!?")
+ message(STATUS "!!! The generated bindings will be installed on ${PYTHON_SITE_PACKAGES}, is it right!?")
endif()
endif()
@@ -406,7 +406,6 @@ else()
endif()
add_subdirectory(libpyside)
-find_package(Qt5UiTools)
find_package(Qt5Designer)
if(Qt5UiTools_FOUND AND Qt5Designer_FOUND)
add_subdirectory(plugins)
diff --git a/sources/pyside2/PySide2/CMakeLists.txt b/sources/pyside2/PySide2/CMakeLists.txt
index 01d9f64c..31810b68 100644
--- a/sources/pyside2/PySide2/CMakeLists.txt
+++ b/sources/pyside2/PySide2/CMakeLists.txt
@@ -23,9 +23,9 @@ endforeach()
# install
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/__init__.py"
- DESTINATION "${SITE_PACKAGE}/${BINDING_NAME}${pyside2_SUFFIX}")
+ DESTINATION "${PYTHON_SITE_PACKAGES}/${BINDING_NAME}${pyside2_SUFFIX}")
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/_utils.py
- DESTINATION "${SITE_PACKAGE}/${BINDING_NAME}${pyside2_SUFFIX}")
+ DESTINATION "${PYTHON_SITE_PACKAGES}/${BINDING_NAME}${pyside2_SUFFIX}")
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/typesystem_templates.xml
DESTINATION share/PySide2${pyside_SUFFIX}/typesystems)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/pyside2_global.h
diff --git a/sources/pyside2/cmake/Macros/PySideModules.cmake b/sources/pyside2/cmake/Macros/PySideModules.cmake
index b5bb725f..0b0a6ab8 100644
--- a/sources/pyside2/cmake/Macros/PySideModules.cmake
+++ b/sources/pyside2/cmake/Macros/PySideModules.cmake
@@ -113,7 +113,7 @@ macro(create_pyside_module
endif()
# install
- install(TARGETS ${module_name} LIBRARY DESTINATION ${SITE_PACKAGE}/PySide2)
+ install(TARGETS ${module_name} LIBRARY DESTINATION ${PYTHON_SITE_PACKAGES}/PySide2)
string(TOLOWER ${module_name} lower_module_name)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/PySide2/${module_name}/pyside2_${lower_module_name}_python.h
DESTINATION include/PySide2${pyside2_SUFFIX}/${module_name}/)
diff --git a/sources/pyside2/libpyside/PySide2Config-spec.cmake.in b/sources/pyside2/libpyside/PySide2Config-spec.cmake.in
index 822b8e4c..4281ade5 100644
--- a/sources/pyside2/libpyside/PySide2Config-spec.cmake.in
+++ b/sources/pyside2/libpyside/PySide2Config-spec.cmake.in
@@ -14,5 +14,5 @@ elseif(WIN32)
else()
SET(PYSIDE_LIBRARY "@LIB_INSTALL_DIR@/@CMAKE_SHARED_LIBRARY_PREFIX@pyside2@pyside2_SUFFIX@@LIBRARY_OUTPUT_SUFFIX@@PYTHON_SHARED_LIBRARY_SUFFIX@@CMAKE_SHARED_LIBRARY_SUFFIX@")
endif()
-SET(PYSIDE_PYTHONPATH "@SITE_PACKAGE@")
+SET(PYSIDE_PYTHONPATH "@PYTHON_SITE_PACKAGES@")
SET(PYSIDE_TYPESYSTEMS "@CMAKE_INSTALL_PREFIX@/share/PySide2@pyside2_SUFFIX@/typesystems")
diff --git a/sources/pyside2/libpyside/pyside2.pc.in b/sources/pyside2/libpyside/pyside2.pc.in
index 4f8b5e6e..37a11598 100644
--- a/sources/pyside2/libpyside/pyside2.pc.in
+++ b/sources/pyside2/libpyside/pyside2.pc.in
@@ -3,7 +3,7 @@ exec_prefix=@CMAKE_INSTALL_PREFIX@
libdir=@LIB_INSTALL_DIR@
includedir=@CMAKE_INSTALL_PREFIX@/include/PySide2@pyside2_SUFFIX@
typesystemdir=@CMAKE_INSTALL_PREFIX@/share/PySide2@pyside2_SUFFIX@/typesystems
-pythonpath=@SITE_PACKAGE@
+pythonpath=@PYTHON_SITE_PACKAGES@
Name: PySide2@pyside2_SUFFIX@
Description: Support library for Python bindings of Qt5-based libraries.