From 6c6991732355184698abeb12994149fe8b16727e Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Wed, 21 Feb 2018 18:15:10 +0100 Subject: Don't copy duplicate libraries on package installation This change makes sure to resolve symlinks and copy only one file for every dynamic shared library used (vs 3 before -> 2 symlinks + 1 actual library). This avoids duplicate files, as well as saves space when creating wheel (e.g. no 3 copies of standalone WebEngine library). This filtering happens copying from CMake install dir into pyside_package_dir (the symlinks are still present in the CMake dir, but that shouldn't harm anybody, and might be useful for users of shiboken only for example). Task-number: PYSIDE-495 Change-Id: I0fe454e16c6b254a8682aa7b1c702ec01a3064f0 Reviewed-by: Friedemann Kleint --- sources/pyside2/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'sources/pyside2/CMakeLists.txt') diff --git a/sources/pyside2/CMakeLists.txt b/sources/pyside2/CMakeLists.txt index d7d17f27d..08ed52473 100644 --- a/sources/pyside2/CMakeLists.txt +++ b/sources/pyside2/CMakeLists.txt @@ -166,6 +166,7 @@ set(BINDING_API_MICRO_VERSION "0") set(BINDING_API_RELEASE_LEVEL "alpha") # alpha, beta, rc, or final set(BINDING_API_SERIAL 0) # leave as 0 when release level is final set(BINDING_API_VERSION "${BINDING_API_MAJOR_VERSION}.${BINDING_API_MINOR_VERSION}.${BINDING_API_MICRO_VERSION}" CACHE STRING "PySide version" FORCE) +set(PYSIDE_SO_VERSION ${BINDING_API_MAJOR_VERSION}.${BINDING_API_MINOR_VERSION}) if (BINDING_API_RELEASE_LEVEL STREQUAL "final") set(BINDING_API_VERSION_FULL "${BINDING_API_MAJOR_VERSION}.${BINDING_API_MINOR_VERSION}.${BINDING_API_MICRO_VERSION}" CACHE STRING "PySide version [full]" FORCE) @@ -220,6 +221,11 @@ if(GIT_FOUND) endif() endif() +# Used by setup.py to know which symlink to resolve and copy in to the final package, in order to +# avoid resolving all symlinks and thus copying unnecessary duplicate files. +set(config_py_shiboken_library_version "") +set(config_py_pyside_library_version "") + include(PySideModules) macro(COLLECT_MODULE_IF_FOUND shortname) -- cgit v1.2.3