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

_pkgname=multidict
pkgname=python-${_pkgname}
pkgver=6.0.5
pkgrel=2
pkgdesc='Asyncio-based multidict implementation for Python'
url='https://github.com/aio-libs/multidict'
arch=('x86_64' 'aarch64')
license=('Apache-2.0')
depends=('python' 'glibc')
makedepends=('cython' 'python-setuptools' 'python-build' 'python-installer' 'python-wheel')
checkdepends=('python-pytest' 'python-pytest-cov' 'python-pytest' 'python-psutil' 'python-perf')
source=(https://github.com/aio-libs/multidict/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz)
sha512sums=('500d3b2a139d40442462a2b49f9dd0c01631643ef9905367d8b7c472a1030437c26a042a28e11ba94058a17821628d96f19ec6ca479d5831e2f1263ff0069871')
b2sums=('668b5db8174c0dbc6651eae281f777d5c1dfb59a4f4d9d5301355148bf40063e33e26844d2f8ff543ebe7b9c91cf7fffb4abd57ca6786684757f50af27b7df56')

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

check() {
  cd ${_pkgname}-${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
}

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

# vim: ts=2 sw=2 et:
