# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: George Rawlinson <grawlinson@archlinux.org>
# Contributor: Kyle Keen <keenerd@gmail.com>
# Contributor: Germán Osella Massa <gosella@gmail.com>

pkgname=python-more-itertools
_name=${pkgname#python-}
pkgver=10.3.0
pkgrel=1
pkgdesc='More routines for operating on iterables, beyond itertools'
arch=(any)
url='https://github.com/more-itertools/more-itertools'
license=('MIT')
depends=('python')
makedepends=(
  'python-build'
  'python-installer'
  'python-wheel'
  'python-flit-core'
)
source=("$_name-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz")
sha512sums=('dad284ce7a6fe1ead170f55f1e38c07a063315397247dc4f7427cb3bc2ab40c57023ae7b36e9ff1e0c69484adc2e40b3c29a4d1e89692877a122d82fd82a269f')
b2sums=('ec5e5dac91e9ad77077af7f40cb419021af1a97cb87fb07caf594a0be1e2bb84134f83920e0bc5093e92d36349a32f5c3e886a2135bfb45ea83bce2d8523353e')

build() {
  cd "$_name-$pkgver"

  SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver python -m build --wheel --no-isolation
}

check() {
  cd "$_name-$pkgver"

  python -m unittest
}

package() {
  cd "$_name-$pkgver"

  python -m installer --destdir="$pkgdir" dist/*.whl

  # license
  install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE
}

# vim:set ts=2 sw=2 et:
