# Maintainer: Peter Bui pkgname=py-vobject _pkgname=vobject pkgver=0.9.4.1 pkgrel=0 pkgdesc="Module for parsing and generating vCard and vCalendar files" url="http://eventable.github.io/vobject/" arch="noarch" license="Apache" depends="py-dateutil py-icu" makedepends="python2-dev py-setuptools python3-dev" subpackages="py3-${pkgname#py-}:_py3 py2-${pkgname#py-}:_py2" source="$pkgname-$pkgver.tar.gz::https://github.com/eventable/$_pkgname/archive/$pkgver.tar.gz" builddir="$srcdir"/$_pkgname-$pkgver build() { cd "$builddir" python2 setup.py build || return 1 python3 setup.py build || return 1 } package() { 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 } sha512sums="8c6a78efa93bdf30b69d2b11ef5cf575a489efb7d131ec3870de6fcda8717575b34041036d414801700507f65ceb41ed2a13b8eb2f420aeae2d563ef3aaa791a py-vobject-0.9.4.1.tar.gz"