From b825eec459a3d5dcddf14061d578ef89e6ad5ee4 Mon Sep 17 00:00:00 2001 From: Christian Tismer Date: Thu, 19 Oct 2017 11:27:13 +0200 Subject: Update and complete the signature module There is now an external typing module for Python 2.7 and Python 3.6 from Guido (PSF license again) that makes the differences between both versions vanish. Also, when generating interface files, some types did not show correctly, and the constant "0" is wrong in almost all cases. Values in signatures looked often bad since they have no nice __repr__, and it was almost impossible to create correct .pyi files. Now, these instances are created as wrapped string types with a nice __repr__. A call of these objects creates the real constant. This way, also objects can be rendered which are dependent from the existence of other objects (i.E. QPixMap). This patch improves the usability of the signature module. We can now generate source code or .pyi files without modifications. Task-number: PYSIDE-510 Change-Id: I55490d76a29fc6c0e4f821c0c77d5e5d1e28976e Reviewed-by: Friedemann Kleint --- sources/pyside2/PySide2/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sources/pyside2/PySide2/CMakeLists.txt') diff --git a/sources/pyside2/PySide2/CMakeLists.txt b/sources/pyside2/PySide2/CMakeLists.txt index 601c43ed6..53c4216fa 100644 --- a/sources/pyside2/PySide2/CMakeLists.txt +++ b/sources/pyside2/PySide2/CMakeLists.txt @@ -23,11 +23,13 @@ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/support/signature/parser.py" if (PYTHON_VERSION_MAJOR EQUAL 3) configure_file("${CMAKE_CURRENT_SOURCE_DIR}/support/signature/inspect.py" "${CMAKE_CURRENT_BINARY_DIR}/support/signature/inspect.py" COPYONLY) - configure_file("${CMAKE_CURRENT_SOURCE_DIR}/support/signature/typing.py" + configure_file("${CMAKE_CURRENT_SOURCE_DIR}/support/signature/typing36.py" "${CMAKE_CURRENT_BINARY_DIR}/support/signature/typing.py" COPYONLY) else() configure_file("${CMAKE_CURRENT_SOURCE_DIR}/support/signature/backport_inspect.py" "${CMAKE_CURRENT_BINARY_DIR}/support/signature/backport_inspect.py" COPYONLY) + configure_file("${CMAKE_CURRENT_SOURCE_DIR}/support/signature/typing27.py" + "${CMAKE_CURRENT_BINARY_DIR}/support/signature/typing.py" COPYONLY) endif() # Add the collected includes to the global include -- cgit v1.2.3 From 8815ef1cfddd79b99314a8e8e351b1a2235afc26 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Thu, 2 Nov 2017 11:50:25 +0100 Subject: Make standalone option work on macOS Implements standalone option on macOS, both for .dylib Qt build and framework build. Multiple rules are applied to figure out which files need to be copied into the final package. We also take care to embed a proper LC_RPATH for the PySide libraries, so that they point to the copied over Qt libraries. Change-Id: I442749e7c2318a66a22e3a1dd0ae703fb8943acf Task-number: PYSIDE-558 Reviewed-by: Friedemann Kleint Reviewed-by: Christian Tismer --- sources/pyside2/PySide2/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sources/pyside2/PySide2/CMakeLists.txt') diff --git a/sources/pyside2/PySide2/CMakeLists.txt b/sources/pyside2/PySide2/CMakeLists.txt index 53c4216fa..2a8cf15ee 100644 --- a/sources/pyside2/PySide2/CMakeLists.txt +++ b/sources/pyside2/PySide2/CMakeLists.txt @@ -7,6 +7,9 @@ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/global.h.in" configure_file("${CMAKE_CURRENT_SOURCE_DIR}/__init__.py.in" "${CMAKE_CURRENT_BINARY_DIR}/__init__.py" @ONLY) +configure_file("${CMAKE_CURRENT_SOURCE_DIR}/_built_modules.py.in" + "${CMAKE_CURRENT_BINARY_DIR}/_built_modules.py" @ONLY) + configure_file("${CMAKE_CURRENT_SOURCE_DIR}/_utils.py.in" "${CMAKE_CURRENT_BINARY_DIR}/_utils.py" @ONLY) @@ -46,6 +49,8 @@ endforeach() # install install(FILES "${CMAKE_CURRENT_BINARY_DIR}/__init__.py" DESTINATION "${PYTHON_SITE_PACKAGES}/${BINDING_NAME}${pyside2_SUFFIX}") +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/_built_modules.py" + DESTINATION "${PYTHON_SITE_PACKAGES}/${BINDING_NAME}${pyside2_SUFFIX}") install(FILES ${CMAKE_CURRENT_BINARY_DIR}/_utils.py DESTINATION "${PYTHON_SITE_PACKAGES}/${BINDING_NAME}${pyside2_SUFFIX}") install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/typesystem_templates.xml -- cgit v1.2.3