# Contributor: Matt Dainty # Maintainer: TBK pkgname=py-cheetah _pkgreal=${pkgname#py-} _pkgname=Cheetah3 pkgver=3.0.0 pkgrel=0 pkgdesc="Cheetah is a template engine and code generation tool" url="http://www.cheetahtemplate.org/" arch="all" license="MIT" makedepends="python2-dev python3-dev py-setuptools" subpackages="py3-$_pkgreal:_py3 py2-$_pkgreal:_py2" 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 python3 setup.py build } check() { cd "$builddir" python2 setup.py check python3 setup.py check } 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="861356cbb0cc5c698eecce6b0393cd16658748f372c731d3ed9bfa1741c5bdb209d350561bafba8fc3cf96c0d1a7f00e9caa1d7367e228d50710ba803a47383c Cheetah3-3.0.0.tar.gz"