desktop/python-psutil/PKGBUILD
2017-10-31 23:04:26 +01:00

43 lines
1.3 KiB
Bash

pkgbase=python-psutil
pkgname=('python3-psutil' 'python2-psutil')
pkgver=5.4.0
pkgrel=1
arch=('x86_64')
url='https://github.com/giampaolo/psutil'
license=('custom: BSD')
makedepends=('python3' 'python3-setuptools' 'python2' 'python2-setuptools')
source=("https://github.com/giampaolo/psutil/archive/release-$pkgver.tar.gz")
sha1sums=('0817acb5fb9dd87e8de1d48cf1f70934e28f20a7')
build() {
cd psutil-release-$pkgver
msg2 python3
python3 setup.py build --build-lib=build/python3
msg2 python2
python2 setup.py build --build-lib=build/python2
find build/python2 -type f -exec \
sed -i '1s,^#! \?/usr/bin/\(env \|\)python$,#!/usr/bin/python2,' {} \;
}
package_python3-psutil() {
pkgdesc='A cross-platform process and system utilities module for Python'
depends=('glibc' 'python3')
cd psutil-release-$pkgver
python3 setup.py build --build-lib=build/python3 \
install --root="${pkgdir}" --optimize=1
install -D -m 644 LICENSE "${pkgdir}/"usr/share/licenses/${pkgname}/LICENSE
}
package_python2-psutil() {
pkgdesc='A cross-platform process and system utilities module for Python2'
depends=('glibc' 'python2')
cd psutil-release-$pkgver
python2 setup.py build --build-lib=build/python2 \
install --root="${pkgdir}" --optimize=1
install -D -m 644 LICENSE "${pkgdir}/"usr/share/licenses/${pkgname}/LICENSE
}