# Maintainer: J. Peter Mugaas <jpmugaas@suddenlink.net>

_realname=more-itertools
pkgbase=python-${_realname}
pkgname=("python-${_realname}")
pkgver=10.8.0
pkgrel=1
pkgdesc='More routines for operating on iterables, beyond itertools'
arch=('any')
url='https://github.com/more-itertools/more-itertools'
msys2_references=(
  "purl: pkg:pypi/more-itertools"
)
license=('MIT')
makedepends=('python-build' 'python-installer' 'python-flit-core')
depends=('python')
source=("https://pypi.org/packages/source/${_realname::1}/${_realname/-/_}/${_realname/-/_}-${pkgver}.tar.gz")
sha256sums=('f638ddf8a1a0d134181275fb5d58b086ead7c6a72429ad725c67503f13ba30bd')

build() {
  cd "${srcdir}/${_realname/-/_}-${pkgver}"
  /usr/bin/python -m build --wheel --skip-dependency-check --no-isolation
}

package() {
  cd "${srcdir}/${_realname/-/_}-${pkgver}"
  /usr/bin/python -m installer --destdir="${pkgdir}" dist/*.whl
  install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
