# Contributor: Francesco Colista # Maintainer: Francesco Colista pkgname=py-psutil _pkgname=psutil pkgver=5.0.0 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.zip" 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="362a03686ce36940d22a548ecb47d7e0 psutil-5.0.0.zip" sha256sums="5411e22c63168220f4b8cc42fd05ea96f5b5e65e08b93b675ca50653aea482f8 psutil-5.0.0.zip" sha512sums="fda1e6b0a1d54943ceb6e94b4f892d3a3758d947589fd2ada5631f9cfffec4ab7925632d814572cef527b437ea24e0a37244475d634fe86cc0daf5adc2933b27 psutil-5.0.0.zip"