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

pkgname=python-sentinels
pkgver=1.0.0
pkgrel=11
pkgdesc="Various objects to denote special meanings in python"
url="https://github.com/vmalloc/sentinels"
license=('BSD-3-Clause')
arch=('any')
depends=('python')
makedepends=('python-setuptools' 'python-build' 'python-installer' 'python-wheel')
checkdepends=('python-pytest')
source=("$pkgname-$pkgver.tar.gz::https://github.com/vmalloc/sentinels/archive/$pkgver.tar.gz")
sha512sums=('80f5bc13eb902f7e8cba5a227eae3c92187d4d3203493e3e507998338c726985fe3b121e352a4235d5975bf19c3643b8120c1d15756768c268406689c2fc5489')

build() {
  cd "$srcdir"/sentinels-$pkgver
  python -m build --wheel --no-isolation
}

check() {
  cd "$srcdir"/sentinels-$pkgver
  PYTHONPATH="$PWD" pytest
}

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