# Contributor: Francesco Colista # Maintainer: Francesco Colista pkgname=py-psutil _pkgname=psutil pkgver=5.2.1 pkgrel=0 pkgdesc="A cross-platform process and system utilities module for Python" url="https://github.com/giampaolo/psutil" arch="all" license="BSD" depends="" makedepends="$depends_dev linux-headers python2-dev python3-dev" 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() { mkdir -p "$pkgdir" } _py() { local python="$1" pkgdesc="$pkgdesc - $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="7fda5646e82cc9b13f279e318507024c68daa74b806fdc411763ae34935f2e8b44e3f3217639d85c6d43a6b862113de3694ec911773170235e21ad580ca0807a psutil-5.2.1.tar.gz"