Details
Description
after commit 5d5eed53e49f4aaea85ce1638dd6fa3774a960e0 (PYSIDE-584)
pyside tries to overwrite shiboken typesystem (xml) files in CMAKE_INSTALL_PREFIX instead of installing them:
- install(FILES $\{typesystem_files} DESTINATION share/PySide2$\{pyside2_SUFFIX}/typesystems) + +# Copy typesystem files and remove module names from the <load-typesystem> element +# so that it works in a flat directory: +# <load-typesystem name="QtWidgets/typesystem_widgets.xml" ... -> +# <load-typesystem name="typesystem_widgets.xml" + foreach(typesystem_file $\{typesystem_files}) + get_filename_component(typesystem_file_name "$\{typesystem_file}" NAME) + file(READ "$\{typesystem_file}" typesystemXml) + string(REGEX REPLACE "<load-typesystem name=\"[^/\"]+/" "<load-typesystem name=\"" typesystemXml "$\{typesystemXml}") + set(typesystem_target_file "$\{CMAKE_INSTALL_PREFIX}/share/PySide2$\{pyside2_SUFFIX}/typesystems/$\{typesystem_file_name}") + file(WRITE "$\{typesystem_target_file}" "$\{typesystemXml}") + endforeach()
This causes a file permission error when shiboken is installed in /usr as a system package and we're trying to build pyside as user:
CMake Error at cmake/Macros/PySideModules.cmake:134 (file):
file failed to open for writing (Permission denied):
/usr/share/PySide2/typesystems/typesystem_core_common.xml
Call Stack (most recent call first):
PySide2/QtCore/CMakeLists.txt:179 (create_pyside_module)