aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorAndré Klitzing <aklitzing@gmail.com>2017-03-27 19:58:59 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2017-04-10 11:21:39 +0000
commit60455f2cfb96156879624d646ff46e3bbb5f2cee (patch)
tree7e523475c8b15d339689c27af4d07dba6fb90ccf /main
parentd6a8d0cc3700f0cbdac85d49d1d9e38d761f4132 (diff)
downloadaports-60455f2cfb96156879624d646ff46e3bbb5f2cee.tar.bz2
aports-60455f2cfb96156879624d646ff46e3bbb5f2cee.tar.xz
main/py-pylast: upgrade to 1.8.0
* Modernize abuild * Add support for python3
Diffstat (limited to 'main')
-rw-r--r--main/py-pylast/APKBUILD50
1 files changed, 27 insertions, 23 deletions
diff --git a/main/py-pylast/APKBUILD b/main/py-pylast/APKBUILD
index 82fc242efb..370884fcbf 100644
--- a/main/py-pylast/APKBUILD
+++ b/main/py-pylast/APKBUILD
@@ -1,40 +1,44 @@
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer:
pkgname=py-pylast
-pkgver=1.1.0
+pkgver=1.8.0
pkgrel=0
pkgdesc="A Python interface to the last.fm API"
url="https://github.com/pylast/pylast"
arch="noarch"
license="Apache"
-depends="python2"
-depends_dev=""
-makedepends="python2-dev py-setuptools"
-install=""
-subpackages=""
+makedepends="python2-dev py-setuptools python3-dev"
+subpackages="py3-${pkgname#py-}:_py3 py2-${pkgname#py-}:_py2"
source="https://files.pythonhosted.org/packages/source/p/pylast/pylast-$pkgver.tar.gz"
-
-_builddir="$srcdir"/pylast-$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"/pylast-$pkgver
build() {
- cd "$_builddir"
+ cd "$builddir"
python2 setup.py build || return 1
+ python3 setup.py build || return 1
}
package() {
- cd "$_builddir"
- python2 setup.py install --prefix=/usr --root="$pkgdir" || return 1
+ mkdir -p "$pkgdir"
+}
+
+_py() {
+ local python="$1"
+ pkgdesc="$pkgdesc (for $python)"
+ depends="$python"
+ install_if="$pkgname=$pkgver-r$pkgrel $python"
+
+ cd "$builddir"
+ $python setup.py install --prefix=/usr --root="$subpkgdir"
+}
+
+_py2() {
+ replaces="$pkgname"
+ _py python2
+}
+
+_py3() {
+ _py python3
}
-md5sums="a8529f07bb6c935777236affd67ea976 pylast-1.1.0.tar.gz"
-sha256sums="f7da6f8f5c02bff18e4600ad7d44b7d82cbf78d3a9b09c33e168def4280953ce pylast-1.1.0.tar.gz"
-sha512sums="61fd99597582b14b62e8c931a68d296a5a30dfc732112ee5fca6c7061f7a4fa391ea76520699278d89d2ee121dfbf1805eb925c176fc48704add8374fceb95ab pylast-1.1.0.tar.gz"
+sha512sums="512a0d7e9f4ade42c7b252be2ba422c116188610d9a9c326d6a5ae79858478119262d627f6cdfecc2fb73d4e1304f33caba621685350bcb8287674dfda2a17c2 pylast-1.8.0.tar.gz"