This line here calls python3 -m compileall <my_package_install_dir> but this is usually inside a system folder and is installed using root.
This causes permission errors during packaging. The compileall should only happen if the install target is called, because the install command is usually executed like
sudo cmake --install <build_dir>
because it needs root permissions anyway to do the install. But packaging should be able to happen without needing to write to any root-owned folders, which is what the compileall module is trying to do.
|
\"${CMAKE_INSTALL_PREFIX}/${ARG_DESTINATION}/${package_name}\" |