post_install() {
echo "Installing dependencies for calibre through pip..."
LD_PRELOAD='' LDFLAGS="-lpython3.14" MATHLIB="m" "/data/data/com.termux/files/usr/bin/pip3" install --upgrade beautifulsoup4 chardet css-parser dnspython feedparser feedparser-sgmllib fonttools html2text html5-parser html5lib jeepney markdown mechanize netifaces py7zr pygments pystache python-dateutil regex soupsieve texttable tzdata tzlocal xxhash zeroconf
if [ -f "/data/data/com.termux/files/usr/bin/py3compile" ]; then
LD_PRELOAD='' "/data/data/com.termux/files/usr/bin/py3compile" -p "calibre" "/data/data/com.termux/files/usr/lib/python3.14/"
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 "calibre"
fi
exit 0
}
