# Maintainer: Butui Hu <hot123tea123@gmail.com>

_pkgname=tokenizers
pkgname=python-tokenizers
epoch=1
pkgver=0.23.1
pkgrel=1
pkgdesc='Fast State-of-the-Art Tokenizers optimized for Research and Production'
arch=('x86_64')
url='https://github.com/huggingface/tokenizers'
license=('Apache-2.0')
depends=(
  gcc-libs
  glibc
  python
)
makedepends=(
  python-build
  python-installer
  python-maturin
  python-setuptools
  python-setuptools-rust
  python-wheel
)
# ref https://bugs.gentoo.org/show_bug.cgi?id=860063
options=(!lto)
source=("${_pkgname}-${pkgver}.tar.gz::https://files.pythonhosted.org/packages/source/${_pkgname::1}/${_pkgname}/${_pkgname}-${pkgver}.tar.gz")
sha512sums=('6bee3e3aeb43759b3bd9214a1e1903a02d36f0925b4624796041ac285fe6a76de439bca5565927ac02d084a7ba3cb732738284c4dd6a6f7ad0f162dff0392aef')

build() {
  cd "${_pkgname}-${pkgver}"
  python -m build --wheel --no-isolation
}

package() {
  cd "${_pkgname}-${pkgver}"
  python -m installer --destdir="${pkgdir}" dist/*.whl
}
# vim:set ts=2 sw=2 et:
