# Contributor: Fabian Affolter # Maintainer: Fabian Affolter pkgname=py-colorlog _pkgname=colorlog pkgver=4.0.1 pkgrel=0 pkgdesc="A formatter for use with Python's logging module" url="https://github.com/borntyping/python-colorlog" arch="noarch" license="MIT" makedepends="python2-dev python3-dev py-setuptools" subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3" source="$_pkgname-$pkgver.tar.gz::https://github.com/borntyping/python-colorlog/archive/v$pkgver.tar.gz" builddir="$srcdir"/python-$_pkgname-$pkgver build() { cd "$builddir" python2 setup.py build python3 setup.py build } package() { mkdir -p "$pkgdir" } _py2() { replaces="$pkgname" _py python2 } _py3() { _py python3 } _py() { local python="$1" pkgdesc="$pkgdesc (for $python)" install_if="$pkgname=$pkgver-r$pkgrel $python" cd "$builddir" $python setup.py install --prefix=/usr --root="$subpkgdir" } sha512sums="885813ddd660106ee28ffe37ab29d00707f6e755be25708fd0cf2bedd1e62eafa6275a65a1012c5f11d0fd7bc61a26cb3ae430436030cd861ae82a19cfbfd7a9 colorlog-4.0.1.tar.gz"