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

pkgname=python-pytest-mypy
pkgver=1.0.1
_commit=62c03db621543896ff6166dddd9e9e4f7c78ad7a
pkgrel=1
pkgdesc='Mypy static type checker plugin for Pytest'
arch=('any')
license=('MIT')
url='https://github.com/dbader/pytest-mypy'
depends=('python-attrs' 'python-filelock' 'python-pytest' 'mypy')
makedepends=('git' 'python-setuptools-scm' 'python-setuptools' 'python-build' 'python-installer' 'python-wheel')
checkdepends=('python-pytest-xdist' 'python-pexpect')
source=("git+https://github.com/dbader/pytest-mypy.git#commit=$_commit")
sha512sums=('9294a2c3bace6f298443a5d9e25004acbd3f5d24186931d4878c067fe0a21d9a65a618167124936289317aa7e1d37b40e305125078f2cf619eae5ae972e31e85')

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

check() {
  cd pytest-mypy
  PYTHONPATH="$PWD"/src pytest -v
}

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

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