post_install() {
echo "Installing dependencies for electrum through pip..."
LD_PRELOAD='' LDFLAGS="-lpython3.12" MATHLIB="m" "/data/data/com.termux/files/usr/bin/pip3" install --upgrade 'qrcode' 'protobuf<4,>=3.20' 'qdarkstyle>=2.7' 'aiorpcx<0.24,>=0.22.0' 'aiohttp<4.0.0,>=3.3.0' 'aiohttp_socks>=0.8.4' 'certifi' 'attrs>=20.1.0' 'jsonpatch' 'dnspython>=2.0' Electrum
if [ -f "/data/data/com.termux/files/usr/bin/py3compile" ]; then
LD_PRELOAD='' "/data/data/com.termux/files/usr/bin/py3compile" -p "electrum" "/data/data/com.termux/files/usr/lib/python3.12/"
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 "electrum"
fi
exit 0
}
