aboutsummaryrefslogtreecommitdiffstats
path: root/community/py3-zope-deferredimport/APKBUILD
blob: ca36a1f227f77b7295bbd1c02b0cc00745ea4512 (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
52
53
54
# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
# Maintainer: Carlo Landmeter <clandmeter@alpinelinux.org>
pkgname=py-zope-deferredimport
_pkgname=zope.deferredimport
pkgver=4.3.1
pkgrel=0
pkgdesc="Defer imports until used by code"
url="https://github.com/zopefoundation/$_pkgname"
arch="noarch"
license="ZPL-2.1"
depends="py-setuptools py-zope-proxy"
makedepends="python2-dev python3-dev"
subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
source="$_pkgname-$pkgver.tar.gz::https://github.com/zopefoundation/$_pkgname/archive/$pkgver.tar.gz"

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

build() {
	python2 setup.py build
	python3 setup.py build
}

check() {
	python2 setup.py test
	python3 setup.py test
}

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

_py2() {
	replaces="$pkgname"
	depends="${depends//py-/py2-}"
	_py python2
}

_py3() {
	depends="${depends//py-/py3-}"
	_py python3
}

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

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


sha512sums="1c367def232ec79ad10a9d8f1e068598d2fdb49b067c2c3f44c9ad25c198afbbf2d52659c3795aad76f8c82d212e49086b81ab1c1dcc6aac2e3ce66c35ff5750  zope.deferredimport-4.3.1.tar.gz"