Mail archive
alpine-aports

[alpine-aports] [PATCH 11/12] testing/py-kombu: adopt, update to 4.5.0

From: Drew DeVault <sir_at_cmpwn.com>
Date: Wed, 3 Apr 2019 16:27:14 -0400

---
 testing/py-kombu/APKBUILD | 69 +++++++++++++++++++++++++--------------
 1 file changed, 45 insertions(+), 24 deletions(-)
diff --git a/testing/py-kombu/APKBUILD b/testing/py-kombu/APKBUILD
index 2903aee369..cbe661bb8d 100644
--- a/testing/py-kombu/APKBUILD
+++ b/testing/py-kombu/APKBUILD
_at_@ -1,47 +1,68 @@
 # Contributor: Stefan Wagner <stw_at_bit-strickerei.de>
-# Maintainer: 
+# Maintainer: Drew DeVault <sir_at_cmpwn.com>
 pkgname=py-kombu
-pkgver=4.2.1
+_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"
-depends="py-amqp"
-makedepends="python2-dev python3-dev py-setuptools"
-install=""
-subpackages="py2-kombu:py2 py3-kombu:py3"
-source="https://files.pythonhosted.org/packages/source/k/kombu/kombu-$pkgver.tar.gz"
-builddir="$srcdir/kombu-$pkgver"
+_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"
-	python2 setup.py build
+	cd "$builddir"
 	python3 setup.py build
+	cd "$builddir"-py2
+	python2 setup.py build
 }
 
-package() {
-	mkdir -p "$pkgdir"
+check() {
+	cd "$builddir"
+	python3 setup.py test
+	cd "$builddir"-py2
+	python2 setup.py test
 }
 
-_py() {
-        local python="$1"
-        pkgdesc="$pkgdesc ${python#python}"
-        depends="$depends $python"
-        install_if="$pkgname=$pkgver-r$pkgrel $python"
-
-        cd "$builddir"
-        $python setup.py install --prefix=/usr --root="$subpkgdir"
+package() {
+	mkdir -p "$pkgdir"
 }
 
-py2() {
-	cd "$builddir"
+_py2() {
+	depends="$_py2_deps"
+	cd "$builddir"-py2
 	_py python2
 }
 
-py3() {
+_py3() {
+	depends="$_py3_deps"
 	cd "$builddir"
 	_py python3
 }
 
-sha512sums="a480444199aeee4e0048803a49ee85f2b348734eccf0e746189ea7db3787cb27baa89765a71cf88288ec7171252d55e13bc787641a543d3f91d6eb3d30c6a90c  kombu-4.2.1.tar.gz"
+_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"
-- 
2.21.0
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Wed Apr 03 2019 - 16:27:14 UTC