aboutsummaryrefslogtreecommitdiffstats
path: root/main/py-musicbrainzngs
diff options
context:
space:
mode:
authordai9ah <dai9ah@protonmail.com>2018-02-21 15:33:26 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2018-03-05 23:22:17 +0000
commit172a67caf0de84e3a07c70f4d627dc478847708b (patch)
tree645bdb74aabc98b642963e8b9756a914b6a21cd6 /main/py-musicbrainzngs
parentaf6dff9d2cb4e7cc18c235432c356e05454d7201 (diff)
downloadaports-172a67caf0de84e3a07c70f4d627dc478847708b.tar.bz2
aports-172a67caf0de84e3a07c70f4d627dc478847708b.tar.xz
main/py-musicbrainzngs: add python3, fix license
Diffstat (limited to 'main/py-musicbrainzngs')
-rw-r--r--main/py-musicbrainzngs/APKBUILD35
1 files changed, 27 insertions, 8 deletions
diff --git a/main/py-musicbrainzngs/APKBUILD b/main/py-musicbrainzngs/APKBUILD
index b16a45ac07..ca22b13388 100644
--- a/main/py-musicbrainzngs/APKBUILD
+++ b/main/py-musicbrainzngs/APKBUILD
@@ -1,27 +1,46 @@
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer:
pkgname=py-musicbrainzngs
-_pkgname=musicbrainzngs
+_pkgname=${pkgname#py-}
pkgver=0.6
-pkgrel=0
+pkgrel=1
pkgdesc="Bindings for the MusicBrainz NGS service"
url="https://github.com/alastair/python-musicbrainzngs"
arch="noarch"
-license="BSD"
-depends="python2"
-makedepends="python2-dev py-setuptools"
-source="https://files.pythonhosted.org/packages/source/m/musicbrainzngs/musicbrainzngs-$pkgver.tar.gz"
-
+license="BSD-2-Clause ISC"
+depends="python2 python3"
+makedepends="python2-dev python3-dev py-setuptools"
+subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
+source="https://files.pythonhosted.org/packages/source/m/$_pkgname/$_pkgname-$pkgver.tar.gz"
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="e71e8cfb72fa7d94f79bba2febe3149bd770b27ccd89cc15fb204e239babdd1e3c0f29c4e7abe49099bde1db06474fafa8add8a0a2d9e3d9bb984f4a13fa6227 musicbrainzngs-0.6.tar.gz"