Skip to content
Snippets Groups Projects
Commit 7aa19107 authored by Andreas Schenk's avatar Andreas Schenk
Browse files

extended CopyDependencies script to better handle 64bit python installations

parent d7ca1e32
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment