# Contributor: Francesco Colista # Maintainer: Francesco Colista pkgname=py-psutil _pkgname=psutil pkgver=5.0.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 } md5sums="153dc8be94badc4072016ceeac7808dc psutil-5.0.1.tar.gz" sha256sums="9d8b7f8353a2b2eb6eb7271d42ec99d0d264a9338a37be46424d56b4e473b39e psutil-5.0.1.tar.gz" sha512sums="b455f84da45ee7bfe4d32479bf4c26e293e0d1f71315906677ef72d734bc5fbe4f763f3a140ecff0833f320fb617cac4993e93269365dcaafed606ba90067f79 psutil-5.0.1.tar.gz"