# Contributor: Kaarle Ritvanen # Maintainer: Kaarle Ritvanen pkgname=py-babel _pkgname=Babel pkgver=2.3.4 pkgrel=2 pkgdesc="Python i18n tool" url="http://babel.pocoo.org/" arch="noarch" license="BSD" depends="py-tz" makedepends="python2-dev python3-dev py-setuptools" subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3" source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$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" } _py2() { replaces="$pkgname" depends="${depends//py-/py2-}" _py python2 } _py3() { depends="${depends//py-/py3-}" _py python3 } _py() { local python="$1" pkgdesc="$pkgdesc (for $python)" depends="$depends $python" install_if="$pkgname=$pkgver-r$pkgrel $python" cd "$builddir" $python setup.py install --prefix=/usr --root="$subpkgdir" } md5sums="afa20bc55b0e991833030129ad498f35 Babel-2.3.4.tar.gz" sha256sums="c535c4403802f6eb38173cd4863e419e2274921a01a8aad8a5b497c131c62875 Babel-2.3.4.tar.gz" sha512sums="1fdba01946e7a8ebe3fef23843e23707cd060b0a179d775e29f938318d824e8779df2852fb8bbd18f61fc47de33af5d988c509dc67f54ea4cb3a4a66767869a5 Babel-2.3.4.tar.gz"