aboutsummaryrefslogtreecommitdiffstats
path: root/main/py-bcrypt/APKBUILD
blob: af3e3eebdc2fab2b77d601cab24e13fcf0e094ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=py-bcrypt
_pkgname=${pkgname/py-/}
pkgver=3.1.4
pkgrel=0
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="f4b18095ee1ea09a4a1ae4d970353d4743b84e8b2637132857339febc8fd25697359c8a3308578db623ee0c900a5711a693d9bfd21625bf93c1e6437bfb24f6c  py-bcrypt-3.1.4.tar.gz"