commit:     f9083ba45948a338c45d8a807c270b414f51636a
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Jul  7 20:20:25 2022 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Jul  7 20:20:48 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f9083ba4

dev-python/psutil: Remove old

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/psutil/Manifest                       |   1 -
 dev-python/psutil/files/psutil-5.9.0-tests.patch | 298 -----------------------
 dev-python/psutil/psutil-5.9.0.ebuild            |  40 ---
 3 files changed, 339 deletions(-)

diff --git a/dev-python/psutil/Manifest b/dev-python/psutil/Manifest
index cbdc36c11b5e..fef27f7b5aff 100644
--- a/dev-python/psutil/Manifest
+++ b/dev-python/psutil/Manifest
@@ -1,3 +1,2 @@
-DIST psutil-5.9.0.tar.gz 478322 BLAKE2B 
763c8ae14ae546bed64a360047d2ce38783e9e7e939160f751c4ccc94b8e023aaa4cdca426f584e05dae8b1326333660e216d7cb3edd820e24a931dddfa5160f
 SHA512 
b521cfce51e90fdf87ba19bf8069877e3210aede92c17460ea0b00324a36e133168e4bff550462d07ab6d93c597c6560d68954340031ff43168d54a8e5d4c4e7
 DIST psutil-5.9.1-tests-r2.patch.xz 3516 BLAKE2B 
6a16d6f89fdeb06c7aa0d9d986eba84deae5f8d2bb829c2509744f954f9b274d8a70a00f94127f1880cea71f8d7e7b85097517f8516ee6ef14f17522ee9297b2
 SHA512 
b69efb32cd0229056ff9fbbde963f0f01f6bf1d0820f028527f464e38a9bd4211a55bd725cc8962a20608c12c28edb24b2063f5f58b53fdb6b001fe2f95da103
 DIST psutil-5.9.1.tar.gz 479090 BLAKE2B 
88f35a9134d942fa56b5fbc79753e82245c3bfdb1f640dbf3b56815b89d872517f9ee3a3945532ebd1a399c3307e160ac80394766c3b2cc7e3fb36ffdd555eef
 SHA512 
1ddb119a10243d17d808417817ec8659d22447f12a4bbc0366c13f6587a4b0b59f4e74f6ac5d1e1a908bb5fd287be630466d32beabcb5008f6a19c24a1557c27

