# Maintainer: Francesco Colista pkgname=py-libvirt _pkgname=libvirt-python pkgver=5.7.0 pkgrel=0 pkgdesc="The libvirt virtualization API python binding" url="http://libvirt.org" arch="all" license="LGPL-2.0-or-later" makedepends="python2-dev python3-dev libvirt-dev" subpackages="py3-${pkgname#py-}:_py3 py2-${pkgname#py-}:_py2" source="https://libvirt.org/sources/python/$_pkgname-$pkgver.tar.gz musl-gnuc-prereq.patch " builddir="$srcdir/$_pkgname-$pkgver" check() { cd "$builddir" python2 setup.py check python3 setup.py check } build() { cd "$builddir" python2 setup.py build python3 setup.py build } package() { mkdir -p "$pkgdir" } _py() { local python="$1" pkgdesc="$pkgdesc (for $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 } sha512sums="578e54778dfb4a9d0ac6d7330146976c765d888c3ad30c7990e52cf9815b19b2a6581eb7a3d0e21e9e80496f5a002b9c529cf2d3a8ef0f41c7931a0cb24aa732 libvirt-python-5.7.0.tar.gz 8aa1d814f8388ebff0736ee138c780323381cd4cf39b4a4faed2e2a1fe5911facc34505a85b0977d8b4240b8ce2f4a6d0414790693c4f45ff7d9592e9d6a3ff8 musl-gnuc-prereq.patch"