Skip to content

Commit 2cd2913

Browse files
committed
python3.12-tokenizers: rebuild
1 parent 43dbe79 commit 2cd2913

File tree

1 file changed

+8
-4
lines changed
  • tur-pypi-312/python3.12-tokenizers

1 file changed

+8
-4
lines changed

tur-pypi-312/python3.12-tokenizers/build.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ TERMUX_PKG_HOMEPAGE=https://github.com/huggingface/tokenizers
22
TERMUX_PKG_DESCRIPTION="Fast State-of-the-Art Tokenizers optimized for Research and Production"
33
TERMUX_PKG_LICENSE="Apache-2.0"
44
TERMUX_PKG_MAINTAINER="@termux-user-repository"
5-
TERMUX_PKG_VERSION="0.21.0"
5+
TERMUX_PKG_VERSION="0.20.4"
66
TERMUX_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
88
TERMUX_PKG_AUTO_UPDATE=true
99
TERMUX_PKG_DEPENDS="libc++, python, python-pip"
1010
TERMUX_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

Comments
 (0)