diff --git a/cmake_support/CopyDependencies.cmake b/cmake_support/CopyDependencies.cmake index 97c2c2d4eba4586669ddefa04d37253a7b265b8e..a392ea5d26de23f9096543e60cb10643348f2e1a 100644 --- a/cmake_support/CopyDependencies.cmake +++ b/cmake_support/CopyDependencies.cmake @@ -991,13 +991,14 @@ function(copy_python include_path version new_binary_path) endforeach() else() file(COPY ${python_root_dir}/${LIB_DIR}/python${version}/ DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIB_DIR}/python${version} PATTERN "*.pyc" EXCLUDE) + if("${LIB_DIR}" MATCHES "lib64") + # for 64 bit systems we have to copy the python dir within lib in addition as norarch site packages might get installed there + file(COPY ${python_root_dir}/lib/python${version}/ DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/python${version} PATTERN "*.pyc" EXCLUDE) + endif("${LIB_DIR}" MATCHES "lib64") endif() file(GLOB py_config_files "${include_path}/pyconfig*.h") file(COPY ${py_config_files} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/python${version}) file(GLOB_RECURSE python_so_files "${CMAKE_INSTALL_PREFIX}/${LIB_DIR}/python${version}/*.so") - foreach(so_file ${python_so_files}) - file(RPATH_REMOVE FILE "${so_file}") - endforeach(so_file) read_config(ost_config) if (_UBUNTU_LAYOUT) file(GLOB python_libs "${python_root_dir}/${LIB_DIR}/python${version}/config-${UBUNTU_ARCH_STRING}-linux-gnu/libpython${version}.so.*" FOLLOW_SYMLINKS) @@ -1008,6 +1009,9 @@ function(copy_python include_path version new_binary_path) file(COPY ${python_root_dir}/bin/python${version} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) set(${new_binary_path} "${CMAKE_INSTALL_PREFIX}/bin/python${version}" PARENT_SCOPE) string(REGEX REPLACE "pyexec=\"[^\n\$]*\"" "pyexec=\"\$DNG_BINDIR/python${version}\"\nexport PYTHONHOME=\$DNG_ROOT" ost_config "${ost_config}") + foreach(so_file ${python_so_files}) + file(RPATH_REMOVE FILE "${so_file}") + endforeach(so_file) write_config("${ost_config}") endfunction(copy_python)