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

pkgname=python-pycontracts
pkgver=1.8.14
pkgrel=4
pkgdesc='Declare constraints on function parameters and return values'
arch=('any')
url="https://andreacensi.github.io/contracts"
license=('GPL')
depends=('python-pyparsing' 'python-decorator' 'python-six' 'python-future')
makedepends=('python-setuptools' 'python-pyparsing'
             'python-decorator' 'python-six' 'python-future')
checkdepends=('python-nose')
source=(${pkgname}-${pkgver}.tar.gz::https://github.com/AndreaCensi/contracts/archive/v${pkgver}.tar.gz)
sha512sums=('ae2a96f603d5b87efd83eb9bb84bf0ebec2d71b08cfed9505be22f15c310f6428652e40c69075577eaee343a0babf6fce7db06c4ad3605a88646d9242dfd1003')

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

check() {
  cd contracts-$pkgver
  python setup.py nosetests
}

package_python-pycontracts() {
  cd contracts-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1
}
