# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Maintainer: Carl Smedstad <carsme@archlinux.org>
# Contributor: renek <aur@spaceshore.net>

pkgname=python-multidict
pkgver=6.7.0
pkgrel=1
pkgdesc='Asyncio-based multidict implementation for Python'
arch=('x86_64' 'aarch64')
url='https://github.com/aio-libs/multidict'
license=('Apache-2.0')
depends=(
  'glibc'
  'python'
)
makedepends=(
  'cython'
  'python-build'
  'python-installer'
  'python-setuptools'
  'python-wheel'
)
checkdepends=(
  'python-objgraph'
  'python-perf'
  'python-psutil'
  'python-pytest'
  'python-pytest-codspeed'
)
source=("$url/archive/v$pkgver/$pkgname-$pkgver.tar.gz")
sha512sums=('6268acb9fc6efa1dc0adcaae06e61c5d6b9342fd654efc142116eee3acbd4d337e1c721cfeaa0a653241f0c2d9839cc8e55aa7531776c062c7c0c0c785db6be9')
b2sums=('53d642e7ad4471979ecb1aa60574935aa50d8032126f4956d6c4b27a9076290f7b8254609c758b1124d70ed32249cc463bcf55380f7421f5d640fdcbca4d6122')

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

check() {
  cd ${pkgname#python-}-$pkgver
  python -m venv --system-site-packages test-env
  test-env/bin/python -m installer dist/*.whl
  cd tests
  ../test-env/bin/python -m pytest -v --override-ini="addopts="
}

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

# vim: ts=2 sw=2 et:
