# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>

pkgname=python-pytest-aiohttp
_name="${pkgname#python-}"
pkgver=1.0.5
pkgrel=4
pkgdesc='pytest plugin for aiohttp support'
url='https://github.com/aio-libs/pytest-aiohttp'
arch=(any)
license=('Apache-2.0')
depends=('python' 'python-pytest' 'python-aiohttp')
makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-setuptools-scm' 'python-wheel')
source=(${pkgname}-${pkgver}.tar.gz::$url/archive/v${pkgver}.tar.gz)
sha256sums=('c185f35de7ade7faec96e8a83d31ef1da61b93cdf6d0f405be500f60a315253b')
sha512sums=('953305728271cb5f3e315653db32b582689ab773fde2c73d4bd369153cb021f4543c12e37acef8b5694447b659bc9f94ffcbad277b53362933d13d2dd7a326d9')

build() {
  cd ${_name}-${pkgver}
  SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver python -m build --wheel --no-isolation
}

package() {
  cd ${_name}-${pkgver}
  python -m installer --destdir="$pkgdir" dist/*.whl
  install -Dm 644 README.rst CHANGES.rst -t "${pkgdir}/usr/share/doc/${pkgname}"
}

# vim: ts=2 sw=2 et:
