diff options
author | Francesco Colista <fcolista@alpinelinux.org> | 2017-07-19 08:16:12 +0000 |
---|---|---|
committer | Francesco Colista <fcolista@alpinelinux.org> | 2017-07-19 08:27:13 +0000 |
commit | 9bb3233d8c7672f92db9343fd7a17b64afa6e88d (patch) | |
tree | 6577b2afaa2176adcfa6bacf3d9cd1cc893b1ad7 | |
parent | 19eb1c1b5f38b54e053a922785f91a57d54b97e1 (diff) | |
download | aports-9bb3233d8c7672f92db9343fd7a17b64afa6e88d.tar.bz2 aports-9bb3233d8c7672f92db9343fd7a17b64afa6e88d.tar.xz |
testing/py-bcrypt: new aport
-rw-r--r-- | testing/py-bcrypt/APKBUILD | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/testing/py-bcrypt/APKBUILD b/testing/py-bcrypt/APKBUILD new file mode 100644 index 0000000000..77d94963e5 --- /dev/null +++ b/testing/py-bcrypt/APKBUILD @@ -0,0 +1,51 @@ +# Contributor: Francesco Colista <fcolista@alpinelinux.org> +# Maintainer: Francesco Colista <fcolista@alpinelinux.org> +pkgname=py-bcrypt +_pkgname=${pkgname/py-/} +pkgver=3.1.3 +pkgrel=0 +pkgdesc="Modern password hashing for your software and your servers" +url="https://github.com/pyca/bcrypt" +arch="all" +license="APACHE2.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="181b3f0661b295cc5f3fe2148d7a6dfd94c5a0ecddb94ecd0be16c0c5c04376f355988a5bb00930d397c16d5286865a334702a3c21a658cc4156255ba8bb2886 py-bcrypt-3.1.3.tar.gz" |