# 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.12.0
pkgrel=1
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=('a1fd7ca95ae5ec365630750e5565b1ae84a7bc7b2abe41f17436fefdbf18407ebcc3424776188f66a9b0d07c4f818988c584ad4dcf5cf47be19da8524710ae57')

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

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