# Contributor: Francesco Colista # Maintainer: Francesco Colista pkgname=py-bcrypt _pkgname=${pkgname/py-/} pkgver=3.1.6 pkgrel=1 pkgdesc="Modern password hashing for your software and your servers" url="https://github.com/pyca/bcrypt" arch="all" license="Apache-2.0" makedepends="python2-dev python3-dev py-setuptools 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="ceb29bec656f56acea9e11112a46d8179c6c3be6d9295201ebdbf33692dd5503b353bd8206f3f4edc4b3b3027799d75915f498e4b7ac01124b90a0d70b1f60a8 py-bcrypt-3.1.6.tar.gz"