aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py-kombu/APKBUILD
blob: cbe661bb8d9cb1c10a74ac68f7100b88f14d0e6f (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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Contributor: Stefan Wagner <stw@bit-strickerei.de>
# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=py-kombu
_pyname=kombu
pkgver=4.5.0
pkgrel=0
pkgdesc="a message queue abstraction layer"
url="https://pypi.python.org/pypi/kombu/"
arch="noarch"
license="BSD"
_py2_deps="py2-amqp py2-vine"
_py3_deps="py3-amqp py3-vine"
makedepends="
	$_py2_deps $_py3_deps python2-dev python3-dev py2-setuptools py3-setuptools
"
checkdepends="
	py2-pyro4 py3-pyro4 py2-case py3-case py2-nose py3-nose py2-mock py3-mock
	py2-tz py3-tz pytest py3-pytest
"
subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
_pypiprefix="${_pyname%${_pyname#?}}"
source="https://files.pythonhosted.org/packages/source/$_pypiprefix/$_pyname/$_pyname-$pkgver.tar.gz"
builddir="$srcdir/$_pyname-$pkgver"

prepare() {
	cd "$builddir"
	sed -i requirements/test.txt -e 's/pytest-sugar//g'
	cp -r "$builddir" "$builddir"-py2
}

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

check() {
	cd "$builddir"
	python3 setup.py test
	cd "$builddir"-py2
	python2 setup.py test
}

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

_py2() {
	depends="$_py2_deps"
	cd "$builddir"-py2
	_py python2
}

_py3() {
	depends="$_py3_deps"
	cd "$builddir"
	_py python3
}

_py() {
	_python="$1"
	pkgdesc="$pkgdesc (for $_python)"
	depends="$depends $_python"
	install_if="$pkgname=$pkgver-r$pkgrel $_python"
	$_python setup.py install --prefix=/usr --root="$subpkgdir"
}
sha512sums="028ae2f65da52e3192791490cfc3d5298426c774891bac7b8b81f0d36f61be3c171b72f344c6c59be5820aca8c9c61b6f695ac3f5e181c1fd98a1d0e9fa7a9ae  kombu-4.5.0.tar.gz"