aboutsummaryrefslogtreecommitdiffstats
path: root/main/py-asn1crypto/APKBUILD
blob: f5599d4e3de2709601468f5dc0300ed1dd01c9bd (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: André Klitzing <aklitzing@gmail.com>
# Maintainer: André Klitzing <aklitzing@gmail.com>
pkgname=py-asn1crypto
_pkgname=asn1crypto
pkgver=0.24.0
pkgrel=0
pkgdesc="Python ASN.1 library with a focus on performance and a pythonic API"
url="https://github.com/wbond/asn1crypto"
arch="noarch"
license="MIT"
makedepends="python2-dev py-setuptools python3-dev"
subpackages="py3-${pkgname#py-}:_py3 py2-${pkgname#py-}:_py2"
source="$_pkgname-$pkgver.tar.gz::https://github.com/wbond/asn1crypto/archive/$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"

build() {
	cd "$builddir"
	python2 setup.py build
	python3 setup.py build
}

check() {
	cd "$builddir"
	python2 run.py tests
	python3 run.py tests
}

package() {
	mkdir -p "$pkgdir"
}

_py() {
	local python="$1"
	pkgdesc="$pkgdesc (for $python)"
	depends="$python"
	install_if="$pkgname=$pkgver-r$pkgrel $python"

	cd "$builddir"
	$python setup.py install --prefix=/usr --root="$subpkgdir"
}

_py2() {
	replaces="$pkgname"
	_py python2
}

_py3() {
	_py python3
}

sha512sums="426cc380903b4dd7aadd7b831e3a11ee3442c961a33b856d4aa8d9060e829f2e0ad905a60c4d6504569718fe2cee01d9be31628c89ef030bc34281e381c898e8  asn1crypto-0.24.0.tar.gz"