aboutsummaryrefslogtreecommitdiffstats
path: root/main/py-pynacl/APKBUILD
blob: 0386aafe68d7dc3e1eead22f8af52232fed5946b (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
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=py-pynacl
_pkgname=${pkgname/py-/}
pkgver=1.2.0
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="ffc3b91766aad9d0d21c88c198ebb7520d204e58ffbcac815a382af7eaf9b489f85ae6c2fc4cfe4dd5e04576062bfe248bdcc08fb42bf184a73e41f4352c7bd1  py-pynacl-1.2.0.tar.gz"