aboutsummaryrefslogtreecommitdiffstats
path: root/community/py-gevent/APKBUILD
blob: 9fed54cc7b1cf484380e8a22f5c6c200f49723ca (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
# Maintainer: Michael Zhou <zhoumichaely@gmail.com>
# Contributor: Michael Zhou <zhoumichaely@gmail.com>
pkgname=py-gevent
_pkgname=${pkgname#py-}
pkgver=1.2.2
pkgrel=0
pkgdesc="Python library for seamless coroutine-based concurrency"
url="http://gevent.org/"
arch="all"
license="MIT"
depends="py-greenlet"
makedepends="python2-dev py-setuptools python3-dev libevent-dev file cython-dev"
subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
source="$pkgname-$pkgver.tar.gz::https://github.com/$_pkgname/$_pkgname/archive/$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 (for $python)"
	install_if="$pkgname=$pkgver-r$pkgrel $python"

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

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

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


sha512sums="4ec12e3e4feae6e90ad9c54265c7b748ebd0c010511738130156d14b8c7e84b8922ea0033218cd44cb8bbbfe5e5b30babdd8f9869e0c91bfb2552f935938f5c4  py-gevent-1.2.2.tar.gz"