From 1fa99e3ad7ec97ffd0d91a9b9e0957cf242aeebe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= Date: Fri, 22 Dec 2023 13:33:44 -0300 Subject: [PATCH] python3-psutil: update to 5.9.7, add check. --- srcpkgs/python3-psutil/template | 50 +++++++++++++++++++++++++++++---- 1 file changed, 44 insertions(+), 6 deletions(-) diff --git a/srcpkgs/python3-psutil/template b/srcpkgs/python3-psutil/template index 936f1b99fb9..b2b6d73c3b3 100644 --- a/srcpkgs/python3-psutil/template +++ b/srcpkgs/python3-psutil/template @@ -1,20 +1,58 @@ # Template file for 'python3-psutil' pkgname=python3-psutil -version=5.9.6 +version=5.9.7 revision=1 -build_style=python3-module -hostmakedepends="python3-setuptools" +build_style=python3-pep517 +# Failing tests: see https://github.com/giampaolo/psutil/issues/2043 +make_check_args="--import-mode=importlib + --deselect psutil/tests/test_contracts.py::TestFetchAllProcesses::test_all + --deselect psutil/tests/test_linux.py::TestProcess::test_exe_mocked + --deselect psutil/tests/test_linux.py::TestRootFsDeviceFinder::test_against_findmnt + --deselect psutil/tests/test_linux.py::TestSystemVirtualMemoryAgainstFree::test_used + --deselect psutil/tests/test_linux.py::TestSystemVirtualMemoryAgainstVmstat::test_used + --deselect psutil/tests/test_misc.py::TestCommonModule::test_debug + --deselect psutil/tests/test_process.py::TestProcess::test_terminal + --deselect psutil/tests/test_system.py::TestDiskAPIs::test_disk_partitions + --deselect psutil/tests/test_system.py::TestMiscAPIs::test_users" +hostmakedepends="python3-setuptools python3-wheel" makedepends="python3-devel" depends="python3" +# two tests use `util-linux` (findmnt), but it conflicts `chroot-util-linux` +checkdepends="python3-pytest procps-ng inetutils-ifconfig" short_desc="Cross-platform process and system utilities module for Python3" maintainer="skmpz " license="BSD-3-Clause" homepage="https://github.com/giampaolo/psutil" changelog="https://raw.githubusercontent.com/giampaolo/psutil/master/HISTORY.rst" distfiles="${PYPI_SITE}/p/psutil/psutil-${version}.tar.gz" -checksum=e4b92ddcd7dd4cdd3f900180ea1e104932c7bce234fb88976e2a3b296441225a -# Tests seem to assume package is installed -make_check=no +checksum=3f02134e82cfb5d089fddf20bb2e03fd5cd52395321d1c8458a9e58500ff417c + +if [ "$XBPS_TARGET_LIBC" = "musl" ]; then + # This test fails because RLIMIT_RTTIME is n/a in musl 1.1 + make_check_args+=" --deselect + psutil/tests/test_contracts.py::TestAvailConstantsAPIs::test_rlimit" +fi + +if [ "$XBPS_BUILD_ENVIRONMENT" = void-packages-ci ]; then + # Tests that fail on CI; the first one actually hangs! + make_check_args+=" + --deselect psutil/tests/test_process.py::TestProcess::test_wait_non_children + --deselect psutil/tests/test_linux.py::TestRootFsDeviceFinder::test_comparisons + --deselect psutil/tests/test_linux.py::TestRootFsDeviceFinder::test_disk_partitions_mocked + --deselect psutil/tests/test_process.py::TestProcess::test_children_recursive + --deselect psutil/tests/test_process.py::TestProcess::test_oneshot_cache + --deselect psutil/tests/test_process.py::TestProcess::test_parent_multi + --deselect psutil/tests/test_process.py::TestProcess::test_parents + --deselect psutil/tests/test_process.py::TestProcess::test_parents_and_children + --deselect psutil/tests/test_process.py::TestProcess::test_zombie_process + --deselect psutil/tests/test_testutils.py::TestProcessUtils::test_reap_children + --deselect psutil/tests/test_testutils.py::TestProcessUtils::test_spawn_children_pair + --deselect psutil/tests/test_testutils.py::TestProcessUtils::test_spawn_zombie + --deselect psutil/tests/test_testutils.py::TestProcessUtils::test_terminate + --deselect psutil/tests/test_testutils.py::TestMemLeakClass::test_leak_mem + --deselect psutil/tests/test_process.py::TestPopen::test_misc + " +fi post_install() { rm -r ${DESTDIR}/${py3_sitelib}/psutil/tests/