# Contributor: Kaarle Ritvanen # Maintainer: Kaarle Ritvanen pkgname=py-babel _pkgname=Babel pkgver=2.7.0 pkgrel=0 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" } sha512sums="96314c7b26f6915a825e0344fa06e4f1d9a71b97a52b16f2f696c2e81c69318974547620135912b11edb95668a717ec49f1be68eef5a4753092d8e4cdc39a1e5 Babel-2.7.0.tar.gz"