post_install() {
export ANDROID_API_LEVEL=24
LDFLAGS="-lpython3.13" MATHLIB="m" pip install --upgrade maturin Cython
echo "Installing dependencies for beets through pip..."
LD_PRELOAD='' LDFLAGS="-lpython3.13" MATHLIB="m" "/data/data/com.termux/files/usr/bin/pip3" install  --no-build-isolation beets
if [ -f "/data/data/com.termux/files/usr/bin/py3compile" ]; then
LD_PRELOAD='' "/data/data/com.termux/files/usr/bin/py3compile" -p "beets" "/data/data/com.termux/files/usr/lib/python3.13/"
fi
exit 0
}
post_upgrade() {
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 "beets"
fi
exit 0
}
