# Maintainer: Daniel Bershatsky # Contributor: jzbor pkgname=python-accelerate _pkgname=${pkgname#python-} pkgver=0.30.0 pkgrel=1 pkgdesc='A simple way to train and use PyTorch models with multi-GPU, TPU, mixed-precision' arch=('any') url='https://github.com/huggingface/accelerate' license=('Apache') groups=('hugginface') depends=( 'python-huggingface-hub' 'python-numpy' 'python-packaging' 'python-psutil' 'python-pytorch' 'python-safetensors' 'python-yaml' ) makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-wheel') optdepends=() source=("$_pkgname-$pkgver.tar.gz::https://github.com/huggingface/$_pkgname/archive/refs/tags/v$pkgver.tar.gz") sha256sums=('de084ded81e81749c569cdd5269e5f58ce006716565ed61e95f699997e70a6a7') build() { cd $_pkgname-$pkgver python -m build -n -w } check() { cd $_pkgname-$pkgver/src python -c 'import accelerate' } package() { python -m installer \ --compile-bytecode 1 \ --destdir $pkgdir \ $_pkgname-$pkgver/dist/$_pkgname-$pkgver-py3-*-*.whl }