psutil, bump version, enable builds (#10769)

This commit is contained in:
Schrijvers Luc
2024-07-30 07:37:40 +02:00
committed by GitHub
parent 1946dc2399
commit d398f3b4c1
2 changed files with 11 additions and 11 deletions

View File

@@ -0,0 +1,100 @@
SUMMARY="Cross-platform lib for process and system monitoring in Python"
DESCRIPTION="psutil (process and system utilities) is a cross-platform library
for retrieving information on running processes and system utilization
(CPU, memory, disks, network, sensors) in Python.
It is useful mainly for system monitoring, profiling and limiting process
resources and management of running processes.
It implements many functionalities offered by classic UNIX command line
tools such as ps, top, iotop, lsof, netstat, ifconfig, free and others."
HOMEPAGE="https://github.com/giampaolo/psutil/"
COPYRIGHT="2009 Giampaolo Rodola'"
LICENSE="BSD (3-clause)"
REVISION="1"
SOURCE_URI="https://github.com/giampaolo/psutil/archive/release-$portVersion.tar.gz"
CHECKSUM_SHA256="187588c10ff4804b91e0c947d6b1a4006dbb633261c0f869865de518603c5d5e"
SOURCE_DIR="psutil-release-$portVersion"
PATCHES="psutil-$portVersion.patchset"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
$portName = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:gcc$secondaryArchSuffix
"
PYTHON_PACKAGES=(python310)
PYTHON_VERSIONS=(3.10)
for i in "${!PYTHON_PACKAGES[@]}"; do
pythonPackage=${PYTHON_PACKAGES[i]}
pythonVersion=${PYTHON_VERSIONS[$i]}
eval "PROVIDES_${pythonPackage}=\"
${portName}_$pythonPackage = $portVersion
\""
if [ "$targetArchitecture" = x86_gcc2 ]; then
eval "PROVIDES_$pythonPackage+=\"
psutil_$pythonPackage = $portVersion
\""
fi
eval "REQUIRES_$pythonPackage=\"
haiku$secondaryArchSuffix
cmd:python$pythonVersion
\""
BUILD_REQUIRES+="
setuptools_$pythonPackage
"
BUILD_PREREQUIRES+="
cmd:python$pythonVersion
"
TEST_REQUIRES+="
cmd:make
"
done
INSTALL()
{
for i in "${!PYTHON_PACKAGES[@]}"; do
pythonPackage=${PYTHON_PACKAGES[i]}
pythonVersion=${PYTHON_VERSIONS[$i]}
python=python$pythonVersion
installLocation=$prefix/lib/$python/vendor-packages/
export PYTHONPATH=$installLocation:$PYTHONPATH
mkdir -p $installLocation
rm -rf build
$python setup.py build install \
--root=/ --prefix=$prefix
packageEntries $pythonPackage \
$prefix/lib/python*
done
}
TEST()
{
for i in "${!PYTHON_PACKAGES[@]}"; do
pythonPackage=${PYTHON_PACKAGES[i]}
pythonVersion=${PYTHON_VERSIONS[$i]}
python=python$pythonVersion
installLocation=$prefix/lib/$python/vendor-packages/
export PYTHONPATH=$installLocation:$PYTHONPATH
make test PYTHON=$python
done
}