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

pkgname=python-pytorch-ignite
_pkgname=ignite
pkgver=0.5.5
pkgrel=1
pkgdesc='High-level library to help with training and evaluating neural networks in PyTorch flexibly and transparently'
arch=('any')
url='https://github.com/pytorch/ignite'
license=('BSD-3-Clause')
depends=(
  python-pytorch
)
makedepends=(
  python-build
  python-hatchling
  python-installer
  python-wheel
)

source=("${pkgname}-${pkgver}.tar.gz::https://github.com/pytorch/ignite/archive/refs/tags/v${pkgver}.tar.gz")
sha512sums=('c6a99c085816bff35865159ed0d6123ebad7402998ac31b2b029db29bea51752fb551eb0b5ab219b2eb345e2a0019050719e69082bf9d47649e932cab26bed89')

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

package() {
  cd "${_pkgname}-${pkgver}"
  python -m installer --destdir="${pkgdir}" dist/*.whl
  install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
}
# vim:set ts=2 sw=2 et:
