# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-pluggy
pkgver=1.5.0
pkgrel=1
pkgdesc="Plugin and hook calling mechanisms for python"
arch=(any)
url="https://github.com/pytest-dev/pluggy"
license=('MIT')
depends=('python')
makedepends=('git' 'python-setuptools-scm' 'python-setuptools' 'python-build' 'python-installer' 'python-wheel')
checkdepends=('python-pytest')
source=("git+https://github.com/pytest-dev/pluggy.git#tag=$pkgver")
sha512sums=('101873bef7d3c7dd76df7007e9d0d536670934ee6037214ccff16e4afc656a54bf77fa5394b75094a59fef0f667155ab5a29e5502bcf09ca116c8f719ed199fe')

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

check() {
  cd pluggy
  PYTHONPATH="$PWD"/src pytest
}

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