# Contributor: Francesco Colista # Maintainer: Francesco Colista pkgname=py-termcolor _pkgname=termcolor pkgver=1.1.0 pkgrel=2 pkgdesc="ANSII Color formatting for output in terminal." url="http://pypi.python.org/pypi/termcolor" arch="noarch" license="MIT" depends="" makedepends="python2-dev python3-dev" install="" subpackages="py3-$_pkgname:_py3 py2-$_pkgname:_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 || return 1 python3 setup.py build || return 1 } package() { cd "$builddir" python2 setup.py install --root=$pkgdir/ --optimize=1 || return 1 python3 setup.py install --root=$pkgdir/ --optimize=1 || return 1 } _py() { local python=$1 pkgdesc="$pkgdesc - $python" install_if="$pkgname=$pkgver-r$pkgrel $python" local dir=$($python -c 'import sysconfig; print(sysconfig.get_path("stdlib"))') mkdir -p "$subpkgdir"${dir} mv "$pkgdir"${dir}/* "$subpkgdir"${dir} } _py2() { _py python2 } _py3() { _py python3 } md5sums="043e89644f8909d462fbbfa511c768df termcolor-1.1.0.tar.gz" sha256sums="1d6d69ce66211143803fbc56652b41d73b4a400a2891d7bf7a1cdf4c02de613b termcolor-1.1.0.tar.gz" sha512sums="4bd06bf4405a9ef6c005cd4d159ef602f7fc7fccb3e57586da1187c402f4d0b9051ef930cae423065c51ff4be8a22ceae556a61a6b3c8c519d623c066c340b53 termcolor-1.1.0.tar.gz"