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 +++++ sources/pyside2/PySide2/_built_modules.py.in | 3 +++ 2 files changed, 8 insertions(+) create mode 100644 sources/pyside2/PySide2/_built_modules.py.in (limited to 'sources') 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 diff --git a/sources/pyside2/PySide2/_built_modules.py.in b/sources/pyside2/PySide2/_built_modules.py.in new file mode 100644 index 000000000..4e491d081 --- /dev/null +++ b/sources/pyside2/PySide2/_built_modules.py.in @@ -0,0 +1,3 @@ +built_modules = list(name for name in + "@all_module_shortnames@" + .split(";")) -- cgit v1.2.3