aboutsummaryrefslogtreecommitdiffstats
path: root/community/py-gevent/APKBUILD
blob: 4edc29cd8a6f6ad9d4783d9f4da845c589640114 (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.0
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="ec6d05d3387331f9688cd7057f71ef0ad249ef2b33b6ecc54275ffd8105b61ad5fbfe730c0c2993d74610fb0e901407a73e07881a3038c0538dd3327d78c93b3  py-gevent-1.2.0.tar.gz"