# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Chris Severance aur.severach AatT spamgourmet.com
# Contributor: Chris Fordham <chris [at] fordham-nagy [dot] id [dot] au> aka flaccid
# Package Source: https://github.com/flaccid/archlinux-packages/blob/master/python-jmespath/PKGBUILD

pkgname=python-jmespath
pkgver=1.0.1
pkgrel=4
pkgdesc='A query language for JSON'
arch=(any)
url="https://github.com/jmespath/jmespath"
license=('Apache')
depends=('python')
makedepends=('python-setuptools')
checkdepends=('python-hypothesis' 'python-pytest')
source=("https://github.com/jmespath/jmespath.py/archive/$pkgver/$pkgname-$pkgver.tar.gz")
sha512sums=('c1676a4b7565d25c2948569005c503a0ca33908de6ed16536767da2c00c634e4ee345bcaf88a01bf6cd2996aaf722faaedff80061ab65ee77e5bc0f494f86a70')

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

check() {
  cd jmespath.py-$pkgver
  # Their tox.ini is misleading...
  pytest tests/
}

package() {
  cd jmespath.py-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1
}
