aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py-queuelib
diff options
context:
space:
mode:
authorFrancesco Colista <fcolista@alpinelinux.org>2016-07-27 12:23:54 +0000
committerFrancesco Colista <fcolista@alpinelinux.org>2016-07-27 13:14:32 +0000
commit79dc410b71bc41d103b377c938a540b687980afe (patch)
treedcf7f1b668d7c48a67f1eda8566be1ac3e5289e8 /testing/py-queuelib
parent4fd69a444cb1f66113d08df14e6073cf6feaec2e (diff)
downloadaports-79dc410b71bc41d103b377c938a540b687980afe.tar.bz2
aports-79dc410b71bc41d103b377c938a540b687980afe.tar.xz
testing/py-queuelib: improved APKBUILD, added support for python3 subpackage
Diffstat (limited to 'testing/py-queuelib')
-rw-r--r--testing/py-queuelib/APKBUILD48
1 files changed, 28 insertions, 20 deletions
diff --git a/testing/py-queuelib/APKBUILD b/testing/py-queuelib/APKBUILD
index 3953d729ce..2b099b9f20 100644
--- a/testing/py-queuelib/APKBUILD
+++ b/testing/py-queuelib/APKBUILD
@@ -3,39 +3,47 @@
pkgname=py-queuelib
_pkgname=queuelib
pkgver=1.4.2
-pkgrel=0
+pkgrel=1
pkgdesc="A collection of persistent (disk-based) queues"
url="https://github.com/scrapy/queuelib"
arch="noarch"
license="BSD"
-depends="python"
-depends_dev=""
-makedepends="python-dev py-setuptools"
+depends=""
+makedepends="python-dev python3-dev py-setuptools"
install=""
-subpackages=""
+subpackages="py3-$_pkgname:_py3 py2-$_pkgname:_py2"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
-
-_builddir="$srcdir"/$_pkgname-$pkgver
-prepare() {
- local i
- cd "$_builddir"
- for i in $source; do
- case $i in
- *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
- esac
- done
-}
+builddir="$srcdir"/$_pkgname-$pkgver
build() {
- cd "$_builddir"
- python setup.py build || return 1
+ cd "$builddir"
+ python2 setup.py build || return 1
+ python3 setup.py build || return 1
}
package() {
- cd "$_builddir"
- python setup.py install --prefix=/usr --root="$pkgdir" || return 1
+ mkdir -p "$pkgdir"
+}
+
+
+_py() {
+ local python=$1
+ pkgdesc="$pkgdesc - $python"
+
+ cd "$builddir"
+ $python setup.py install --prefix=/usr --root="$subpkgdir"
}
+_py2() {
+ _py python2
+ replaces="$pkgname"
+}
+
+_py3() {
+ _py python3
+}
+
+
md5sums="41f13f7d328fa6d2d4b47a7e9e30af5f queuelib-1.4.2.tar.gz"
sha256sums="a6829918157ed433fafa87b0bb1e93e3e63c885270166db5884a02c34c86f914 queuelib-1.4.2.tar.gz"
sha512sums="15157aa2586831a509d983731693016335916958aee6079b3b5cc02ce552048f1baeb3d876d9bd016e8bdb735af1ee03aca1750e73503e936e8ddf68bc8d50e0 queuelib-1.4.2.tar.gz"