aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorFrancesco Colista <fcolista@alpinelinux.org>2016-07-26 07:52:05 +0000
committerFrancesco Colista <fcolista@alpinelinux.org>2016-07-26 07:52:13 +0000
commit91e4f965fe84fc482cec29509da5f75ee5923f95 (patch)
treef89d57e19652d2a5e1c2fd9538df61e1861e2cd5 /main
parentd4ed411ab6ebdab946bad42980318e3a578b4d67 (diff)
downloadaports-91e4f965fe84fc482cec29509da5f75ee5923f95.tar.bz2
aports-91e4f965fe84fc482cec29509da5f75ee5923f95.tar.xz
main/py-libvirt: upgrade to 2.0.0
Diffstat (limited to 'main')
-rw-r--r--main/py-libvirt/APKBUILD41
1 files changed, 33 insertions, 8 deletions
diff --git a/main/py-libvirt/APKBUILD b/main/py-libvirt/APKBUILD
index 66b5468f85..867a09f509 100644
--- a/main/py-libvirt/APKBUILD
+++ b/main/py-libvirt/APKBUILD
@@ -1,32 +1,57 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=py-libvirt
_pkgname=libvirt-python
-pkgver=1.3.4
+pkgver=2.0.0
pkgrel=0
pkgdesc="The libvirt virtualization API python binding"
url="http://libvirt.org"
-arch="all"
+arch="noarch"
license="LGPLv2+"
depends=""
-makedepends="python-dev libvirt-dev"
+makedepends="python2-dev python3-dev libvirt-dev"
+subpackages="py3-${pkgname/py-/}:_py3 py2-${pkgname/py-/}:_py2"
source="http://libvirt.org/sources/python/$_pkgname-$pkgver.tar.gz
musl-gnuc-prereq.patch
"
builddir="$srcdir"/$_pkgname-$pkgver
+
build() {
cd "$builddir"
- python setup.py build || return 1
+ 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
+ python2 setup.py install --root=$pkgdir/ --optimize=1 || return 1
+ python3 setup.py install --root=$pkgdir/ --optimize=1 || return 1
+}
+
+
+_py() {
+ local python=$1
+ pkgdesc="$pkgdesc - $python"
+ arch="all"
+ install_if="$pkgname=$pkgver-r$pkgrel $python"
+ local dir=$($python -c 'import sysconfig; print(sysconfig.get_path("stdlib"))')
+
+ mkdir -p "$subpkgdir"${dir}
+ mv "$pkgdir"${dir}/* "$subpkgdir"${dir}
+}
+
+_py2() {
+ _py python2
+ replaces="$pkgname"
+}
+
+_py3() {
+ _py python3
}
-md5sums="4d2d5810e04b213be6aa667cdcc95ffd libvirt-python-1.3.4.tar.gz
+md5sums="abb00b282ad99074b0424829329150bf libvirt-python-2.0.0.tar.gz
51a120926a0c664e972f207215e4a7a0 musl-gnuc-prereq.patch"
-sha256sums="badd2f51b07d5b03be7c01c45d8f52fea181ba9386ced5b12241ffdcf7e4f7a7 libvirt-python-1.3.4.tar.gz
+sha256sums="7816cbc1c6ad140ba643b662825babb1ef586bd3ccfd0b04dfeba4ae2f2d1d40 libvirt-python-2.0.0.tar.gz
a3be754db64e05679d72587f60e7455a946c87102d591119c991765016a8b458 musl-gnuc-prereq.patch"
-sha512sums="18063021edf28b6c7b6b407590ec94eda45272c6b976ef560b4e81a8b212a5c7d2c1ce844e066855cda0a1bca4e98028936314c58e12261952783bd606501f59 libvirt-python-1.3.4.tar.gz
+sha512sums="695de54ab79d10900c44d2e12be422692da03436f5f89bd4020f3e114d250a94e13c61d112287f2d0d3d1dfadd7309af501d4226a12925c4295e4b3aae20d88c libvirt-python-2.0.0.tar.gz
8aa1d814f8388ebff0736ee138c780323381cd4cf39b4a4faed2e2a1fe5911facc34505a85b0977d8b4240b8ce2f4a6d0414790693c4f45ff7d9592e9d6a3ff8 musl-gnuc-prereq.patch"