python-tokenizers
The package downloads source code from the project's official GitHub and two data files from reputable academic and project-specific domains; the non-standard hosts are for non-executable data, and the build uses standard Rust/Python tooling on the project's own source, posing minimal risk.
Triggered rules
llm_review
The static rules flagged this MEDIUM, but an AI model (qwen/qwen3-235b-a22b-07-25) reviewed the full PKGBUILD and judged it LOW (confidence 95%): The package downloads source code from the project's official GitHub and two data files from reputable academic and project-specific domains; the non-standard hosts are for non-executable data, and the build uses standard Rust/Python tooling on the project's own source, posing minimal risk.
1 higher static finding superseded - not the current verdict (shown for transparency)
source_untrusted_domain
One or more source=() URLs point to a host outside the trusted allowlist (github.com, gitlab.com, codeberg.org, pypi.org, …).
-
PKGBUILD:45
"norvig-big.txt"::"https://norvig.com/big.txt" -
PKGBUILD:46
"roberta.json"::"https://huggingface.co/roberta-large/raw/main/tokenizer.json"
PKGBUILD
2 offending line(s) highlighted# Maintainer: Daniel Bershatsky <bepshatsky@yandex.ru>
# Contributor: Filip Graliński <filipg@amu.edu.pl>
: ${CARGO_HOME:=$SRCDEST/cargo-home}
: ${CARGO_TARGET_DIR:=target}
: ${RUSTUP_TOOLCHAIN:=stable}
_module="tokenizers"
_pkgname="python-$_module"
pkgname="$_pkgname"
pkgver=0.23.1
pkgrel=1
pkgdesc='Fast State-of-the-Art Tokenizers optimized for Research and Production'
url="https://github.com/huggingface/tokenizers"
license=('Apache-2.0')
arch=('i686' 'x86_64')
depends=('python')
makedepends=(
'clang'
'rust-bindgen'
'python-build'
'python-installer'
'python-maturin'
'python-setuptools-rust'
'python-wheel'
)
checkdepends=(
'python-datasets'
#└─ 'python-huggingface-hub' # AUR
#└─ 'python-multiprocess' # AUR
'python-numpy'
'python-pyarrow'
'python-pytest'
'python-requests'
'python-setuptools-rust'
)
options=('!lto')
_pkgsrc="$_module-$pkgver"
_pkgext="tar.gz"
source=(
"$_pkgsrc.$_pkgext"::"$url/archive/refs/tags/v$pkgver.$_pkgext"
"norvig-big.txt"::"https://norvig.com/big.txt"
"roberta.json"::"https://huggingface.co/roberta-large/raw/main/tokenizer.json"
)
sha256sums=('aa906ad27ece40261e075e171e4a8873c2c5cfdbb64205170735d425f214c7ef'
'fa066c7d40f0f201ac4144e652aa62430e58a6b3805ec70650f678da5804e87b'
'847bbeab6174d66a88898f729d52fa8d355fafe1bea101cf960dd404581df70e')
_rust_env() {
export CARGO_HOME CARGO_TARGET_DIR RUSTUP_TOOLCHAIN
export GIT_DIR='.'
}
prepare() (
_rust_env
cd "$_pkgsrc/bindings/python"
# fix typo
sed -E -e 's@defaut@default@' -i Cargo.toml
cargo update
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
)
build() (
_rust_env
cd "$_pkgsrc/bindings/python"
cargo build --frozen --release
python -m build --no-isolation --wheel
)
check() {
cd "$_pkgsrc/bindings/python"
# data
install -Dm644 "$srcdir/roberta.json" "data/roberta.json"
install -Dm644 "$srcdir/norvig-big.txt" "data/big.txt"
head -100 data/big.txt > data/small.txt
# test in venv
python -m venv --system-site-packages test-env
test-env/bin/python -m installer dist/*.whl
test-env/bin/python -m pytest -s -v tests || :
cargo test --no-default-features || :
}
package() {
cd "$_pkgsrc"
install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
cd "bindings/python"
python -m installer --destdir="$pkgdir" dist/*.whl
}
Scan history
| Scanned at (UTC) | Severity | Rules |
|---|---|---|
| 2026-09-17 00:27:14 | Low | 2 |
| 2026-09-16 00:03:17 | Low | 2 |
| 2026-09-15 00:25:31 | Low | 2 |
| 2026-09-14 00:27:57 | Low | 2 |
| 2026-09-13 00:19:54 | Low | 2 |
| 2026-09-12 00:25:17 | Low | 2 |
| 2026-09-11 00:19:22 | Low | 2 |
| 2026-09-10 00:22:44 | Low | 2 |
| 2026-09-09 00:04:09 | Low | 2 |
| 2026-09-08 00:18:08 | Low | 2 |
| 2026-09-07 00:30:15 | Low | 2 |
| 2026-09-06 00:17:06 | Low | 2 |
| 2026-09-05 00:16:27 | Low | 2 |
| 2026-09-04 00:03:13 | Low | 2 |
| 2026-09-03 00:15:47 | Low | 2 |
| 2026-09-02 00:02:31 | Low | 2 |
| 2026-09-01 00:11:19 | Low | 2 |
| 2026-08-31 00:19:57 | Low | 2 |
| 2026-08-30 00:04:14 | Low | 2 |
| 2026-08-29 00:29:17 | Low | 2 |