aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--community/py-gevent/APKBUILD50
-rw-r--r--testing/py-gevent/APKBUILD28
2 files changed, 50 insertions, 28 deletions
diff --git a/community/py-gevent/APKBUILD b/community/py-gevent/APKBUILD
new file mode 100644
index 0000000000..2de49a0e14
--- /dev/null
+++ b/community/py-gevent/APKBUILD
@@ -0,0 +1,50 @@
+# Maintainer: Michael Zhou <zhoumichaely@gmail.com>
+# Contributor: Michael Zhou <zhoumichaely@gmail.com>
+pkgname=py-gevent
+_pkgname=${pkgname#py-}
+pkgver=1.1.2
+pkgrel=0
+pkgdesc="Python library for seamless coroutine-based concurrency"
+url="http://gevent.org/"
+arch="noarch"
+license="MIT"
+depends=""
+makedepends="python2-dev py-setuptools python3-dev libevent-dev file"
+subpackages="py3-${pkgname/py-/}:_py3 py2-${pkgname/py-/}:_py2"
+source="https://github.com/gevent/gevent/releases/download/v$pkgver/$_pkgname-$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 - $python"
+ arch="all"
+ install_if="$pkgname=$pkgver-r$pkgrel $python"
+ cd "$builddir"
+ $python setup.py install --prefix=/usr --root="$subpkgdir"
+}
+
+_py2() {
+ _py python2
+ replaces="$pkgname"
+ depends="py2-greenlet"
+}
+
+_py3() {
+ _py python3
+ depends="py3-greenlet"
+}
+
+
+md5sums="bb32a2f852a4997138014d5007215c6e gevent-1.1.2.tar.gz"
+sha256sums="cb15cf73d69a2eeefed330858f09634e2c50bf46da9f9e7635730fcfb872c02c gevent-1.1.2.tar.gz"
+sha512sums="6b0a381486b0d8eaf446890bc6339ee1185ad666c11c8d56e25d148f8c6f2d7be955423c763486d1276d8d34cec933706eb3752b0894b3f5444f93fafd62cf3c gevent-1.1.2.tar.gz"
diff --git a/testing/py-gevent/APKBUILD b/testing/py-gevent/APKBUILD
deleted file mode 100644
index 53880f7264..0000000000
--- a/testing/py-gevent/APKBUILD
+++ /dev/null
@@ -1,28 +0,0 @@
-# Maintainer: Michael Zhou <zhoumichaely@gmail.com>
-# Contributor: Michael Zhou <zhoumichaely@gmail.com>
-pkgname=py-gevent
-_pkgname=${pkgname#py-}
-pkgver=1.1.1
-pkgrel=0
-pkgdesc="Python library for seamless coroutine-based concurrency"
-url="http://gevent.org/"
-arch="all"
-license="MIT"
-depends="py-greenlet"
-makedepends="python-dev py-setuptools libevent-dev"
-source="https://github.com/gevent/gevent/releases/download/v$pkgver/$_pkgname-$pkgver.tar.gz"
-builddir="$srcdir/$_pkgname-$pkgver"
-
-build () {
- cd "$builddir"
- python setup.py build
-}
-
-package() {
- cd "$builddir"
- python setup.py install --root="$pkgdir"
-}
-
-md5sums="1532f5396ab4d07a231f1935483be7c3 gevent-1.1.1.tar.gz"
-sha256sums="6ee5b9851b2acde08df7ab9b9a2903f58b4b0e555405c444f4b1dd16f71caeea gevent-1.1.1.tar.gz"
-sha512sums="b6342249695232532824f8ba643c4727bc409f9869aca7c26f95f8d6cb09c8fbd4ad7b04f7b4f37db9ac11e1d824a9bf9b67bf393fe183afc1b21c68959e4f78 gevent-1.1.1.tar.gz"