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

pkgname=python-parver
pkgver=0.4
pkgrel=3
pkgdesc="Parse and manipulate version numbers"
url="https://github.com/RazerM/parver"
license=('MIT')
arch=(any)
depends=('python-arpeggio' 'python-attrs')
makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-wheel')
checkdepends=('python-pytest' 'python-hypothesis' 'python-pretend')
source=("$pkgname-$pkgver.tar.gz::https://github.com/RazerM/parver/archive/$pkgver.tar.gz")
sha512sums=('3ff9532904712726588b493e6300e8422edf5231774fa01308533e184e66c0e73037aff40be66417de2ad066ac8332a4c62ffabd0bc89cecb29d45ce7b3f2013')

build() {
  cd parver-$pkgver
  python -m build -nw
}

check() {
  cd parver-$pkgver
  PYTHONPATH=src pytest
}

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