# Contributor: Fabian Affolter # Maintainer: Fabian Affolter pkgname=py-colorama _pkgname=colorama pkgver=0.3.7 pkgrel=2 pkgdesc="Simple cross-platform colored terminal text" url="http://www.cherrypy.org" arch="noarch" license="BSD" 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" _py python2 } _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="349d2b02618d3d39e5c6aede36fe3c1a colorama-0.3.7.tar.gz" sha256sums="e043c8d32527607223652021ff648fbb394d5e19cba9f1a698670b338c9d782b colorama-0.3.7.tar.gz" sha512sums="4d6241afbcbc82c4451911587fd6a54ab1ecb43ca113f465b6966ceb44c79f074220317c249055e28b7023b90a5015819a8048ed11bcc1feb85a2d36df15f3cf colorama-0.3.7.tar.gz"