Add rpath of python installation with install_name_tool.
@@ -229,6 +229,7 @@ jobs:
find . -name "*$(python -c "import platform; print(''.join(platform.python_version_tuple()[0:2]))")*linux*.whl" -exec python -m pip install {} \;
elif [ "$RUNNER_OS" == "macOS" ]; then
find . -name "*$(python -c "import platform; print(''.join(platform.python_version_tuple()[0:2]))")*macosx*.whl" -exec python -m pip install {} \;
+ find $(python -c "import site; print(site.getsitepackages()[0])") -name '*tinysplinepython*' -exec install_name_tool -add_rpath $(dirname $(dirname $(python -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())"))) {} \;
elif [ "$RUNNER_OS" == "Windows" ]; then
find . -name "*$(python -c "import platform; print(''.join(platform.python_version_tuple()[0:2]))")*win*.whl" -exec python -m pip install {} \;
fi
