Python compat updates
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
|
||||
EAPI=7
|
||||
|
||||
PYTHON_COMPAT=( python3_{7..8} )
|
||||
PYTHON_COMPAT=( python3_{7..9} )
|
||||
DISTUTILS_USE_SETUPTOOLS=rdepend
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
DIST APScheduler-3.7.0.tar.gz 97826 BLAKE2B 0d6c80f7f36cd09ecb6c325d27447b559e6b710b10b504ee1fe091d2da0cbac03e189c2ba74410df3fe93533326759f9a663b6b3c63c71c931302b8e77b34c38 SHA512 549f65883affb2bc6d7c24e027204151090e741a733440b94c18a68efe00503e241c95374ee51b9e059029d02197091b91fdde6696f7e162e2eb0b4d7575ff62
|
||||
EBUILD APScheduler-3.7.0.ebuild 1830 BLAKE2B fba93aa327d6526694a5ac7dfde1f5119813b7d56ed557bb85e68482d2dc2c1f928508fafb924e35684650f746bf497aaac78bada2f89b90d9f2f2e22f05e6de SHA512 16325c915407ac6462046e7621df791c2253eedff48776b7f4b267e06b14c1d18e9f636535fef51fc7773f38a1c14eb21a68bb0b38ff00e4ca23a0b37d18a543
|
||||
EBUILD APScheduler-3.7.0.ebuild 1830 BLAKE2B 5b7079f58031850b922a4ca637f5f52b4d1951debf45638d246cc6411d1917488c138c3fa27cd134dbeef14f035a7fde8d18a4d7ba7b9af2ffe239daad98d1c5 SHA512 8f93206cfd7eb9e59cd8552def5689b742e2379f0a1b7f055ae4312022cf039cb5c39c8e385f7980aef3bf40da42fb393773558b8141de8adfc60e7e26697eb7
|
||||
MISC metadata.xml 403 BLAKE2B a9cb9d18b06c206a2a3b89fe6a460dd477db5d591fad97138226e9caba4fd73512f47fc13d23b383d868cf9ef4cee74b4b2140e5ebb51c8c8cc765bad8c64c20 SHA512 b029f17fe0d3c8ab572fc92c45c41659c3c3dcf5bb487d1c862d65fb9f1c4215bcdade0958c3044117c97ca2442cb08dac89b3cd2817f143f807a608fcec5004
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
DIST Flask-1.1.4.tar.gz 635920 BLAKE2B c1f19e7449177ecf6e901d5932ad25cbe866ff53b9323f717541922b1ea5b10203ff07630fcf3eabaedd9b6a24ef031ad2aaa2e2f759925363bebfa7e5d967da SHA512 6f427a1264921b8560446afacee2757d16de0dc22d6ed249b7bc5d6f50f3af50c89b79ce900d75b41af4befc53910f2b532c2e280de42837e2133acb6b1bd80d
|
||||
EBUILD flask-1.1.4.ebuild 1327 BLAKE2B 9bc0ccea2f427e5bfcf8aae9e48891e25298ec6adb561035618b1cffdd53d60cd84692906c2738dafb4c3079f20152d420d2adf3ef3ad4c6e4d052d1978486c1 SHA512 16437e808adb38ad1ede90c2354376b37c09f52134857099502049e9a2dae2c3fe9014c0c7d5aad993430a9fee1f5ea7cf9d299d37cef9c14e45a6ce85440850
|
||||
MISC metadata.xml 385 BLAKE2B 0aa1fc56ae29e91457344d7ca4f8a26506d46d22b71ac7363fb443ba7fbcad7974f86b898dd7b2e4cc2bbbc5d58fe1a1904a077e5c7b959ba2e1761f1561769f SHA512 223a1a9459b462c6dfbfc2fa0d6932e1f9457e86eb9a70e96c5182a3b4f898a121aa13dc9425811b8fcabc6dca8ba1d715e5aa221453e235a5b5ee2c25cc02fc
|
||||
@@ -0,0 +1,50 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
PYTHON_COMPAT=( python3_{7..9} pypy3 )
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="A microframework based on Werkzeug, Jinja2 and good intentions"
|
||||
HOMEPAGE="https://github.com/pallets/flask/"
|
||||
MY_PN="Flask"
|
||||
MY_P="${MY_PN}-${PV}"
|
||||
if [[ ${PV} == *9999* ]]; then
|
||||
EGIT_REPO_URI="https://github.com/mitsuhiko/flask.git"
|
||||
inherit git-r3
|
||||
else
|
||||
SRC_URI="mirror://pypi/${MY_P:0:1}/${MY_PN}/${MY_P}.tar.gz"
|
||||
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~x64-macos"
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
fi
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
IUSE="examples test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
RDEPEND="<dev-python/click-8[${PYTHON_USEDEP}]
|
||||
dev-python/blinker[${PYTHON_USEDEP}]
|
||||
<dev-python/itsdangerous-2[${PYTHON_USEDEP}]
|
||||
dev-python/jinja[${PYTHON_USEDEP}]
|
||||
<dev-python/werkzeug-2[${PYTHON_USEDEP}]"
|
||||
DEPEND="
|
||||
test? (
|
||||
${RDEPEND}
|
||||
dev-python/pytest[${PYTHON_USEDEP}]
|
||||
)"
|
||||
|
||||
distutils_enable_sphinx docs
|
||||
|
||||
python_test() {
|
||||
distutils_install_for_testing
|
||||
PYTHONPATH=${S}/examples/flaskr:${S}/examples/minitwit${PYTHONPATH:+:${PYTHONPATH}} \
|
||||
pytest -vv -p no:httpbin || die "Testing failed with ${EPYTHON}"
|
||||
}
|
||||
|
||||
python_install_all() {
|
||||
use examples && dodoc -r examples
|
||||
|
||||
distutils-r1_python_install_all
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="project">
|
||||
<email>python@gentoo.org</email>
|
||||
<name>Python</name>
|
||||
</maintainer>
|
||||
<stabilize-allarches/>
|
||||
<upstream>
|
||||
<remote-id type="pypi">Flask</remote-id>
|
||||
<remote-id type="github">pallets/flask</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
||||
@@ -1,3 +0,0 @@
|
||||
DIST loguru-0.4.1.tar.gz 404393 BLAKE2B 2dec4a346db3652a35a758bb9ce98f29785f47a55a107c0f924005607001adbd6e873095b7212a86bfa66d5d8a24f058d775552c1fa044fabd9813c09f369f26 SHA512 5b7dbac11bbd5c7cb05fe380cf4a3337309614cac77ded3b1f5191c8865d16788cafa7e8da25817787a1ae94e1b6905afe54184d72df81fad08821cdb68c0a53
|
||||
EBUILD loguru-0.4.1.ebuild 656 BLAKE2B c12daee7cc82dd3e3f2f2cbe97618f94baf12320ff29a1ba13a537c55a67f3d0a001217bb8c01353e15b3100347d30a5833bd08ded28362d8d052d51adc9ca98 SHA512 fd591aff2a4fd4c44abb4f0a54c4f67c41a838c89b1ff9820aed1f26096c8552bbbf41d590fd13fffdfd532f62b1cf941c9bdfb1dd1d2d5fa842847dc0384138
|
||||
MISC metadata.xml 683 BLAKE2B bd44db6c47f17a714eb8080d63d5002bbedf247787d568735f87f8aa01a13fc32d383f4eab2b92536a2f98f5b76b0ae01c407bf3c746b08c668ef562cf488ed0 SHA512 8a671ba69aa489f384c7074623f62c03905442b14b6b12bc9f306416a66390a334dcdadf84a5485936b47ff9992ac87e35ffbc8ae17d035b381f53f721b2369b
|
||||
@@ -1,24 +0,0 @@
|
||||
# Copyright 2019-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
PYTHON_COMPAT=( python3_{6,7} )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="Python logging made (stupidly) simple"
|
||||
HOMEPAGE="https://github.com/Delgan/loguru"
|
||||
SRC_URI="https://github.com/Delgan/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~ppc64 ~x86"
|
||||
|
||||
RDEPEND="
|
||||
$(python_gen_cond_dep 'dev-python/aiocontextvars[${PYTHON_USEDEP}]' 'python3_6')
|
||||
>=dev-python/colorama-0.3.4[${PYTHON_USEDEP}]
|
||||
"
|
||||
# filesystem buffering tests may fail
|
||||
# on tmpfs with 64k PAGESZ, but pass fine on ext4
|
||||
distutils_enable_tests pytest
|
||||
@@ -1,16 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>gyakovlev@gentoo.org</email>
|
||||
<name>Georgy Yakovlev</name>
|
||||
</maintainer>
|
||||
<longdescription lang="en">
|
||||
This library is intended to make Python logging less painful by adding a bunch of useful functionalities that solve caveats of the standard loggers.
|
||||
Using logs in your application should be an automatism, Loguru tries to make it both pleasant and powerful.
|
||||
</longdescription>
|
||||
<upstream>
|
||||
<remote-id type="github">Delgan/loguru</remote-id>
|
||||
<remote-id type="pypi">loguru</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
||||
@@ -0,0 +1,5 @@
|
||||
AUX psutil-5.7.0-tests.patch 6018 BLAKE2B ac419a11d5caabd4184ece7a1b969e23125c122fe9a52277a7bc4af8006818b2328507e929584b464aa9ff94521c4d882819c45719dc4fb387a24c7171d5caba SHA512 3b8c901c101c56be207b008437fb0aa2f6095986e9dbdfb3f0ca5f3417ec2ee3a120d9b66f091ed9ac697d80bc17e2eb215b57bbde5b093b5b3b64ca4dae4b3b
|
||||
AUX psutil-5.7.2-tests.patch 4427 BLAKE2B 8b2847eb445eb39080123dc1018ccf8c68c0ceb88538d9abef454724d298225ba3f65f735fd8528d3ed22d4f463e8025677144442ac471aeeea44bbe7c607d55 SHA512 46145825084b5d09e2dfa7f7b765757a8d5ac7ff2379ae66bb628ea30f010daff2fe9d389f7846a1f63f9b03c4b7bd8ac4f4d07a4ed977e06a68b63a4e27231b
|
||||
DIST psutil-5.8.0.tar.gz 470886 BLAKE2B f3d8d55dcbc2e0821f1ce96b9187692b2389681e13599b04e33b10f11fbe02f768a4dfc0802fe506713c8c3306d4c7011f2ac659c78f6a23a5523c7e36abc318 SHA512 b716bcbf33ceacdc30ddd0d0cf9bca0ab7751225b8f20dea664a82751dc88cb590720b098ae26056c8b3cdabcfe2fa198d618cea24c21465b1368a52ee182818
|
||||
EBUILD psutil-5.8.0.ebuild 1155 BLAKE2B 13f89c3397dacf75c21c2506e21ea149bab5334cddb7b94f62c30ba2ae6ce6f7f08144d07c9be7983de8913d113f861f6dabf51aca997123cd83e40aadeed500 SHA512 3d29e2ee60cc953a45724904c5c656554f83b3a6c7d8618d5c9863c38d563c2c31fc68d7f422241b7a52b5e33cfe33f8eaf3109b60022953cf031397379a4526
|
||||
MISC metadata.xml 377 BLAKE2B 0e671ef95025f24d295ceb5c5295544f4d68bf94459537537e229efd273bbac058b385fa94f1fa1191f23785d2572a5960d84a1d3ece41f10316b38101cb26d0 SHA512 a28e7a1e32a0b2750a4f0956d2252c73d20b4aa9817aac2e776365febd7d03de88e88508aabdfc29ae15d8bf7ebf1ed662c000e2ca8c79e3d50a3362ce1c2d2d
|
||||
@@ -0,0 +1,158 @@
|
||||
From e910d08976e00bc12b5a516daa9e6a6d42d48354 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
|
||||
Date: Wed, 19 Feb 2020 07:27:32 +0100
|
||||
Subject: [PATCH] Skip broken tests on Gentoo
|
||||
|
||||
---
|
||||
psutil/tests/test_linux.py | 8 ++++++++
|
||||
psutil/tests/test_posix.py | 1 +
|
||||
psutil/tests/test_process.py | 2 ++
|
||||
psutil/tests/test_system.py | 1 +
|
||||
4 files changed, 12 insertions(+)
|
||||
|
||||
diff --git a/psutil/tests/test_linux.py b/psutil/tests/test_linux.py
|
||||
index e51f8bd5..48527ccb 100755
|
||||
--- a/psutil/tests/test_linux.py
|
||||
+++ b/psutil/tests/test_linux.py
|
||||
@@ -17,6 +17,7 @@ import re
|
||||
import shutil
|
||||
import socket
|
||||
import struct
|
||||
+import sys
|
||||
import tempfile
|
||||
import textwrap
|
||||
import time
|
||||
@@ -381,6 +382,8 @@ class TestSystemVirtualMemory(unittest.TestCase):
|
||||
ret = psutil.virtual_memory()
|
||||
assert m.called
|
||||
self.assertEqual(ret.available, 2057400 * 1024 + 4818144 * 1024)
|
||||
+ if sys.version_info < (3,):
|
||||
+ return
|
||||
w = ws[0]
|
||||
self.assertIn(
|
||||
"inactive memory stats couldn't be determined", str(w.message))
|
||||
@@ -411,6 +414,8 @@ class TestSystemVirtualMemory(unittest.TestCase):
|
||||
ret = psutil.virtual_memory()
|
||||
self.assertEqual(
|
||||
ret.available, 2057400 * 1024 + 4818144 * 1024)
|
||||
+ if sys.version_info < (3,):
|
||||
+ return
|
||||
w = ws[0]
|
||||
self.assertIn(
|
||||
"inactive memory stats couldn't be determined",
|
||||
@@ -882,6 +887,7 @@ class TestLoadAvg(unittest.TestCase):
|
||||
@unittest.skipIf(not LINUX, "LINUX only")
|
||||
class TestSystemNetIfAddrs(unittest.TestCase):
|
||||
|
||||
+ @unittest.skip("broken on Gentoo")
|
||||
def test_ips(self):
|
||||
for name, addrs in psutil.net_if_addrs().items():
|
||||
for addr in addrs:
|
||||
@@ -1364,6 +1370,7 @@ class TestMisc(unittest.TestCase):
|
||||
psutil.PROCFS_PATH = "/proc"
|
||||
os.rmdir(tdir)
|
||||
|
||||
+ @unittest.skip("broken on Gentoo")
|
||||
def test_issue_687(self):
|
||||
# In case of thread ID:
|
||||
# - pid_exists() is supposed to return False
|
||||
@@ -2073,6 +2080,7 @@ class TestProcessAgainstStatus(unittest.TestCase):
|
||||
value = self.read_status_file("nonvoluntary_ctxt_switches:")
|
||||
self.assertEqual(self.proc.num_ctx_switches().involuntary, value)
|
||||
|
||||
+ @unittest.skip("broken on Gentoo")
|
||||
def test_cpu_affinity(self):
|
||||
value = self.read_status_file("Cpus_allowed_list:")
|
||||
if '-' in str(value):
|
||||
diff --git a/psutil/tests/test_posix.py b/psutil/tests/test_posix.py
|
||||
index a96b310f..70199203 100755
|
||||
--- a/psutil/tests/test_posix.py
|
||||
+++ b/psutil/tests/test_posix.py
|
||||
@@ -364,6 +364,7 @@ class TestSystemAPIs(unittest.TestCase):
|
||||
"couldn't find %s nic in 'ifconfig -a' output\n%s" % (
|
||||
nic, output))
|
||||
|
||||
+ @unittest.skip("broken on Gentoo")
|
||||
@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 987bdf38..cb04f3ef 100755
|
||||
--- a/psutil/tests/test_process.py
|
||||
+++ b/psutil/tests/test_process.py
|
||||
@@ -350,6 +350,7 @@ class TestProcess(unittest.TestCase):
|
||||
self.assertGreaterEqual(io2[i], 0)
|
||||
self.assertGreaterEqual(io2[i], 0)
|
||||
|
||||
+ @unittest.skip("fails if builder is ioniced already")
|
||||
@unittest.skipIf(not HAS_IONICE, "not supported")
|
||||
@unittest.skipIf(not LINUX, "linux only")
|
||||
def test_ionice_linux(self):
|
||||
@@ -1495,6 +1496,7 @@ class TestProcess(unittest.TestCase):
|
||||
d2 = clean_dict(os.environ.copy())
|
||||
self.assertEqual(d1, d2)
|
||||
|
||||
+ @unittest.skip("broken by 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 3834209f..b07b5883 100755
|
||||
--- a/psutil/tests/test_system.py
|
||||
+++ b/psutil/tests/test_system.py
|
||||
@@ -215,6 +215,7 @@ class TestMiscAPIs(unittest.TestCase):
|
||||
self.assertGreater(bt, 0)
|
||||
self.assertLess(bt, time.time())
|
||||
|
||||
+ @unittest.skip("broken on Gentoo")
|
||||
@unittest.skipIf(CI_TESTING and not psutil.users(), "unreliable on CI")
|
||||
def test_users(self):
|
||||
users = psutil.users()
|
||||
--
|
||||
2.25.1
|
||||
|
||||
From 026e4b0076a352fcb1e8de71f1393ae0d50ac06d Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
|
||||
Date: Tue, 26 May 2020 12:28:59 +0200
|
||||
Subject: [PATCH] Sort results in test_cpu_affinity_all_combinations
|
||||
|
||||
Fix test_cpu_affinity_all_combinations to permit any CPU order
|
||||
in results. This fixes test failure due to affinity being reported
|
||||
out of order:
|
||||
|
||||
======================================================================
|
||||
FAIL: psutil.tests.test_process.TestProcess.test_cpu_affinity_all_combinations
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "/tmp/psutil/psutil/tests/test_process.py", line 940, in test_cpu_affinity_all_combinations
|
||||
self.assertEqual(p.cpu_affinity(), combo)
|
||||
AssertionError: Lists differ: [8, 1] != [1, 8]
|
||||
|
||||
First differing element 0:
|
||||
8
|
||||
1
|
||||
|
||||
- [8, 1]
|
||||
+ [1, 8]
|
||||
|
||||
----------------------------------------------------------------------
|
||||
---
|
||||
psutil/tests/test_process.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/psutil/tests/test_process.py b/psutil/tests/test_process.py
|
||||
index a0b21c6e..e3394799 100755
|
||||
--- a/psutil/tests/test_process.py
|
||||
+++ b/psutil/tests/test_process.py
|
||||
@@ -937,7 +937,7 @@ class TestProcess(PsutilTestCase):
|
||||
|
||||
for combo in combos:
|
||||
p.cpu_affinity(combo)
|
||||
- self.assertEqual(p.cpu_affinity(), combo)
|
||||
+ self.assertEqual(sorted(p.cpu_affinity()), sorted(combo))
|
||||
|
||||
# TODO: #595
|
||||
@unittest.skipIf(BSD, "broken on BSD")
|
||||
--
|
||||
2.26.2
|
||||
|
||||
@@ -0,0 +1,112 @@
|
||||
From e910d08976e00bc12b5a516daa9e6a6d42d48354 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
|
||||
Date: Wed, 19 Feb 2020 07:27:32 +0100
|
||||
Subject: [PATCH] Skip broken tests on Gentoo
|
||||
|
||||
---
|
||||
psutil/tests/test_linux.py | 8 ++++++++
|
||||
psutil/tests/test_posix.py | 1 +
|
||||
psutil/tests/test_process.py | 2 ++
|
||||
psutil/tests/test_system.py | 1 +
|
||||
4 files changed, 12 insertions(+)
|
||||
|
||||
diff --git a/psutil/tests/test_linux.py b/psutil/tests/test_linux.py
|
||||
index e51f8bd5..48527ccb 100755
|
||||
--- a/psutil/tests/test_linux.py
|
||||
+++ b/psutil/tests/test_linux.py
|
||||
@@ -17,5 +17,6 @@ import re
|
||||
import shutil
|
||||
import socket
|
||||
import struct
|
||||
+import sys
|
||||
import textwrap
|
||||
import time
|
||||
@@ -381,6 +382,8 @@ class TestSystemVirtualMemory(unittest.TestCase):
|
||||
ret = psutil.virtual_memory()
|
||||
assert m.called
|
||||
self.assertEqual(ret.available, 2057400 * 1024 + 4818144 * 1024)
|
||||
+ if sys.version_info < (3,):
|
||||
+ return
|
||||
w = ws[0]
|
||||
self.assertIn(
|
||||
"inactive memory stats couldn't be determined", str(w.message))
|
||||
@@ -411,6 +414,8 @@ class TestSystemVirtualMemory(unittest.TestCase):
|
||||
ret = psutil.virtual_memory()
|
||||
self.assertEqual(
|
||||
ret.available, 2057400 * 1024 + 4818144 * 1024)
|
||||
+ if sys.version_info < (3,):
|
||||
+ return
|
||||
w = ws[0]
|
||||
self.assertIn(
|
||||
"inactive memory stats couldn't be determined",
|
||||
@@ -882,6 +887,7 @@ class TestLoadAvg(unittest.TestCase):
|
||||
@unittest.skipIf(not LINUX, "LINUX only")
|
||||
class TestSystemNetIfAddrs(unittest.TestCase):
|
||||
|
||||
+ @unittest.skip("broken on Gentoo")
|
||||
def test_ips(self):
|
||||
for name, addrs in psutil.net_if_addrs().items():
|
||||
for addr in addrs:
|
||||
@@ -1364,7 +1370,8 @@ class TestMisc(unittest.TestCase):
|
||||
psutil.PROCFS_PATH = "/proc"
|
||||
os.rmdir(tdir)
|
||||
|
||||
@retry_on_failure()
|
||||
+ @unittest.skip("broken on Gentoo")
|
||||
def test_issue_687(self):
|
||||
# In case of thread ID:
|
||||
# - pid_exists() is supposed to return False
|
||||
@@ -2073,6 +2080,7 @@ class TestProcessAgainstStatus(unittest.TestCase):
|
||||
value = self.read_status_file("nonvoluntary_ctxt_switches:")
|
||||
self.assertEqual(self.proc.num_ctx_switches().involuntary, value)
|
||||
|
||||
+ @unittest.skip("broken on Gentoo")
|
||||
def test_cpu_affinity(self):
|
||||
value = self.read_status_file("Cpus_allowed_list:")
|
||||
if '-' in str(value):
|
||||
diff --git a/psutil/tests/test_posix.py b/psutil/tests/test_posix.py
|
||||
index a96b310f..70199203 100755
|
||||
--- a/psutil/tests/test_posix.py
|
||||
+++ b/psutil/tests/test_posix.py
|
||||
@@ -364,6 +364,7 @@ class TestSystemAPIs(unittest.TestCase):
|
||||
"couldn't find %s nic in 'ifconfig -a' output\n%s" % (
|
||||
nic, output))
|
||||
|
||||
+ @unittest.skip("broken on Gentoo")
|
||||
@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 987bdf38..cb04f3ef 100755
|
||||
--- a/psutil/tests/test_process.py
|
||||
+++ b/psutil/tests/test_process.py
|
||||
@@ -350,6 +350,7 @@ class TestProcess(unittest.TestCase):
|
||||
self.assertGreaterEqual(io2[i], 0)
|
||||
self.assertGreaterEqual(io2[i], 0)
|
||||
|
||||
+ @unittest.skip("fails if builder is ioniced already")
|
||||
@unittest.skipIf(not HAS_IONICE, "not supported")
|
||||
@unittest.skipIf(not LINUX, "linux only")
|
||||
def test_ionice_linux(self):
|
||||
@@ -1495,6 +1496,7 @@ class TestProcess(unittest.TestCase):
|
||||
d2 = clean_dict(os.environ.copy())
|
||||
self.assertEqual(d1, d2)
|
||||
|
||||
+ @unittest.skip("broken by 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 3834209f..b07b5883 100755
|
||||
--- a/psutil/tests/test_system.py
|
||||
+++ b/psutil/tests/test_system.py
|
||||
@@ -215,6 +215,7 @@ class TestMiscAPIs(unittest.TestCase):
|
||||
self.assertGreater(bt, 0)
|
||||
self.assertLess(bt, time.time())
|
||||
|
||||
+ @unittest.skip("broken on Gentoo")
|
||||
@unittest.skipIf(CI_TESTING and not psutil.users(), "unreliable on CI")
|
||||
def test_users(self):
|
||||
users = psutil.users()
|
||||
--
|
||||
2.25.1
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="project">
|
||||
<email>python@gentoo.org</email>
|
||||
<name>Python</name>
|
||||
</maintainer>
|
||||
<upstream>
|
||||
<remote-id type="pypi">psutil</remote-id>
|
||||
<remote-id type="github">giampaolo/psutil</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
||||
@@ -0,0 +1,39 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
PYTHON_COMPAT=( python3_{7..10} 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 ~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.7.2-tests.patch"
|
||||
)
|
||||
|
||||
python_test() {
|
||||
if [[ ${EPYTHON} == pypy* ]]; then
|
||||
ewarn "Not running tests on ${EPYTHON} since they are broken"
|
||||
return 0
|
||||
fi
|
||||
|
||||
# since we are running in an environment a bit similar to CI,
|
||||
# let's skip the tests that are disable for CI
|
||||
TRAVIS=1 APPVEYOR=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
|
||||
}
|
||||
Reference in New Issue
Block a user