summaryrefslogtreecommitdiff
path: root/dev-python/twisted
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-08-07 12:37:21 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-08-07 12:37:21 +0100
commitb8c7370a682e4e29cda623222d17a790c01c3642 (patch)
treef6caa14689bd00a5760eadaa381ff41e50ef3c1b /dev-python/twisted
parent8a4997a7e2d1e36c089d4d76935b5a902d98d3d0 (diff)
gentoo auto-resync : 07:08:2024 - 12:37:20
Diffstat (limited to 'dev-python/twisted')
-rw-r--r--dev-python/twisted/Manifest10
-rw-r--r--dev-python/twisted/files/twisted-24.3.0-skip-dsa-tests.patch75
-rw-r--r--dev-python/twisted/files/twisted-24.7.0_rc1-skip-py313-tests.patch54
-rw-r--r--dev-python/twisted/twisted-24.3.0.ebuild4
-rw-r--r--dev-python/twisted/twisted-24.7.0_rc1.ebuild (renamed from dev-python/twisted/twisted-24.3.0_p20240628.ebuild)18
-rw-r--r--dev-python/twisted/twisted-24.7.0_rc2.ebuild161
6 files changed, 310 insertions, 12 deletions
diff --git a/dev-python/twisted/Manifest b/dev-python/twisted/Manifest
index aecf899e8873..86396d281e3c 100644
--- a/dev-python/twisted/Manifest
+++ b/dev-python/twisted/Manifest
@@ -1,9 +1,13 @@
AUX twistd.conf 277 BLAKE2B 78ca35b410a6597c9afe6a9c8d3dfb1de113411634901f936794e8a59c0644233d0673e710bd0870ecf4312d079c46f62f43928605700559134f1fb62490559a SHA512 76d44caebab8404f16937c2515ad9ae8236732a48c7127366f7fa22c6ed3d88ace2d33b832a6d95f775973d41b7caf75344805fe5b01e964c04eb710bf3c89fb
AUX twistd.init 563 BLAKE2B 24488118b025bf2068bbf07af900064ff6a7ee99106c3da30f15f2b3f85af7443212afebc6b52a12645488b85656f87b653df9263fc2be6bd09707917899f252 SHA512 7860601beba1efda2b0a045b2a044ec33caff9ee915d45225c05e281760a68da349b4c45080600177aab32aa806714327acf3cf5dda92be0874f781f129bb129
+AUX twisted-24.3.0-skip-dsa-tests.patch 2821 BLAKE2B cb3458d0a25fbfbe2c6f6ba0678de34c4776ff3b0007cb148886178914888ab85dfa84260053233d75143aca1cd4fae98b65010fc5315a5d2c1d64e4e8f65346 SHA512 0decf83cad5cc725dcb44993a6c688b06ba20f72a4b906281fd2bfbfcc1f9a043777e4574119224fe6d16964be7c8977224a1233d6a48db6aa9c232a18c5157e
AUX twisted-24.3.0_p20240628-skip-py313-test.patch 1275 BLAKE2B f2b0f08635de429e1fe780cc0176e1590db5f2f290f89cb2796ad5f2b5728382c22a2470e7fe1140071a94356dc2a0e15084008124fa5185e314252e75702469 SHA512 e1b7b7602658576d61a7a79592f839d5cf514571d56d51a53cf6fdcf7ab889cec510081e59ac813ac68908990f26303d30f70f7ec393fa2a1e995e41a380fd2d
+AUX twisted-24.7.0_rc1-skip-py313-tests.patch 1927 BLAKE2B f2647c913cf594eaed6bc9c270930cfe6f0b91275bd4701249dce4922aa2868764311ccce1323565ddcbc1b65bb7fedee34bfc57eadaf8827a78cdbe8e25b401 SHA512 1a5972d4b8d575758c0dc824b90c53f8317f52e40f1893264e21743a3cbf6705043bfbd9d35d82518f91f578f2e5ba7458be5a7839e4e2657ae5ab8ecb73a4fb
DIST twisted-24.3.0.tar.gz 3500456 BLAKE2B b2cebb2f3482dbeba250786b1977ddbb09e1a9a81f71ce5906efe8289b0e134a8b26c191c2262e8ee8ba3fccccea508c34145016b29ecf301541134dcea19e08 SHA512 c3dd227f5936ffa586a0b7447f5df4c2257dce0c0ba740373d82197a72029e7eeb0aef9789247dde73e2f24dd043f3b0b7d795f16e6e908583b054aad9b9eb6a
-DIST twisted-24.3.0_p20240628.gh.tar.gz 3598828 BLAKE2B 6f37190caa0fe6e0ff566cb4f86b625425bfe60d8743b4c22463da63df3184646eda2b7d1a73e30452390bab54f8001f9eb33e1e7adc645071fe0eba4fb2d30c SHA512 f182d6c5006f1043f3586468d628b6b87a4d74d4aa1ce3c882938f0a831a191b38b311a4cf68488b24cd3d87547aeb0b9725e93ce4be86638aa11552d294cd95
+DIST twisted-24.7.0rc1.tar.gz 3517026 BLAKE2B ce7c2aec350c08ccaee03010dcff7f82fb37760d905206862e77c77c71d5eb8a0c9e04433bfe3ef19f39761ddbacdacb1eeb64b4de6663569f06ed06302276f9 SHA512 7bc5a65d1813573e980c1171a579d3b76a0275706175c2d83d5cfe389bc8ef1e965ec50b4680579af1eb796ed7131eb0bbad173ef2a73c9ed0a367f6a121666a
+DIST twisted-24.7.0rc2.tar.gz 3517199 BLAKE2B 479b49de68bc915be54dd9c2e44bd2d9271644efae5eaccd57f88cf1b2bd1b3ee9cba31ec072ec69b172fa874e730a8c9b3b4f2e1b52fdd30a29ae2e4c062d52 SHA512 9fc84683fc84e2d990ca1c1619968949f46d4f9ba1fefa333cb4f8feeb1dea7bc3d011fab414b53089cb08eeee6c292633eb5067da75d36501799b8f2a1e94b5
DIST twisted-regen-cache.gz 911 BLAKE2B ffd3fcda6c67ffe6fd3ef581c8d507548396b66ed0708e9a5c790095e579c0d5f0f71596acf05712989da2ddef2b8d437eca973bc4d80ef8a9fa852915f38305 SHA512 95a9b931c73017d16d1b5e6b41345dddffe62b6af1a8e93b5e40d06d3d15be17b0dd0181c767ffeeb791534d463764ef9e066fa6c2ee2ac4b53c86d1da8fce03
-EBUILD twisted-24.3.0.ebuild 4210 BLAKE2B bef4f69b585556b6a7942a8e9c41bc47d224b1f56749f1a385a9338a4fcc01390796584c537231f5a93579b0583fcce005a71777d6d01a5520b1949022306f8b SHA512 8f044bc7749dbf23a0d6f44b8c090f8aae48f940e16a032b3a63abe6db026eabf755f29b3973241d688b6ca3af88ee50da5a100e281c4684f84665ef6c8e9bcd
-EBUILD twisted-24.3.0_p20240628.ebuild 4567 BLAKE2B 66ac6495a48cfa430bea5ca8f8c044a974773d5d4c4726c2d4d5ba3638ba741580bac914251c6f2b3d1c7f3620367a65028d7a393ba7b043ae397c88aee78bf4 SHA512 aca219cd6d9ffbee0d0840dabf34b262fea7cc4bd3ddef6698a5a1c3d298bdf889086791e4a19978042c807bf1eeebf71a3e4a364f6764113e0dfb7d2c577980
+EBUILD twisted-24.3.0.ebuild 4272 BLAKE2B 7781c1b0d434f67a36f64cea21bff67d3afd92f7636bc1d39429cff3537f1707963f03494721d210f311f3c4482cbe3d140290e25bc6932a72f501a86638453e SHA512 9c38da941311f9ac89e30933d6513ca79d8f1dd0a0c348757715bc82d4affcf911783eb6b7661b1b01b57f66ad8981dbf57a4851c82e1ea7ed9e6ae5040cd54d
+EBUILD twisted-24.7.0_rc1.ebuild 4527 BLAKE2B 68dd403cceac8e7eb572094c78bf2e7c8c5b6d72fc9990e30719a9c4985bcbcb9a0d1b72663d773a04838407a9037a54ad802cea6b3cb8e416bc4ed8a49c3bf9 SHA512 206f4577798d5f8e436083cff0a2e04fab0f46c1f659820abb53a72793915b166212be649b5fd5d5d9ad3c79056d0c1c8e32b643498a2427376587c3f4e11da8
+EBUILD twisted-24.7.0_rc2.ebuild 4556 BLAKE2B a1363d3c94e1bf8751eb83fcb33d7f300d5bd2e1f23f24769d84a884e8e7483ee9023080e692bca2816a9bf4470df01e796b3fd922e028617b99a3ec2f402ef2 SHA512 7e5f4fc7c7ede2f8073398de90d442ab6985a7e95b443bd3b4406b6daa3ede29f5fbd8111a427ef10c8a3e213cf76ae138981e2017dfa586f49e36e53cc48ad6
MISC metadata.xml 1231 BLAKE2B 60cd09e34c32152e6f08727c1281c65e871a51e64310a62a3104342fcb0e87e96b10cd4c7601668f054f9a2cb01fdf8ebeca3ed86b61ae2496a4d941897aa296 SHA512 800d9cd783d95cecb268362619deb346783149fa9226df714f9ce990da2d45edd3c8e5669e24ad15dfdf986a5816a5361c00f13719bb0dee3e6ae1578a889339
diff --git a/dev-python/twisted/files/twisted-24.3.0-skip-dsa-tests.patch b/dev-python/twisted/files/twisted-24.3.0-skip-dsa-tests.patch
new file mode 100644
index 000000000000..9dabba43391a
--- /dev/null
+++ b/dev-python/twisted/files/twisted-24.3.0-skip-dsa-tests.patch
@@ -0,0 +1,75 @@
+From b948467c3f01cc46b5dcda8802b913295b7c8999 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20Van=C4=9Bk?= <arkamar@atlas.cz>
+Date: Wed, 31 Jul 2024 18:05:01 +0200
+Subject: [PATCH] Skip tests requiring DSA if SSH does not support DSS
+
+Modern OpenSSH no longer supports DSA/DSS. We need to skip tests that
+use DSA if it is not supported by the installed SSH. The availability of
+DSA can be checked by querying `ssh -Q key`, which includes `ssh-dss` in
+the output if DSS is available, as suggested in [1].
+
+[1] https://github.com/twisted/twisted/issues/12273#issuecomment-2260799255
+
+Issue: https://github.com/twisted/twisted/issues/12273
+
+Based on upstream PR https://github.com/twisted/twisted/pull/12274
+
+diff --git a/src/twisted/conch/test/test_cftp.py b/src/twisted/conch/test/test_cftp.py
+index 40b2deaedb..51a978de4b 100644
+--- a/src/twisted/conch/test/test_cftp.py
++++ b/src/twisted/conch/test/test_cftp.py
+@@ -20,6 +20,7 @@ from zope.interface import implementer
+
+ from twisted.conch import ls
+ from twisted.conch.interfaces import ISFTPFile
++from twisted.conch.test.test_conch import HAS_DSA
+ from twisted.conch.test.test_filetransfer import FileTransferTestAvatar, SFTPTestBase
+ from twisted.cred import portal
+ from twisted.internet import defer, error, interfaces, protocol, reactor
+@@ -1436,6 +1437,7 @@ exit
+ @skipIf(skipTests, "don't run w/o spawnProcess or cryptography")
+ @skipIf(not which("ssh"), "no ssh command-line client available")
+ @skipIf(not which("sftp"), "no sftp command-line client available")
++@skipIf(not HAS_DSA, "needs ssh supporting dsa")
+ class OurServerSftpClientTests(CFTPClientTestBase):
+ """
+ Test the sftp server against sftp command line client.
+diff --git a/src/twisted/conch/test/test_conch.py b/src/twisted/conch/test/test_conch.py
+index 45b357c995..9e77c9b2e9 100644
+--- a/src/twisted/conch/test/test_conch.py
++++ b/src/twisted/conch/test/test_conch.py
+@@ -59,6 +59,21 @@ except ImportError as e:
+ else:
+ StdioInteractingSession = _StdioInteractingSession
+
++def _has_dsa():
++ has_dsa = False
++ try:
++ output = subprocess.check_output(
++ [which("ssh")[0], "-Q", "key"], stderr=subprocess.STDOUT, text=True
++ )
++ keys = output.split()
++ if "ssh-dss" in keys:
++ has_dsa = True
++ except BaseException:
++ pass
++ return has_dsa
++
++HAS_DSA = _has_dsa()
++
+
+ def _has_ipv6():
+ """Returns True if the system can bind an IPv6 address."""
+@@ -551,6 +566,9 @@ class OpenSSHClientMixin:
+ if not which("ssh"):
+ skip = "no ssh command-line client available"
+
++ if not HAS_DSA:
++ skip = "needs ssh supporting dsa"
++
+ def execute(self, remoteCommand, process, sshArgs=""):
+ """
+ Connects to the SSH server started in L{ConchServerSetupMixin.setUp} by
+--
+2.44.2
+
diff --git a/dev-python/twisted/files/twisted-24.7.0_rc1-skip-py313-tests.patch b/dev-python/twisted/files/twisted-24.7.0_rc1-skip-py313-tests.patch
new file mode 100644
index 000000000000..9be4283567ec
--- /dev/null
+++ b/dev-python/twisted/files/twisted-24.7.0_rc1-skip-py313-tests.patch
@@ -0,0 +1,54 @@
+From 314fb5e18cbcaa11040a129d6ffaee3c376f55e7 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20Van=C4=9Bk?= <arkamar@gentoo.org>
+Date: Wed, 31 Jul 2024 15:08:20 +0200
+Subject: [PATCH] skip py3.13 incompatible tests
+
+Based on upstream changes in PR https://github.com/twisted/twisted/pull/12092
+
+diff --git a/src/twisted/internet/test/test_inlinecb.py b/src/twisted/internet/test/test_inlinecb.py
+index 355572b566..11c09c6996 100644
+--- a/src/twisted/internet/test/test_inlinecb.py
++++ b/src/twisted/internet/test/test_inlinecb.py
+@@ -6,11 +6,13 @@
+ Tests for L{twisted.internet.inlineCallbacks}.
+ """
+
++import sys
+ import traceback
+ import unittest as pyunit
+ import weakref
+ from enum import Enum
+ from typing import Any, Generator, List, Set, Union
++from unittest import skipIf
+
+ from twisted.internet import reactor, task
+ from twisted.internet.defer import (
+@@ -1122,6 +1124,9 @@ class NonLocalExitTests(TestCase):
+
+
+ class ForwardTraceBackTests(SynchronousTestCase):
++ HAVE_PY3_12_OR_OLDER = sys.version_info < (3, 13)
++
++ @skipIf(not HAVE_PY3_12_OR_OLDER, "Needs Python 3.12 or older")
+ def test_forwardTracebacks(self):
+ """
+ Chained inlineCallbacks are forwarding the traceback information
+@@ -1171,6 +1176,7 @@ class ForwardTraceBackTests(SynchronousTestCase):
+
+ return d
+
++ @skipIf(not HAVE_PY3_12_OR_OLDER, "Needs Python 3.12 or older")
+ def test_forwardLotsOfTracebacks(self):
+ """
+ Several Chained inlineCallbacks gives information about all generators.
+@@ -1218,6 +1224,7 @@ class ForwardTraceBackTests(SynchronousTestCase):
+ self.assertIn("Error Marker", tb)
+ self.assertIn("in erroring", f.getTraceback())
+
++ @skipIf(not HAVE_PY3_12_OR_OLDER, "Needs Python 3.12 or older")
+ def test_forwardLotsOfTracebacksCoro(self):
+ """
+ Several chained inlineCallbacks mixed with coroutines gives information
+--
+2.44.2
+
diff --git a/dev-python/twisted/twisted-24.3.0.ebuild b/dev-python/twisted/twisted-24.3.0.ebuild
index 2d913b858d7d..bc02689ec2f8 100644
--- a/dev-python/twisted/twisted-24.3.0.ebuild
+++ b/dev-python/twisted/twisted-24.3.0.ebuild
@@ -80,6 +80,10 @@ BDEPEND="
)
"
+PATCHES=(
+ "${FILESDIR}/${PN}-24.3.0-skip-dsa-tests.patch"
+)
+
python_prepare_all() {
# upstream test for making releases; not very useful and requires
# sphinx (including on py2)
diff --git a/dev-python/twisted/twisted-24.3.0_p20240628.ebuild b/dev-python/twisted/twisted-24.7.0_rc1.ebuild
index 4fd83b143c4f..ba4dbbbf84fe 100644
--- a/dev-python/twisted/twisted-24.3.0_p20240628.ebuild
+++ b/dev-python/twisted/twisted-24.7.0_rc1.ebuild
@@ -8,7 +8,7 @@ PYTHON_TESTED=( python3_{10..13} pypy3 )
PYTHON_COMPAT=( "${PYTHON_TESTED[@]}" )
PYTHON_REQ_USE="threads(+)"
-inherit distutils-r1 virtualx
+inherit distutils-r1 pypi virtualx
DESCRIPTION="An asynchronous networking framework written in Python"
HOMEPAGE="
@@ -16,15 +16,9 @@ HOMEPAGE="
https://github.com/twisted/twisted/
https://pypi.org/project/Twisted/
"
-# The snapshot is based on commit from PR https://github.com/twisted/twisted/pull/12092
-# which resolves most of remaining py3.13 issues.
-COMMIT="8f6b89855d4384e3ed80884ca6f7ecc46f7a92fb"
-SRC_URI="
- https://github.com/twisted/twisted/archive/${COMMIT}.tar.gz
- -> ${P}.gh.tar.gz
+SRC_URI+="
https://dev.gentoo.org/~mgorny/dist/twisted-regen-cache.gz
"
-S="${WORKDIR}/${PN}-${COMMIT}"
LICENSE="MIT"
SLOT="0"
@@ -87,7 +81,9 @@ BDEPEND="
"
PATCHES=(
- "${FILESDIR}/${P}-skip-py313-test.patch"
+ "${FILESDIR}/${PN}-24.3.0-skip-dsa-tests.patch"
+ "${FILESDIR}/${PN}-24.3.0_p20240628-skip-py313-test.patch"
+ "${FILESDIR}/${PN}-24.7.0_rc1-skip-py313-tests.patch"
)
python_prepare_all() {
@@ -120,6 +116,10 @@ python_test() {
# breaks some tests by overriding empty environment
local -x SANDBOX_ON=0
+ # for py3.13, see
+ # https://github.com/twisted/twisted/pull/12092#issuecomment-2194326096
+ local -x LINES=25
+ local -x COLUMNS=80
"${EPYTHON}" -m twisted.trial twisted ||
die "Tests failed with ${EPYTHON}"
}
diff --git a/dev-python/twisted/twisted-24.7.0_rc2.ebuild b/dev-python/twisted/twisted-24.7.0_rc2.ebuild
new file mode 100644
index 000000000000..23de55ced5f0
--- /dev/null
+++ b/dev-python/twisted/twisted-24.7.0_rc2.ebuild
@@ -0,0 +1,161 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=hatchling
+PYTHON_TESTED=( python3_{10..13} pypy3 )
+PYTHON_COMPAT=( "${PYTHON_TESTED[@]}" )
+PYTHON_REQ_USE="threads(+)"
+
+inherit distutils-r1 multiprocessing pypi virtualx
+
+DESCRIPTION="An asynchronous networking framework written in Python"
+HOMEPAGE="
+ https://twisted.org/
+ https://github.com/twisted/twisted/
+ https://pypi.org/project/Twisted/
+"
+SRC_URI+="
+ https://dev.gentoo.org/~mgorny/dist/twisted-regen-cache.gz
+"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~arm64-macos ~x64-macos"
+IUSE="conch http2 serial ssl test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ >=dev-python/attrs-19.2.0[${PYTHON_USEDEP}]
+ >=dev-python/automat-0.8.0[${PYTHON_USEDEP}]
+ >=dev-python/constantly-15.1[${PYTHON_USEDEP}]
+ >=dev-python/hyperlink-17.1.1[${PYTHON_USEDEP}]
+ >=dev-python/incremental-22.10.0[${PYTHON_USEDEP}]
+ >=dev-python/typing-extensions-4.2.0[${PYTHON_USEDEP}]
+ >=dev-python/zope-interface-5[${PYTHON_USEDEP}]
+ conch? (
+ >=dev-python/appdirs-1.4.0[${PYTHON_USEDEP}]
+ >=dev-python/bcrypt-3.0.0[${PYTHON_USEDEP}]
+ >=dev-python/cryptography-3.3[${PYTHON_USEDEP}]
+ dev-python/pyasn1[${PYTHON_USEDEP}]
+ )
+ http2? (
+ <dev-python/h2-5.0[${PYTHON_USEDEP}]
+ >=dev-python/h2-3.0.0[${PYTHON_USEDEP}]
+ <dev-python/priority-2.0[${PYTHON_USEDEP}]
+ >=dev-python/priority-1.1.0[${PYTHON_USEDEP}]
+ )
+ serial? (
+ >=dev-python/pyserial-3.0[${PYTHON_USEDEP}]
+ )
+ ssl? (
+ >=dev-python/pyopenssl-21.0.0[${PYTHON_USEDEP}]
+ >=dev-python/service-identity-18.1.0[${PYTHON_USEDEP}]
+ >=dev-python/idna-2.4[${PYTHON_USEDEP}]
+ )
+"
+BDEPEND="
+ >=dev-python/hatch-fancy-pypi-readme-22.5.0[${PYTHON_USEDEP}]
+ >=dev-python/incremental-22.10.0[${PYTHON_USEDEP}]
+ test? (
+ ${RDEPEND}
+ $(python_gen_cond_dep '
+ >=dev-python/appdirs-1.4.0[${PYTHON_USEDEP}]
+ >=dev-python/bcrypt-3.0.0[${PYTHON_USEDEP}]
+ >=dev-python/constantly-15.1.0[${PYTHON_USEDEP}]
+ <dev-python/cython-test-exception-raiser-2[${PYTHON_USEDEP}]
+ >=dev-python/cython-test-exception-raiser-1.0.2[${PYTHON_USEDEP}]
+ >=dev-python/idna-2.4[${PYTHON_USEDEP}]
+ >=dev-python/hypothesis-6.56[${PYTHON_USEDEP}]
+ dev-python/pyasn1[${PYTHON_USEDEP}]
+ >=dev-python/pyhamcrest-2[${PYTHON_USEDEP}]
+ >=dev-python/pyserial-3.0[${PYTHON_USEDEP}]
+ virtual/openssh
+ ssl? (
+ >=dev-python/pyopenssl-21.0.0[${PYTHON_USEDEP}]
+ >=dev-python/service-identity-18.1.0[${PYTHON_USEDEP}]
+ )
+ ' "${PYTHON_TESTED[@]}")
+ )
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-24.3.0-skip-dsa-tests.patch"
+ "${FILESDIR}/${PN}-24.3.0_p20240628-skip-py313-test.patch"
+ "${FILESDIR}/${PN}-24.7.0_rc1-skip-py313-tests.patch"
+)
+
+python_prepare_all() {
+ # upstream test for making releases; not very useful and requires
+ # sphinx (including on py2)
+ rm src/twisted/python/test/test_release.py || die
+
+ # multicast tests fail within network-sandbox
+ sed -e 's:test_joinLeave:_&:' \
+ -e 's:test_loopback:_&:' \
+ -e 's:test_multiListen:_&:' \
+ -e 's:test_multicast:_&:' \
+ -i src/twisted/test/test_udp.py || die
+
+ distutils-r1_python_prepare_all
+}
+
+src_test() {
+ # the test suite handles missing file & failing ioctl()s gracefully
+ # but not permission errors from sandbox
+ addwrite /dev/net/tun
+ virtx distutils-r1_src_test
+}
+
+python_test() {
+ if ! has "${EPYTHON}" "${PYTHON_TESTED[@]/_/.}"; then
+ einfo "Skipping tests on ${EPYTHON} (xfail)"
+ return
+ fi
+
+ # breaks some tests by overriding empty environment
+ local -x SANDBOX_ON=0
+ # for py3.13, see
+ # https://github.com/twisted/twisted/pull/12092#issuecomment-2194326096
+ local -x LINES=25 COLUMNS=80
+ "${EPYTHON}" -m twisted.trial -j "$(makeopts_jobs)" twisted ||
+ die "Tests failed with ${EPYTHON}"
+}
+
+python_install() {
+ distutils-r1_python_install
+
+ # own the dropin.cache so we don't leave orphans
+ > "${D}$(python_get_sitedir)"/twisted/plugins/dropin.cache || die
+
+ python_doscript "${WORKDIR}"/twisted-regen-cache
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+
+ newconfd "${FILESDIR}/twistd.conf" twistd
+ newinitd "${FILESDIR}/twistd.init" twistd
+}
+
+python_postinst() {
+ twisted-regen-cache || die
+}
+
+pkg_postinst() {
+ if [[ -z ${ROOT} ]]; then
+ python_foreach_impl python_postinst
+ fi
+}
+
+python_postrm() {
+ rm -f "${ROOT}$(python_get_sitedir)/twisted/plugins/dropin.cache" || die
+}
+
+pkg_postrm() {
+ # if we're removing the last version, remove the cache file
+ if [[ ! ${REPLACING_VERSIONS} ]]; then
+ python_foreach_impl python_postrm
+ fi
+}