# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-aioresponses
pkgver=0.7.8
pkgrel=1
pkgdesc="A helper to mock/fake web requests in python aiohttp package."
url="https://github.com/pnuckowski/aioresponses"
license=('MIT')
arch=('any')
depends=('python-aiohttp' 'python-packaging')
makedepends=('git' 'python-pbr' 'python-setuptools' 'python-build' 'python-installer' 'python-wheel')
checkdepends=('python-pytest' 'python-ddt')
source=("git+https://github.com/pnuckowski/aioresponses.git#tag=$pkgver")
sha512sums=('45999ec847ea402d51a50b7849dc0f99792414e524709a3ef58182d955e36e3f9aeb0ade573347dc7858bbb550ed7239de943e0a7c22ea45dc796bfe8ca5d4ad')

build() {
  cd aioresponses
  python -m build --wheel --no-isolation
}

check() {
  cd aioresponses
  pytest
}

package() {
  cd aioresponses
  python -m installer --destdir="$pkgdir" dist/*.whl
  install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
}
