post_install() {
echo "Installing dependencies for proot-distro through pip..."
LD_PRELOAD='' LDFLAGS="-lpython3.14" MATHLIB="m" "/data/data/com.termux/files/usr/bin/pip3" install   proot-distro
if [ -f "/data/data/com.termux/files/usr/bin/py3compile" ]; then
LD_PRELOAD='' "/data/data/com.termux/files/usr/bin/py3compile" -p "proot-distro" "/data/data/com.termux/files/usr/lib/python3.14/"
fi
exit 0
}
post_upgrade() {
msg() {
echo
echo "You are upgrading proot-distro to new major release v5.x"
echo
echo "Information about this release can be obtained through:"
echo
echo "* proot-distro help"
echo "* https://github.com/termux/proot-distro/issues/666"
echo
}
[ -n "$2" ] && [ "$(vercmp "$2" "5.0.0")" -lt 0 ] && msg
post_install
}
pre_remove() {
if [ -f "/data/data/com.termux/files/usr/bin/py3clean" ]; then
LD_PRELOAD='' "/data/data/com.termux/files/usr/bin/py3clean" -p "proot-distro"
fi
exit 0
}
