# Template file for 'python-pystache' pkgname=python-pystache version=0.5.4 revision=6 wrksrc="pystache-${version}" build_style=python-module pycompile_module="pystache" hostmakedepends="python-setuptools python3-setuptools" depends="python-setuptools" short_desc="Python2 implementation of Mustache" maintainer="John " license="MIT" homepage="https://github.com/defunkt/pystache" distfiles="${PYPI_SITE}/p/pystache/pystache-${version}.tar.gz" checksum=f7bbc265fb957b4d6c7c042b336563179444ab313fb93a719759111eabd3b85a alternatives="pystache:pystache:/usr/bin/pystache2" do_build() { # This is pure python, no need for cross antics python2.7 setup.py build --build-base=build-2.7 # Convert py2 syntax to py3 since setuptools no longer does it 2to3-${py3_ver} -w pystache python3 setup.py build --build-base=build-${py3_ver} } post_install() { vlicense LICENSE } python3-pystache_package() { pycompile_module="pystache" depends="python3-setuptools" short_desc="${short_desc/Python2/Python3}" alternatives="pystache:pystache:/usr/bin/pystache2" pkg_install() { vmove "usr/lib/python3*" vmove "usr/bin/*3" vlicense LICENSE } }