diff --git a/dev-python/psutil/files/psutil-5.9.0-tests.patch 
b/dev-python/psutil/files/psutil-5.9.0-tests.patch
deleted file mode 100644
index 6dcf6f240e41..000000000000
--- a/dev-python/psutil/files/psutil-5.9.0-tests.patch
+++ /dev/null
@@ -1,298 +0,0 @@
-diff --git a/psutil/tests/__init__.py b/psutil/tests/__init__.py
-index 21bb3e61..6c45c9e0 100644
---- a/psutil/tests/__init__.py
-+++ b/psutil/tests/__init__.py
-@@ -88,6 +88,7 @@ __all__ = [
-     "HAS_IONICE", "HAS_MEMORY_MAPS", "HAS_PROC_CPU_NUM", "HAS_RLIMIT",
-     "HAS_SENSORS_BATTERY", "HAS_BATTERY", "HAS_SENSORS_FANS",
-     "HAS_SENSORS_TEMPERATURES", "HAS_MEMORY_FULL_INFO",
-+    "GENTOO_TESTING",
-     # subprocesses
-     'pyrun', 'terminate', 'reap_children', 'spawn_testproc', 'spawn_zombie',
-     'spawn_children_pair',
-@@ -128,6 +129,7 @@ PYPY = '__pypy__' in sys.builtin_module_names
- APPVEYOR = 'APPVEYOR' in os.environ
- GITHUB_ACTIONS = 'GITHUB_ACTIONS' in os.environ or 'CIBUILDWHEEL' in 
os.environ
- CI_TESTING = APPVEYOR or GITHUB_ACTIONS
-+GENTOO_TESTING = "GENTOO_TESTING" in os.environ
- # are we a 64 bit process?
- IS_64BIT = sys.maxsize > 2 ** 32
- 
-diff --git a/psutil/tests/test_linux.py b/psutil/tests/test_linux.py
-index 20e28d29..c21d0aec 100755
---- a/psutil/tests/test_linux.py
-+++ b/psutil/tests/test_linux.py
-@@ -14,6 +14,7 @@ import errno
- import glob
- import io
- import os
-+import platform
- import re
- import shutil
- import socket
-@@ -28,6 +29,7 @@ from psutil._compat import PY3
- from psutil._compat import FileNotFoundError
- from psutil._compat import basestring
- from psutil._compat import u
-+from psutil.tests import GENTOO_TESTING
- from psutil.tests import GITHUB_ACTIONS
- from psutil.tests import GLOBAL_TIMEOUT
- from psutil.tests import HAS_BATTERY
-@@ -688,6 +690,7 @@ class TestSystemCPUCountLogical(PsutilTestCase):
-         num = len([x for x in out.split('\n') if not x.startswith('#')])
-         self.assertEqual(psutil.cpu_count(logical=True), num)
- 
-+    @unittest.skipIf(GENTOO_TESTING and 
platform.machine().startswith("sparc"), "broken on Gentoo/SPARC")
-     def test_emulate_fallbacks(self):
-         import psutil._pslinux
-         original = psutil._pslinux.cpu_count_logical()
-@@ -735,6 +738,7 @@ class TestSystemCPUCountCores(PsutilTestCase):
-                 core_ids.add(fields[1])
-         self.assertEqual(psutil.cpu_count(logical=False), len(core_ids))
- 
-+    @unittest.skipIf(GENTOO_TESTING and 
platform.machine().startswith("sparc"), "broken on Gentoo/SPARC")
-     def test_method_2(self):
-         meth_1 = psutil._pslinux.cpu_count_cores()
-         with mock.patch('glob.glob', return_value=[]) as m:
-@@ -755,6 +759,7 @@ class TestSystemCPUCountCores(PsutilTestCase):
- class TestSystemCPUFrequency(PsutilTestCase):
- 
-     @unittest.skipIf(not HAS_CPU_FREQ, "not supported")
-+    @unittest.skipIf(GENTOO_TESTING and 
platform.machine().startswith("sparc"), "broken on Gentoo/SPARC")
-     def test_emulate_use_second_file(self):
-         # https://github.com/giampaolo/psutil/issues/981
-         def path_exists_mock(path):
-@@ -769,6 +774,7 @@ class TestSystemCPUFrequency(PsutilTestCase):
-             assert psutil.cpu_freq()
- 
-     @unittest.skipIf(not HAS_CPU_FREQ, "not supported")
-+    @unittest.skipIf(GENTOO_TESTING and 
platform.machine().startswith("sparc"), "broken on Gentoo/SPARC")
-     def test_emulate_use_cpuinfo(self):
-         # Emulate a case where /sys/devices/system/cpu/cpufreq* does not
-         # exist and /proc/cpuinfo is used instead.
-@@ -896,11 +902,13 @@ class TestSystemCPUFrequency(PsutilTestCase):
- @unittest.skipIf(not LINUX, "LINUX only")
- class TestSystemCPUStats(PsutilTestCase):
- 
-+    @unittest.skipIf(GENTOO_TESTING, "broken in Gentoo test env")
-     def test_ctx_switches(self):
-         vmstat_value = vmstat("context switches")
-         psutil_value = psutil.cpu_stats().ctx_switches
-         self.assertAlmostEqual(vmstat_value, psutil_value, delta=500)
- 
-+    @unittest.skipIf(GENTOO_TESTING, "broken in Gentoo test env")
-     def test_interrupts(self):
-         vmstat_value = vmstat("interrupts")
-         psutil_value = psutil.cpu_stats().interrupts
-@@ -929,6 +937,7 @@ class TestLoadAvg(PsutilTestCase):
- @unittest.skipIf(not LINUX, "LINUX only")
- class TestSystemNetIfAddrs(PsutilTestCase):
- 
-+    @unittest.skipIf(GENTOO_TESTING, "broken in Gentoo test env")
-     def test_ips(self):
-         for name, addrs in psutil.net_if_addrs().items():
-             for addr in addrs:
-@@ -1316,6 +1325,7 @@ class TestRootFsDeviceFinder(PsutilTestCase):
-         findmnt_value = sh("findmnt -o SOURCE -rn /")
-         self.assertEqual(psutil_value, findmnt_value)
- 
-+    @unittest.skipIf(GENTOO_TESTING, "broken in Gentoo test env")
-     def test_disk_partitions_mocked(self):
-         with mock.patch(
-                 'psutil._pslinux.cext.disk_partitions',
-@@ -1491,6 +1501,7 @@ class TestMisc(PsutilTestCase):
-             psutil.PROCFS_PATH = "/proc"
- 
-     @retry_on_failure()
-+    @unittest.skipIf(GENTOO_TESTING, "broken in Gentoo test env")
-     def test_issue_687(self):
-         # In case of thread ID:
-         # - pid_exists() is supposed to return False
-@@ -1596,6 +1607,8 @@ class TestSensorsBattery(PsutilTestCase):
-             self.assertEqual(psutil.sensors_battery().power_plugged, False)
-             assert m.called
- 
-+    @unittest.skipIf(GENTOO_TESTING,
-+                     "mocking doesn't work with non-BAT0 battery")
-     def test_emulate_power_undetermined(self):
-         # Pretend we can't know whether the AC power cable not
-         # connected (assert fallback to False).
-@@ -1614,6 +1627,8 @@ class TestSensorsBattery(PsutilTestCase):
-             self.assertIsNone(psutil.sensors_battery().power_plugged)
-             assert m.called
- 
-+    @unittest.skipIf(GENTOO_TESTING,
-+                     "mocking doesn't work with non-BAT0 battery")
-     def test_emulate_energy_full_0(self):
-         # Emulate a case where energy_full files returns 0.
-         with mock_open_content(
-@@ -1621,6 +1636,8 @@ class TestSensorsBattery(PsutilTestCase):
-             self.assertEqual(psutil.sensors_battery().percent, 0)
-             assert m.called
- 
-+    @unittest.skipIf(GENTOO_TESTING,
-+                     "mocking doesn't work with non-BAT0 battery")
-     def test_emulate_energy_full_not_avail(self):
-         # Emulate a case where energy_full file does not exist.
-         # Expected fallback on /capacity.
-@@ -1634,6 +1651,8 @@ class TestSensorsBattery(PsutilTestCase):
-                         "/sys/class/power_supply/BAT0/capacity", b"88"):
-                     self.assertEqual(psutil.sensors_battery().percent, 88)
- 
-+    @unittest.skipIf(GENTOO_TESTING,
-+                     "mocking doesn't work with non-BAT0 battery")
-     def test_emulate_no_power(self):
-         # Emulate a case where /AC0/online file nor /BAT0/status exist.
-         with mock_open_exception(
-@@ -2220,6 +2239,7 @@ class TestProcessAgainstStatus(PsutilTestCase):
-         value = self.read_status_file("nonvoluntary_ctxt_switches:")
-         self.assertEqual(self.proc.num_ctx_switches().involuntary, value)
- 
-+    @unittest.skipIf(GENTOO_TESTING, "broken in Gentoo test env")
-     def test_cpu_affinity(self):
-         value = self.read_status_file("Cpus_allowed_list:")
-         if '-' in str(value):
-diff --git a/psutil/tests/test_misc.py b/psutil/tests/test_misc.py
-index d946eb62..a53de565 100755
---- a/psutil/tests/test_misc.py
-+++ b/psutil/tests/test_misc.py
-@@ -32,6 +32,7 @@ from psutil._compat import PY3
- from psutil._compat import redirect_stderr
- from psutil.tests import APPVEYOR
- from psutil.tests import CI_TESTING
-+from psutil.tests import GENTOO_TESTING
- from psutil.tests import HAS_BATTERY
- from psutil.tests import HAS_MEMORY_MAPS
- from psutil.tests import HAS_NET_IO_COUNTERS
-@@ -401,6 +402,7 @@ class TestMisc(PsutilTestCase):
-                 reload_module(psutil)
-             self.assertIn("version conflict", str(cm.exception).lower())
- 
-+    @unittest.skipIf(GENTOO_TESTING, "broken in Gentoo test env")
-     def test_debug(self):
-         if PY3:
-             from io import StringIO
-diff --git a/psutil/tests/test_posix.py b/psutil/tests/test_posix.py
-index 31b81926..53b17953 100755
---- a/psutil/tests/test_posix.py
-+++ b/psutil/tests/test_posix.py
-@@ -23,6 +23,7 @@ from psutil import OPENBSD
- from psutil import POSIX
- from psutil import SUNOS
- from psutil.tests import CI_TESTING
-+from psutil.tests import GENTOO_TESTING
- from psutil.tests import HAS_NET_IO_COUNTERS
- from psutil.tests import PYTHON_EXE
- from psutil.tests import PsutilTestCase
-@@ -193,6 +194,7 @@ class TestProcess(PsutilTestCase):
-         vsz_psutil = psutil.Process(self.pid).memory_info()[1] / 1024
-         self.assertEqual(vsz_ps, vsz_psutil)
- 
-+    @unittest.skipIf(GENTOO_TESTING, "broken in Gentoo test env")
-     def test_name(self):
-         name_ps = ps_name(self.pid)
-         # remove path if there is any, from the command
-@@ -271,6 +273,7 @@ class TestProcess(PsutilTestCase):
-             adjusted_ps_pathname = ps_pathname[:len(ps_pathname)]
-             self.assertEqual(ps_pathname, adjusted_ps_pathname)
- 
-+    @unittest.skipIf(GENTOO_TESTING, "broken in Gentoo test env")
-     def test_cmdline(self):
-         ps_cmdline = ps_args(self.pid)
-         psutil_cmdline = " ".join(psutil.Process(self.pid).cmdline())
-@@ -326,6 +329,7 @@ class TestSystemAPIs(PsutilTestCase):
-                     "couldn't find %s nic in 'ifconfig -a' output\n%s" % (
-                         nic, output))
- 
-+    @unittest.skipIf(GENTOO_TESTING, "broken in Gentoo test env")
-     @unittest.skipIf(CI_TESTING and not psutil.users(), "unreliable on CI")
-     @retry_on_failure()
-     def test_users(self):
-diff --git a/psutil/tests/test_process.py b/psutil/tests/test_process.py
-index c9059e33..0050c42a 100755
---- a/psutil/tests/test_process.py
-+++ b/psutil/tests/test_process.py
-@@ -38,6 +38,7 @@ from psutil._compat import long
- from psutil._compat import super
- from psutil.tests import APPVEYOR
- from psutil.tests import CI_TESTING
-+from psutil.tests import GENTOO_TESTING
- from psutil.tests import GITHUB_ACTIONS
- from psutil.tests import GLOBAL_TIMEOUT
- from psutil.tests import HAS_CPU_AFFINITY
-@@ -292,6 +293,7 @@ class TestProcess(PsutilTestCase):
-         time.strftime("%Y %m %d %H:%M:%S", time.localtime(p.create_time()))
- 
-     @unittest.skipIf(not POSIX, 'POSIX only')
-+    @unittest.skipIf(GENTOO_TESTING, "broken in Gentoo test env")
-     def test_terminal(self):
-         terminal = psutil.Process().terminal()
-         if terminal is not None:
-@@ -341,6 +343,7 @@ class TestProcess(PsutilTestCase):
-             self.assertGreaterEqual(io2[i], 0)
-             self.assertGreaterEqual(io2[i], 0)
- 
-+    @unittest.skipIf(GENTOO_TESTING, "fails if builder is ioniced already")
-     @unittest.skipIf(not HAS_IONICE, "not supported")
-     @unittest.skipIf(not LINUX, "linux only")
-     def test_ionice_linux(self):
-@@ -1406,6 +1409,7 @@ class TestProcess(PsutilTestCase):
-         if not OSX and GITHUB_ACTIONS:
-             self.assertEqual(d1, d2)
- 
-+    @unittest.skipIf(GENTOO_TESTING, "broken by Gentoo sandbox")
-     @unittest.skipIf(not HAS_ENVIRON, "not supported")
-     @unittest.skipIf(not POSIX, "POSIX only")
-     def test_weird_environ(self):
-diff --git a/psutil/tests/test_system.py b/psutil/tests/test_system.py
-index db2cb348..d719c59e 100755
---- a/psutil/tests/test_system.py
-+++ b/psutil/tests/test_system.py
-@@ -10,6 +10,7 @@ import contextlib
- import datetime
- import errno
- import os
-+import platform
- import pprint
- import shutil
- import signal
-@@ -33,6 +34,7 @@ from psutil._compat import long
- from psutil.tests import ASCII_FS
- from psutil.tests import CI_TESTING
- from psutil.tests import DEVNULL
-+from psutil.tests import GENTOO_TESTING
- from psutil.tests import GITHUB_ACTIONS
- from psutil.tests import GLOBAL_TIMEOUT
- from psutil.tests import HAS_BATTERY
-@@ -199,6 +201,7 @@ class TestMiscAPIs(PsutilTestCase):
-         self.assertGreater(bt, 0)
-         self.assertLess(bt, time.time())
- 
-+    @unittest.skipIf(GENTOO_TESTING, "broken in Gentoo test env")
-     @unittest.skipIf(CI_TESTING and not psutil.users(), "unreliable on CI")
-     def test_users(self):
-         users = psutil.users()
-@@ -426,6 +429,7 @@ class TestCpuAPIs(PsutilTestCase):
-                 if difference >= 0.05:
-                     return
- 
-+    @unittest.skipIf(GENTOO_TESTING, "flaky")
-     def test_cpu_times_comparison(self):
-         # Make sure the sum of all per cpu times is almost equal to
-         # base "one cpu" times.
-@@ -512,6 +516,7 @@ class TestCpuAPIs(PsutilTestCase):
-                 self.assertGreater(value, 0)
- 
-     @unittest.skipIf(not HAS_CPU_FREQ, "not suported")
-+    @unittest.skipIf(GENTOO_TESTING and 
platform.machine().startswith("sparc"), "broken on Gentoo/SPARC")
-     def test_cpu_freq(self):
-         def check_ls(ls):
-             for nt in ls:
-@@ -580,6 +585,7 @@ class TestDiskAPIs(PsutilTestCase):
-     def test_disk_usage_bytes(self):
-         psutil.disk_usage(b'.')
- 
-+    @unittest.skipIf(GENTOO_TESTING, "broken in Gentoo test env")
-     def test_disk_partitions(self):
-         def check_ntuple(nt):
-             self.assertIsInstance(nt.device, str)

diff --git a/dev-python/psutil/psutil-5.9.0.ebuild 
b/dev-python/psutil/psutil-5.9.0.ebuild
deleted file mode 100644
index ddb9962ebb08..000000000000
--- a/dev-python/psutil/psutil-5.9.0.ebuild
+++ /dev/null
@@ -1,40 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{8..11} pypy3 )
-
-inherit distutils-r1
-
-DESCRIPTION="Retrieve information on running processes and system utilization"
-HOMEPAGE="https://github.com/giampaolo/psutil https://pypi.org/project/psutil/";
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 
~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos 
~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="test"
-RESTRICT="!test? ( test )"
-
-PATCHES=(
-       "${FILESDIR}"/psutil-5.9.0-tests.patch
-)
-
-python_test() {
-       # since we are running in an environment a bit similar to CI,
-       # let's skip the tests that are disable for CI
-       local -x TRAVIS=1
-       local -x APPVEYOR=1
-       local -x GITHUB_ACTIONS=1
-       local -x GENTOO_TESTING=1
-       "${EPYTHON}" psutil/tests/runner.py ||
-               die "tests failed with ${EPYTHON}"
-}
-
-python_compile() {
-       # force -j1 to avoid .o linking race conditions
-       local MAKEOPTS=-j1
-       distutils-r1_python_compile
-}

Reply via email to