SYSROOT=$(rustc --print sysroot)
LIBDIR=$SYSROOT/lib/rustlib/$TARGET/lib
# macOS does not have a useful readlink/realpath so we have to use Python instead...
-MIRIDIR=$(dirname "$(python -c 'import os, sys; print(os.path.realpath(sys.argv[1]))' "$0")")
+MIRIDIR=$(dirname "$(python3 -c 'import os, sys; print(os.path.realpath(sys.argv[1]))' "$0")")
if ! test -d "$LIBDIR"; then
echo "Something went wrong determining the library dir."
echo "I got $LIBDIR but that does not exist."