aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py-audioread/APKBUILD
diff options
context:
space:
mode:
authordai9ah <dai9ah@protonmail.com>2018-02-26 19:03:09 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2018-03-05 23:29:49 +0000
commit506315f212b80b30bd186797cb82c568e6d9078c (patch)
tree0a62afeb6a645f488ec6bb55b9dddb9bb51188fd /testing/py-audioread/APKBUILD
parent81151831a1d0d9a1514993ec207f31d04ff878d7 (diff)
downloadaports-506315f212b80b30bd186797cb82c568e6d9078c.tar.bz2
aports-506315f212b80b30bd186797cb82c568e6d9078c.tar.xz
testing/py-audioread: add python3
Diffstat (limited to 'testing/py-audioread/APKBUILD')
-rw-r--r--testing/py-audioread/APKBUILD29
1 files changed, 25 insertions, 4 deletions
diff --git a/testing/py-audioread/APKBUILD b/testing/py-audioread/APKBUILD
index fb0578dd5b..b34fc249ca 100644
--- a/testing/py-audioread/APKBUILD
+++ b/testing/py-audioread/APKBUILD
@@ -3,13 +3,15 @@
pkgname=py-audioread
_pkgname=audioread
pkgver=2.1.5
-pkgrel=0
+pkgrel=1
pkgdesc="Cross-library audio decoding for Python"
url="https://github.com/sampsyo/audioread"
arch="noarch"
license="MIT"
-depends="python2"
-makedepends="python2-dev"
+depends="python2 python3"
+makedepends="python2-dev python3-dev"
+subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
+options="!check" # upstream provides no testsuite
source="https://files.pythonhosted.org/packages/source/a/audioread/audioread-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"
@@ -17,11 +19,30 @@ builddir="$srcdir/$_pkgname-$pkgver"
build() {
cd "$builddir"
python2 setup.py build
+ python3 setup.py build
}
package() {
+ mkdir -p "$pkgdir"
+}
+
+_py2() {
+ replaces="$pkgname"
+ _py python2
+}
+
+_py3() {
+ _py python3
+}
+
+_py() {
+ local python="$1"
+ pkgdesc="$pkgdesc (for $python)"
+ depends="$depends $python"
+ install_if="$pkgname=$pkgver-r$pkgrel $python"
+
cd "$builddir"
- python2 setup.py install --prefix=/usr --root="$pkgdir"
+ $python setup.py install --prefix=/usr --root="$subpkgdir"
}
sha512sums="7589b03f9f4b11475e97ab9d114ab1bf08be8e5f9d20f3db70c9d421607f99ed66747a65d1b5e124595e520ab698e17ae9fb9a2eb453ee904ee2b6debf8b3a5c audioread-2.1.5.tar.gz"