# Maintainer: Konstantin Gizdov <arch at kge dot pw>

_pkgname='keras'
pkgname=("python-${_pkgname}")
pkgdesc='Deep Learning for humans'
url='https://keras.io/'
license=('Apache-2.0')
pkgver=3.13.0
pkgrel=2
arch=('any')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/${_pkgname//-/_}/${_pkgname//-/_}-$pkgver.tar.gz")
makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-wheel')
depends=('absl-py' 'python' 'python-h5py' 'python-ml-dtypes' 'python-optree'
         'python-numpy' 'python-packaging' 'python-pandas' 'python-pillow'
         'python-pydot' 'python-rich' 'python-scipy' 'python-tensorflow'
         'tensorboard')
optdepends=('python-pytorch'
            'python-requests: for RemoteMonitor'
            'python-scikit-learn: wrappers for scikit-learn')
conflicts=('python-keras-applications' 'python-keras-preprocessing')
provides=('python-keras-applications' 'python-keras-preprocessing')
replaces=('python-keras-applications' 'python-keras-preprocessing')
b2sums=('cf848c94f94eeb7358f53106434e2ccf5a75d01c2e2b5782caead67cbed1801f33b138be0d3b02810f8867e6f0a0f35b9499d2fcf0768735d1dffb80f49dd3a0')

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

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