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

pkgname=python-nilearn
_pkgname=nilearn
pkgver=0.14.0
pkgrel=1
pkgdesc='Machine learning for NeuroImaging in Python'
arch=('any')
url='https://github.com/nilearn/nilearn'
license=('BSD-3-Clause')
depends=(
  'python-joblib'
  'python-matplotlib'
  'python-nibabel'
  'python-numpy'
  'python-pandas'
  'python-pillow'
  'python-pydicom'
  'python-requests'
  'python-scikit-learn'
  'python-scipy'
)
checkdepends=(
  'python-coverage'
  'python-nose'
  'python-pytest'
)
makedepends=(
  'cython'
  python-build
  python-installer
  python-wheel
  python-hatchling
  python-hatch-vcs
)
source=("${_pkgname}-${pkgver}.tar.gz::https://files.pythonhosted.org/packages/source/${_pkgname::1}/${_pkgname}/${_pkgname}-${pkgver}.tar.gz")
sha512sums=('87d344f673866c846c3b1c1b1ee9284e593a46e752452f1406c7e0d8341cca53a04cf18228cc79a792a5183fbfb6484fa7cfedc2fe94ba7fef3313385708230d')

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

package() {
  cd "${srcdir}/${_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:
