# Contributor: Francesco Colista # Maintainer: Francesco Colista pkgname=py-pynacl _pkgname=${pkgname/py-/} pkgver=1.2.1 pkgrel=0 pkgdesc="Python binding to the Networking and Cryptography (NaCl) library" url="https://github.com/pyca/pynacl" arch="all" license="ASL 2.0" makedepends="py-setuptools python2-dev python3-dev libffi-dev" subpackages="py3-${pkgname/py-/}:_py3 py2-${pkgname/py-/}:_py2" source="$pkgname-$pkgver.tar.gz::https://github.com/pyca/$_pkgname/archive/$pkgver.tar.gz" builddir="$srcdir"/$_pkgname-$pkgver check() { cd "$builddir" python2 setup.py check python3 setup.py check } build() { cd "$builddir" python2 setup.py build python3 setup.py build } package() { mkdir -p "$pkgdir" } _py() { local python=$1 pkgdesc="$pkgdesc - $python" install_if="$pkgname=$pkgver-r$pkgrel $python" cd "$builddir" $python setup.py install --prefix=/usr --root="$subpkgdir" } _py2() { _py python2 replaces="$pkgname" } _py3() { _py python3 } sha512sums="15a3a84fed4d002072c185ca346c708ed0fb397ca3a8d0144caced635cc2e00e19603767cf9fcedc571cb4bf32c546141094ce44536dd117c3775efb2fc589b9 py-pynacl-1.2.1.tar.gz"