2014-08-28 03:06:56 +08:00
|
|
|
pkgbase=python-psutil
|
|
|
|
pkgname=('python3-psutil' 'python2-psutil')
|
2015-12-11 18:27:44 +08:00
|
|
|
pkgver=3.3.0
|
2014-08-28 03:06:56 +08:00
|
|
|
pkgrel=1
|
|
|
|
arch=('x86_64')
|
2015-09-03 23:07:19 +08:00
|
|
|
url='https://github.com/giampaolo/psutil'
|
2014-08-28 03:06:56 +08:00
|
|
|
license=('custom: BSD')
|
2015-09-03 23:07:19 +08:00
|
|
|
makedepends=('python3' 'python3-setuptools' 'python2' 'python2-setuptools' 'python2-mock' 'python3-mock')
|
2014-08-28 03:06:56 +08:00
|
|
|
checkdepends=('net-tools' 'procps-ng')
|
|
|
|
source=("https://pypi.python.org/packages/source/p/psutil/psutil-${pkgver}.tar.gz")
|
2015-12-11 18:27:44 +08:00
|
|
|
sha256sums=('421b6591d16b509aaa8d8c15821d66bb94cb4a8dc4385cad5c51b85d4a096d85')
|
2014-08-28 03:06:56 +08:00
|
|
|
|
|
|
|
build() {
|
|
|
|
cd psutil-${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,' {} \;
|
|
|
|
}
|
|
|
|
|
|
|
|
check() {
|
|
|
|
cd psutil-${pkgver}
|
|
|
|
|
|
|
|
msg2 python3
|
|
|
|
export PYTHONPATH="$PWD/build/python3"
|
|
|
|
#python test/test_psutil.py
|
|
|
|
python3 test/test_memory_leaks.py
|
|
|
|
|
|
|
|
msg2 python2
|
|
|
|
export PYTHONPATH="$PWD/build/python2"
|
|
|
|
#python2 test/test_psutil.py
|
|
|
|
python2 test/test_memory_leaks.py
|
|
|
|
}
|
|
|
|
|
|
|
|
package_python3-psutil() {
|
|
|
|
pkgdesc='A cross-platform process and system utilities module for Python'
|
|
|
|
depends=('glibc' 'python3')
|
|
|
|
|
|
|
|
cd psutil-${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-${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
|
|
|
|
}
|