# Maintainer: jzbor <zborof at posteo dot de>
pkgname=python-accelerate
_name=${pkgname#python-}
pkgver=1.14.0
pkgrel=1
pkgdesc="Train and use PyTorch models with multi-GPU, TPU, mixed-precision"
arch=(any)
url="https://github.com/huggingface/$_name"
license=('MIT')
groups=()
depends=(python)
makedepends=(python-build python-installer python-wheel python-setuptools)
# checkdepends=(
#   "python-pytest"
#   "python-datasets"
#   "python-evaluate"
#   "python-transformers"
#   "python-scipy"
#   "python-scikit-learn"
#   "python-deepspeed"
#   "python-tqdm"
# )
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=()
source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz")
noextract=()
sha512sums=('4f63f2d2e5963d2f81fb1863d75f16380cc74fb180f58305f340a0b70db8557a6ad42883988347de259b5136b19c912ae5402ef1d2e0b834fbec40b58172da08')
validpgpkeys=()

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

package() {
    cd "$_name-$pkgver"
    python -m installer --destdir="$pkgdir" dist/*.whl
}

# check() {
#     cd "$_name-$pkgver"
#     pytest tests
# }
