blob: 72e1183adc01f699a8256bbb8c534d04bb1bbcd0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=py-psutil
_pkgname=psutil
pkgver=4.3.0
pkgrel=1
pkgdesc="A cross-platform process and system utilities module for Python"
url="https://github.com/giampaolo/psutil"
arch="noarch"
license="BSD"
depends=""
depends_dev=""
makedepends="$depends_dev linux-headers python-dev python3-dev"
install=""
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"
python setup.py build || return 1
python3 setup.py build || return 1
}
package() {
cd "$builddir"
python setup.py install --root=$pkgdir/ --optimize=1 || return 1
python3 setup.py install --root=$pkgdir/ --optimize=1 || return 1
}
_py() {
local python=$1
pkgdesc="$pkgdesc - $python"
arch="all"
install_if="$pkgname=$pkgver-r$pkgrel $python"
local dir=$($python -c 'import sysconfig; print(sysconfig.get_path("stdlib"))')
mkdir -p "$subpkgdir"${dir}
mv "$pkgdir"${dir}/* "$subpkgdir"${dir}
}
_py2() {
_py python2
replaces="$pkgname"
}
_py3() {
_py python3
}
md5sums="ca97cf5f09c07b075a12a68b9d44a67d psutil-4.3.0.tar.gz"
sha256sums="86197ae5978f216d33bfff4383d5cc0b80f079d09cf45a2a406d1abb5d0299f0 psutil-4.3.0.tar.gz"
sha512sums="84286e989375545f609ef2847feff64d49b0397781cad30da5fa555f02807c97b4f0721f2a79f46c4bee754c93c57c8ea94b435920c1ecc8c46fe4f663444593 psutil-4.3.0.tar.gz"
|