blob: 2344c4d98a086add506a8583fe8f92c54bd09aee (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
# Maintainer: Daniel Bershatsky <bepshatsky@yandex.ru>
# Contributor: Filip GraliĆski <filipg@amu.edu.pl>
pkgname=python-transformers
_pkgname=${pkgname#python-}
pkgver=4.38.1
pkgrel=1
pkgdesc="State-of-the-art Natural Language Processing for Jax, PyTorch and TensorFlow"
arch=('any')
url='https://github.com/huggingface/transformers'
license=('Apache')
# TODO: Remove constraint on python-tokenizers in the future releases.
depends=(
'python-filelock'
'python-huggingface-hub'
'python-numpy'
'python-packaging'
'python-regex'
'python-requests'
'python-safetensors'
'python-tokenizers>=0.14'
'python-tokenizers<0.19'
'python-tqdm'
'python-yaml'
)
makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-wheel')
optdepends=(
'python-bitsandbytes: 8-bit support for PyTorch'
'python-flax: JAX support'
'python-onnxconverter-common: TensorFlow support'
'python-pytorch: PyTorch support'
'python-tensorflow: TensorFlow support'
'python-tf2onnx: TensorFlow support'
)
source=(
"python-transformers-$pkgver.tar.gz"::"https://github.com/huggingface/transformers/archive/refs/tags/v$pkgver.tar.gz"
)
sha256sums=('e0424f7b83dfce9e05ddaed55a3042932b35855332d5ad308a6726e443708ac9')
build() {
python -m build -nw "transformers-$pkgver"
}
package() {
cd "transformers-$pkgver"
python -m installer \
--compile-bytecode 1 \
--destdir $pkgdir \
$srcdir/$_pkgname-$pkgver/dist/transformers-$pkgver-*-*.whl
}
|