# Maintainer: Valery Kartel # Contributor: Valery Kartel pkgname=py-jmespath _pkgname=jmespath pkgver=0.9.0 pkgrel=2 pkgdesc="JMESPath is a query language for JSON" url="http://jmespath.org" arch="noarch" license="MIT" makedepends="python2-dev py-setuptools python3-dev" subpackages="py3-$_pkgname:_py3 py2-$_pkgname:_py2" source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz" builddir="$srcdir"/$_pkgname-$pkgver build() { cd "$builddir" python2 setup.py build || return 1 python3 setup.py build || return 1 } package() { mkdir -p "$pkgdir" } _py2() { replaces="$pkgname" depends="${depends//py-/py2-}" _py python2 } _py3() { depends="${depends//py-/py3-}" _py python3 } _py() { local python="$1" pkgdesc="$pkgdesc (for $python)" depends="$depends $python" install_if="$pkgname=$pkgver-r$pkgrel $python" cd "$builddir" $python setup.py install --prefix=/usr --root="$subpkgdir" } md5sums="471b7d19bd153ac11a21d4fb7466800c jmespath-0.9.0.tar.gz" sha256sums="08dfaa06d4397f283a01e57089f3360e3b52b5b9da91a70e1fd91e9f0cdd3d3d jmespath-0.9.0.tar.gz" sha512sums="c3a707bde5e529554638255a6a6dcf49591ec7573e28d84d34b3c1b8f84d13289ab054818f88b72ac8aee0f1af6ae830cb661f027e90efe9fb9edb4dcf5128c9 jmespath-0.9.0.tar.gz"