aboutsummaryrefslogtreecommitdiffstats
path: root/community/py-service_identity/APKBUILD
blob: 24945507138e04d719e0f2dd97dc7dec1e7d98bf (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
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=py-service_identity
_pkgname=service_identity
pkgver=17.0.0
pkgrel=0
pkgdesc="Service Identity Verification for pyOpenSSL"
url="https://service-identity.readthedocs.org/"
arch="noarch"
license="MIT"
depends=""
makedepends="python2-dev py-setuptools py2-pytest python3-dev py3-pytest"
install=""
subpackages="py3-${pkgname/py-/}:_py3 py2-${pkgname/py-/}:_py2"
source="https://files.pythonhosted.org/packages/source/s/$_pkgname/$_pkgname-$pkgver.tar.gz"

builddir="$srcdir"/$_pkgname-$pkgver

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

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
	depends="py2-asn1 py2-asn1-modules py2-openssl py2-characteristic"
	replaces="$pkgname"
}

_py3() {
	_py python3
	depends="py3-asn1 py3-asn1-modules py3-openssl py3-characteristic"
}

sha512sums="4ba35166b520bbeb391c047b5fcca1dbf137a65e0624c92a6b6c2229f9521627be95195a8e502cbcc5a887d904598b1f0e63b47f6a38ee9f78afe13278d692ec  service_identity-17.0.0.tar.gz"