# Contributor: André Klitzing # Maintainer: André Klitzing pkgname=py-pyutilib _pkgname=PyUtilib pkgver=5.7.0 pkgrel=0 pkgdesc="A collection of Python utilities" url="https://pypi.org/project/PyUtilib/" arch="noarch" license="BSD" makedepends="python2-dev py-setuptools python3-dev" subpackages="py3-${pkgname#py-}:_py3 py2-${pkgname#py-}:_py2" source="https://files.pythonhosted.org/packages/source/p/pyutilib/$_pkgname-$pkgver.tar.gz" options="!check" # no upstream tests builddir="$srcdir/$_pkgname-$pkgver" build() { cd "$builddir" python2 setup.py build python3 setup.py build } package() { mkdir -p "$pkgdir" } _py() { local python="$1" pkgdesc="$pkgdesc (for $python)" depends="$python" install_if="$pkgname=$pkgver-r$pkgrel $python" cd "$builddir" $python setup.py install --prefix=/usr --root="$subpkgdir" } _py2() { replaces="$pkgname" _py python2 } _py3() { _py python3 } sha512sums="d82ee4fd68464f33087705c57dcdf45382efb138ef6268634e239a4b90bb9dcb8c4396230ff5f73188108e723f82c421a037017e8e724fa81c47c200df7237d4 PyUtilib-5.7.0.tar.gz"