@@ -2,9 +2,9 @@ TERMUX_PKG_HOMEPAGE=https://github.com/huggingface/tokenizers
22TERMUX_PKG_DESCRIPTION=" Fast State-of-the-Art Tokenizers optimized for Research and Production"
33TERMUX_PKG_LICENSE=" Apache-2.0"
44TERMUX_PKG_MAINTAINER=" @termux-user-repository"
5- TERMUX_PKG_VERSION=" 0.21.0 "
5+ TERMUX_PKG_VERSION=" 0.20.4 "
66TERMUX_PKG_SRCURL=https://github.com/huggingface/tokenizers/archive/refs/tags/v$TERMUX_PKG_VERSION .tar.gz
7- TERMUX_PKG_SHA256=841279ad797d575ed3cf31fc4f30e09e37acbd35028d30c51fc0879ef7ed4094
7+ TERMUX_PKG_SHA256=c7dd77a63d95113add5f4c85a41f117cbf41d2cbc7f6609b72650e14c7f42f31
88TERMUX_PKG_AUTO_UPDATE=true
99TERMUX_PKG_DEPENDS=" libc++, python, python-pip"
1010TERMUX_PKG_PYTHON_COMMON_DEPS=" wheel"
@@ -55,10 +55,14 @@ termux_step_make_install() {
5555 build-python -m maturin build --release --skip-auditwheel --target $CARGO_BUILD_TARGET -Z build-std
5656
5757 local _pyver=" ${TERMUX_PYTHON_VERSION/ ./ } "
58- # Fix wheel name for arm
58+ # Fix wheel name, although it it built with tag `cp39-abi3`, but it is linked against `python3.x.so`
59+ # so it will not work on other pythons.
5960 if [ " $TERMUX_ARCH " = " arm" ]; then
60- mv ./target/wheels/tokenizers-$TERMUX_PKG_VERSION -cp $_pyver -cp $_pyver -linux_armv7l.whl \
61+ mv ./target/wheels/tokenizers-$TERMUX_PKG_VERSION -cp39-abi3 -linux_armv7l.whl \
6162 ./target/wheels/tokenizers-$TERMUX_PKG_VERSION -py$_pyver -none-any.whl
63+ else
64+ mv ./target/wheels/tokenizers-$TERMUX_PKG_VERSION -cp39-abi3-linux_$TERMUX_ARCH .whl \
65+ ./target/wheels/tokenizers-$TERMUX_PKG_VERSION -cp$_pyver -cp$_pyver -linux_$TERMUX_ARCH .whl
6266 fi
6367
6468 pip install --no-deps ./target/wheels/* .whl --prefix $TERMUX_PREFIX
0 commit comments