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

pkgname=python-voluptuous
pkgver=0.14.2
pkgrel=2
pkgdesc="A Python data validation library"
url="https://github.com/alecthomas/voluptuous"
license=('BSD')
arch=(any)
depends=('python')
makedepends=('python-setuptools')
checkdepends=('python-pytest')
source=(https://github.com/alecthomas/voluptuous/archive/refs/tags/$pkgver/$pkgname-$pkgver.tar.gz)
sha512sums=('18a52c3d1feba1efda0cc91407b21938a7261ae9e7768e62ddc553c0cb9bf8ffa6448b39c476bc94a1aefb8f75b724da5ee2ffc8b6a729cb23accead7db40814')

build() {
  cd voluptuous-$pkgver
  python setup.py build
}

check() {
  cd voluptuous-$pkgver
  pytest
}

package() {
  cd voluptuous-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1
  install -Dm644 COPYING -t "$pkgdir"/usr/share/licenses/$pkgname/
}
