diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-06-29 12:04:12 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-06-29 12:04:12 +0100 |
commit | 0f558761aa2dee1017b4751e4017205e015a9560 (patch) | |
tree | 037df795519468a25d9362b4e95cdaeb84eb1cf9 /dev-python/twisted | |
parent | 752d6256e5204b958b0ef7905675a940b5e9172f (diff) |
gentoo resync : 29.12.2022
Diffstat (limited to 'dev-python/twisted')
-rw-r--r-- | dev-python/twisted/Manifest | 8 | ||||
-rw-r--r-- | dev-python/twisted/files/twisted-22.4.0-py311.patch | 55 | ||||
-rw-r--r-- | dev-python/twisted/twisted-22.1.0-r1.ebuild | 160 | ||||
-rw-r--r-- | dev-python/twisted/twisted-22.1.0.ebuild | 162 | ||||
-rw-r--r-- | dev-python/twisted/twisted-22.2.0.ebuild | 151 | ||||
-rw-r--r-- | dev-python/twisted/twisted-22.4.0-r1.ebuild (renamed from dev-python/twisted/twisted-22.4.0.ebuild) | 44 |
6 files changed, 84 insertions, 496 deletions
diff --git a/dev-python/twisted/Manifest b/dev-python/twisted/Manifest index 3510584a72be..7471acbf2f52 100644 --- a/dev-python/twisted/Manifest +++ b/dev-python/twisted/Manifest @@ -1,12 +1,8 @@ AUX twistd.conf 277 BLAKE2B 78ca35b410a6597c9afe6a9c8d3dfb1de113411634901f936794e8a59c0644233d0673e710bd0870ecf4312d079c46f62f43928605700559134f1fb62490559a SHA512 76d44caebab8404f16937c2515ad9ae8236732a48c7127366f7fa22c6ed3d88ace2d33b832a6d95f775973d41b7caf75344805fe5b01e964c04eb710bf3c89fb AUX twistd.init 563 BLAKE2B 24488118b025bf2068bbf07af900064ff6a7ee99106c3da30f15f2b3f85af7443212afebc6b52a12645488b85656f87b653df9263fc2be6bd09707917899f252 SHA512 7860601beba1efda2b0a045b2a044ec33caff9ee915d45225c05e281760a68da349b4c45080600177aab32aa806714327acf3cf5dda92be0874f781f129bb129 AUX twisted-22.1.0-force-gtk3.patch 2634 BLAKE2B bf297589d56a59149e1a269aef416a9aef26dd2123cd9fc87358d19b279bd2924e84d3e9fffe5e6edb70f7268c19b4053cfdf6362b04dd6e91b3a2c997e0f92f SHA512 85b1678cf6c73e78004a015424f2e092b42bf4f5899ed607093b4c26ff1411fe22267df09c331f80086f9d46e5a6dadfad7fe62cbb04e3edeaaa05f40c96239a -DIST twisted-22.1.0.tar.gz 3883519 BLAKE2B 0b438481af94fbfe08c7470a71421e176ca4994efaf7144b2bd3bc7e69c774295e04831d5356af104d087d970856c1c153b30331cb1598226f83e761b624a53c SHA512 1db52865d00e07044bc755b25bef2fa260cf269a8b51512bec97a015fa484d0b331b41154b52f97b5e8c477d3e5ad1d003f5ac15c7361988d073d097c6e7355d -DIST twisted-22.2.0.tar.gz 3887750 BLAKE2B 43b50aa33f9a70f2123930ebfc0e9fec08a6faa791dc8fb73c1252fc1de3e00844e421f653d920e5f651aff89557750c6dc6c4557689e01bc9a0793c15de8eea SHA512 a2f66055f0ea6658a04888316b9eb90bd0f389c72db8315fe1722a70f16bb290805d98acc8cfd8a5d22b4817683603aaea50bb04a204927898bd74fc58a1db6d +AUX twisted-22.4.0-py311.patch 2166 BLAKE2B d81ced5ea6e669615ce8ae677a40f22f6abe27a238f81de8f5d0d907b2831c12d37b3365083d15f5d395ecb75b00e2e1d66cc2a61673afd6b6ea80ddcb3fba13 SHA512 3a1a23beea84df6f668b96d962c78a2d4bafb114b9a18f18bf15391e0ca66647a4b702212cda8ab4e1e162ccb274d07b525c712f248c9f3a267c80c7ecc4bd34 DIST twisted-22.4.0.tar.gz 3896724 BLAKE2B 830a724156473a28394e6c731f6cec184c491410dc880bc2e37a99cb460c7fe040219463f224941532b12478abe953aa0228c70676e5baecda4a3b2bdd6a0a32 SHA512 776d36040bcefb9ca65e471d9058fe1067ffc8171a501cb451e9d4824a88dd83f79dc9b27a127ca898451587454ee661000acbce6c4c39b069aeadd64710f103 DIST twisted-regen-cache.gz 911 BLAKE2B ffd3fcda6c67ffe6fd3ef581c8d507548396b66ed0708e9a5c790095e579c0d5f0f71596acf05712989da2ddef2b8d437eca973bc4d80ef8a9fa852915f38305 SHA512 95a9b931c73017d16d1b5e6b41345dddffe62b6af1a8e93b5e40d06d3d15be17b0dd0181c767ffeeb791534d463764ef9e066fa6c2ee2ac4b53c86d1da8fce03 -EBUILD twisted-22.1.0-r1.ebuild 4696 BLAKE2B 9391c59f3de7d47632180b7a04040b493f08598cb14ad637b8640832b84270fa18ef2c2eabb02258b7877bcddef4e006a466a25e2d56283406026e458df4a328 SHA512 d438f9b45e84be4a06464f0445d9812ba1407ff37f0c817e8ff4e599a3aa88641f772013d603147a552dfaae28e35b713f14913541ce82d0da2ec18e8897aa5b -EBUILD twisted-22.1.0.ebuild 4740 BLAKE2B 20fd3b47a7880c92c2d44ff6509147b3a7fe66a27bd960236b14b5d1b31c51cbf8ddd0b0ddacbd41cd18920a4da07c102deab13643bf2e82e62a49027e6887c7 SHA512 717b0f7fc47f8ff0a5b470b5a9a0bf21f4c76d75681aec55763d8b0bcd0996c75242950fe7498e07e46046fa383fccf6f572ad6f83db97fbfa11da0b3111d575 -EBUILD twisted-22.2.0.ebuild 4328 BLAKE2B d8106f754f5244bf13d1e3b9c1a3be76c1b36816a2e36e0fcfaceea9b193ecfc6da4e4b5fad53b8c13f5bf84d787cdcb90c51a5457134f6c18cc27ae2221c508 SHA512 a5049f1f33c2d765708ca836bb62f081931572ff57669a9aa13c04d4d117642276e257fc848a4b9699811492eec497250be3c4741eca67b8815aecde3ace6387 -EBUILD twisted-22.4.0.ebuild 4450 BLAKE2B fbade8a9c7fe3e7b23fccbf858f70002d8563796d0799a4efa7fe23a7520ae942b3e7ce18de6472eb253ced328e769ff2d9f9e4cf55494826125cba258b04b31 SHA512 7adc711818f9943c2f617022032e9139f0bb0da56984e3bfc0f0feeca0a0423444b85e2771f6292927ca5b063531d6377b3a142835d2aa889b16a1e5cf5dcbf1 +EBUILD twisted-22.4.0-r1.ebuild 4762 BLAKE2B d7a1d0a333cbc3536fd489f6dd3addf5e0a3eb619891ff56414bf687152d9a21ae1efd21ded5432f98269ca6c5dd3abb30d9f6f1d841f2675109acdc5f7505ac SHA512 8dafe34f63c19906290b2b5db3457b2fe0691ff80c2472dddfcead28370315d9b06c3afc9ba417afdb62ba99e1e42b87a071206b4ac8a199ee513ddb4485532e MISC metadata.xml 1352 BLAKE2B da3eecfbfd73709ff8fb48b985d64fa80d134c38a0c04d8c7b08e0ebd936cb2179f579deb6f91f38fd08b74e9454b693b4a89c9ab194296104c519e6f80ddc8a SHA512 f244db7eb7a13e35f8825e2b16cf3cb953c47e68be234efc9d922462cc7ee66e1748e09bf4735bee59cd1016eb38c64ca23f70a25da5bb7311f869cebbb45569 diff --git a/dev-python/twisted/files/twisted-22.4.0-py311.patch b/dev-python/twisted/files/twisted-22.4.0-py311.patch new file mode 100644 index 000000000000..ed8ded87d4de --- /dev/null +++ b/dev-python/twisted/files/twisted-22.4.0-py311.patch @@ -0,0 +1,55 @@ +From 074fc742a699278ea5266b34aace1e34049b3de3 Mon Sep 17 00:00:00 2001 +From: Colin Watson <cjwatson@canonical.com> +Date: Sat, 23 Apr 2022 22:29:07 +0100 +Subject: [PATCH] Implement twisted.python.failure._Code.co_positions + +This is needed for compatibility with Python 3.11. +--- + src/twisted/newsfragments/10336.bugfix | 1 + + src/twisted/python/failure.py | 5 ++++- + src/twisted/test/test_failure.py | 1 + + 3 files changed, 6 insertions(+), 1 deletion(-) + create mode 100644 src/twisted/newsfragments/10336.bugfix + +diff --git a/src/twisted/newsfragments/10336.bugfix b/src/twisted/newsfragments/10336.bugfix +new file mode 100644 +index 00000000000..a7ffab3627d +--- /dev/null ++++ b/src/twisted/newsfragments/10336.bugfix +@@ -0,0 +1 @@ ++Implement twisted.python.failure._Code.co_positions for compatibility with Python 3.11. +diff --git a/src/twisted/python/failure.py b/src/twisted/python/failure.py +index 6471e7bca59..c5a359e405b 100644 +--- a/src/twisted/python/failure.py ++++ b/src/twisted/python/failure.py +@@ -130,7 +130,7 @@ def _Traceback(stackFrames, tbFrames): + + + # The set of attributes for _TracebackFrame, _Frame and _Code were taken from +-# https://docs.python.org/3.10/library/inspect.html Other Pythons may have a ++# https://docs.python.org/3.11/library/inspect.html Other Pythons may have a + # few more attributes that should be added if needed. + class _TracebackFrame: + """ +@@ -202,6 +202,9 @@ def __init__(self, name, filename): + self.co_nlocals = 0 + self.co_stacksize = 0 + ++ def co_positions(self): ++ return ((None, None, None, None),) ++ + + _inlineCallbacksExtraneous = [] + +diff --git a/src/twisted/test/test_failure.py b/src/twisted/test/test_failure.py +index 6dd7c682bf9..6fd82c868ec 100644 +--- a/src/twisted/test/test_failure.py ++++ b/src/twisted/test/test_failure.py +@@ -825,6 +825,7 @@ def test_fakeCodeAttributes(self): + self.assertIsInstance(code.co_nlocals, int) + self.assertIsInstance(code.co_stacksize, int) + self.assertIsInstance(code.co_varnames, list) ++ self.assertIsInstance(code.co_positions(), tuple) + + def test_fakeTracebackFrame(self): + """ diff --git a/dev-python/twisted/twisted-22.1.0-r1.ebuild b/dev-python/twisted/twisted-22.1.0-r1.ebuild deleted file mode 100644 index 60f40b4e8081..000000000000 --- a/dev-python/twisted/twisted-22.1.0-r1.ebuild +++ /dev/null @@ -1,160 +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..10} pypy3 ) -PYTHON_REQ_USE="threads(+)" - -inherit distutils-r1 virtualx - -DESCRIPTION="An asynchronous networking framework written in Python" -HOMEPAGE="https://www.twistedmatrix.com/trac/" -SRC_URI=" - https://github.com/twisted/twisted/archive/${P}.tar.gz - https://dev.gentoo.org/~mgorny/dist/twisted-regen-cache.gz" -S=${WORKDIR}/${PN}-${P} - -LICENSE="MIT" -SLOT="0" -KEYWORDS="~alpha amd64 ~arm arm64 hppa ~ia64 ~m68k ppc ppc64 ~riscv ~s390 sparc ~x86" -IUSE="conch crypt http2 serial test" -RESTRICT="!test? ( test )" - -RDEPEND=" - >=dev-python/attrs-19.2.0[${PYTHON_USEDEP}] - >=dev-python/automat-0.3.0[${PYTHON_USEDEP}] - >=dev-python/constantly-15.1.0[${PYTHON_USEDEP}] - >=dev-python/hyperlink-17.1.1[${PYTHON_USEDEP}] - >=dev-python/incremental-21.3.0[${PYTHON_USEDEP}] - >=dev-python/pyhamcrest-1.9.0[${PYTHON_USEDEP}] - >=dev-python/typing-extensions-3.6.5[${PYTHON_USEDEP}] - >=dev-python/zope-interface-4.4.2[${PYTHON_USEDEP}] - conch? ( - >=dev-python/appdirs-1.4.0[${PYTHON_USEDEP}] - dev-python/bcrypt[${PYTHON_USEDEP}] - >=dev-python/cryptography-1.5.0[${PYTHON_USEDEP}] - dev-python/pyasn1[${PYTHON_USEDEP}] - ) - crypt? ( - >=dev-python/pyopenssl-16.0.0[${PYTHON_USEDEP}] - dev-python/service_identity[${PYTHON_USEDEP}] - >=dev-python/idna-0.6[${PYTHON_USEDEP}] - ) - serial? ( >=dev-python/pyserial-3.0[${PYTHON_USEDEP}] ) - http2? ( - >=dev-python/h2-3.0.0[${PYTHON_USEDEP}] - <dev-python/h2-4.0.0[${PYTHON_USEDEP}] - >=dev-python/priority-1.1.0[${PYTHON_USEDEP}] - <dev-python/priority-2.0[${PYTHON_USEDEP}] - ) -" -BDEPEND=" - >=dev-python/incremental-21.3.0[${PYTHON_USEDEP}] - test? ( - >=dev-python/appdirs-1.4.0[${PYTHON_USEDEP}] - dev-python/bcrypt[${PYTHON_USEDEP}] - >=dev-python/constantly-15.1.0[${PYTHON_USEDEP}] - dev-python/cython-test-exception-raiser[${PYTHON_USEDEP}] - dev-python/idna[${PYTHON_USEDEP}] - dev-python/pyasn1[${PYTHON_USEDEP}] - dev-python/pyserial[${PYTHON_USEDEP}] - net-misc/openssh - $(python_gen_cond_dep ' - dev-python/gmpy[${PYTHON_USEDEP}] - ' 'python*') - !alpha? ( !hppa? ( !ia64? ( - >=dev-python/cryptography-0.9.1[${PYTHON_USEDEP}] - >=dev-python/pyopenssl-0.13[${PYTHON_USEDEP}] - dev-python/service_identity[${PYTHON_USEDEP}] - ) ) ) - ) -" - -PATCHES=( - # https://twistedmatrix.com/trac/ticket/10200 - "${FILESDIR}/${P}-force-gtk3.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 - - # puts system in EMFILE state, then the exception handler may fail - # trying to open more files due to some gi magic - sed -e '/SKIP_EMFILE/s:False:True:' \ - -i src/twisted/internet/test/test_tcp.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 - - # These tests rely on warnings which seems work unreliably between python versions - sed -e 's:test_currentEUID:_&:' \ - -e 's:test_currentUID:_&:' -i src/twisted/python/test/test_util.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() { - "${EPYTHON}" -m twisted.trial 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() { - python_foreach_impl python_postinst - - einfo "Install complete" - if use test ; then - einfo "" - einfo "Some tests have been disabled during testing due to" - einfo "known incompatibilities with the emerge sandboxes and/or" - einfo "not runnable as the root user." - einfo "For a complete test suite run on the code." - einfo "Run the tests as a normal user for each python it is installed to." - einfo " ie: $ python3.6 /usr/bin/trial twisted" - 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 -} diff --git a/dev-python/twisted/twisted-22.1.0.ebuild b/dev-python/twisted/twisted-22.1.0.ebuild deleted file mode 100644 index ab2a590fca6d..000000000000 --- a/dev-python/twisted/twisted-22.1.0.ebuild +++ /dev/null @@ -1,162 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -PYTHON_COMPAT=( python3_{8..10} ) -PYTHON_REQ_USE="threads(+)" - -inherit distutils-r1 virtualx - -DESCRIPTION="An asynchronous networking framework written in Python" -HOMEPAGE="https://www.twistedmatrix.com/trac/" -SRC_URI=" - https://github.com/twisted/twisted/archive/${P}.tar.gz - https://dev.gentoo.org/~mgorny/dist/twisted-regen-cache.gz" -S=${WORKDIR}/${PN}-${P} - -LICENSE="MIT" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ppc ppc64 ~riscv ~s390 sparc x86" -IUSE="conch crypt http2 serial test" -RESTRICT="!test? ( test )" - -RDEPEND=" - >=dev-python/attrs-19.2.0[${PYTHON_USEDEP}] - >=dev-python/automat-0.3.0[${PYTHON_USEDEP}] - >=dev-python/constantly-15.1.0[${PYTHON_USEDEP}] - >=dev-python/hyperlink-17.1.1[${PYTHON_USEDEP}] - >=dev-python/incremental-21.3.0[${PYTHON_USEDEP}] - >=dev-python/pyhamcrest-1.9.0[${PYTHON_USEDEP}] - >=dev-python/typing-extensions-3.6.5[${PYTHON_USEDEP}] - >=dev-python/zope-interface-4.4.2[${PYTHON_USEDEP}] - conch? ( - >=dev-python/appdirs-1.4.0[${PYTHON_USEDEP}] - dev-python/bcrypt[${PYTHON_USEDEP}] - >=dev-python/cryptography-1.5.0[${PYTHON_USEDEP}] - dev-python/pyasn1[${PYTHON_USEDEP}] - ) - crypt? ( - >=dev-python/pyopenssl-16.0.0[${PYTHON_USEDEP}] - dev-python/service_identity[${PYTHON_USEDEP}] - >=dev-python/idna-0.6[${PYTHON_USEDEP}] - ) - serial? ( >=dev-python/pyserial-3.0[${PYTHON_USEDEP}] ) - http2? ( - >=dev-python/h2-3.0.0[${PYTHON_USEDEP}] - <dev-python/h2-4.0.0[${PYTHON_USEDEP}] - >=dev-python/priority-1.1.0[${PYTHON_USEDEP}] - <dev-python/priority-2.0[${PYTHON_USEDEP}] - ) -" -BDEPEND=" - >=dev-python/incremental-21.3.0[${PYTHON_USEDEP}] - test? ( - >=dev-python/appdirs-1.4.0[${PYTHON_USEDEP}] - dev-python/bcrypt[${PYTHON_USEDEP}] - >=dev-python/constantly-15.1.0[${PYTHON_USEDEP}] - dev-python/cython-test-exception-raiser[${PYTHON_USEDEP}] - dev-python/idna[${PYTHON_USEDEP}] - dev-python/pyasn1[${PYTHON_USEDEP}] - dev-python/pyserial[${PYTHON_USEDEP}] - net-misc/openssh - $(python_gen_cond_dep ' - dev-python/gmpy[${PYTHON_USEDEP}] - ' 'python*') - !alpha? ( !hppa? ( !ia64? ( - >=dev-python/cryptography-0.9.1[${PYTHON_USEDEP}] - >=dev-python/pyopenssl-0.13[${PYTHON_USEDEP}] - dev-python/service_identity[${PYTHON_USEDEP}] - ) ) ) - ) -" - -PATCHES=( - # https://twistedmatrix.com/trac/ticket/10200 - "${FILESDIR}/${P}-force-gtk3.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 - - # puts system in EMFILE state, then the exception handler may fail - # trying to open more files due to some gi magic - sed -e '/SKIP_EMFILE/s:False:True:' \ - -i src/twisted/internet/test/test_tcp.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 - - # These tests rely on warnings which seems work unreliably between python versions - sed -e 's:test_currentEUID:_&:' \ - -e 's:test_currentUID:_&:' -i src/twisted/python/test/test_util.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() { - # TODO: upstream seems to override our build paths - distutils_install_for_testing - - "${EPYTHON}" -m twisted.trial 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() { - python_foreach_impl python_postinst - - einfo "Install complete" - if use test ; then - einfo "" - einfo "Some tests have been disabled during testing due to" - einfo "known incompatibilities with the emerge sandboxes and/or" - einfo "not runnable as the root user." - einfo "For a complete test suite run on the code." - einfo "Run the tests as a normal user for each python it is installed to." - einfo " ie: $ python3.6 /usr/bin/trial twisted" - 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 -} diff --git a/dev-python/twisted/twisted-22.2.0.ebuild b/dev-python/twisted/twisted-22.2.0.ebuild deleted file mode 100644 index 6c2dcb735c72..000000000000 --- a/dev-python/twisted/twisted-22.2.0.ebuild +++ /dev/null @@ -1,151 +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..10} pypy3 ) -PYTHON_REQ_USE="threads(+)" - -inherit distutils-r1 virtualx - -DESCRIPTION="An asynchronous networking framework written in Python" -HOMEPAGE="https://www.twistedmatrix.com/trac/" -SRC_URI=" - https://github.com/twisted/twisted/archive/${P}.tar.gz - https://dev.gentoo.org/~mgorny/dist/twisted-regen-cache.gz" -S=${WORKDIR}/${PN}-${P} - -LICENSE="MIT" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" -IUSE="conch crypt http2 serial test" -RESTRICT="!test? ( test )" - -RDEPEND=" - >=dev-python/attrs-19.2.0[${PYTHON_USEDEP}] - >=dev-python/automat-0.3.0[${PYTHON_USEDEP}] - >=dev-python/constantly-15.1.0[${PYTHON_USEDEP}] - >=dev-python/hyperlink-17.1.1[${PYTHON_USEDEP}] - >=dev-python/incremental-21.3.0[${PYTHON_USEDEP}] - >=dev-python/pyhamcrest-1.9.0[${PYTHON_USEDEP}] - >=dev-python/typing-extensions-3.6.5[${PYTHON_USEDEP}] - >=dev-python/zope-interface-4.4.2[${PYTHON_USEDEP}] - conch? ( - >=dev-python/appdirs-1.4.0[${PYTHON_USEDEP}] - dev-python/bcrypt[${PYTHON_USEDEP}] - >=dev-python/cryptography-1.5.0[${PYTHON_USEDEP}] - dev-python/pyasn1[${PYTHON_USEDEP}] - ) - crypt? ( - >=dev-python/pyopenssl-16.0.0[${PYTHON_USEDEP}] - dev-python/service_identity[${PYTHON_USEDEP}] - >=dev-python/idna-0.6[${PYTHON_USEDEP}] - ) - serial? ( >=dev-python/pyserial-3.0[${PYTHON_USEDEP}] ) - http2? ( - >=dev-python/h2-3.0.0[${PYTHON_USEDEP}] - <dev-python/h2-4.0.0[${PYTHON_USEDEP}] - >=dev-python/priority-1.1.0[${PYTHON_USEDEP}] - <dev-python/priority-2.0[${PYTHON_USEDEP}] - ) -" -BDEPEND=" - >=dev-python/incremental-21.3.0[${PYTHON_USEDEP}] - test? ( - >=dev-python/appdirs-1.4.0[${PYTHON_USEDEP}] - dev-python/bcrypt[${PYTHON_USEDEP}] - >=dev-python/constantly-15.1.0[${PYTHON_USEDEP}] - dev-python/cython-test-exception-raiser[${PYTHON_USEDEP}] - dev-python/idna[${PYTHON_USEDEP}] - dev-python/pyasn1[${PYTHON_USEDEP}] - dev-python/pyserial[${PYTHON_USEDEP}] - net-misc/openssh - $(python_gen_cond_dep ' - dev-python/gmpy[${PYTHON_USEDEP}] - ' 'python*') - !alpha? ( !hppa? ( !ia64? ( - >=dev-python/cryptography-0.9.1[${PYTHON_USEDEP}] - >=dev-python/pyopenssl-0.13[${PYTHON_USEDEP}] - dev-python/service_identity[${PYTHON_USEDEP}] - ) ) ) - ) -" - -PATCHES=( - # https://twistedmatrix.com/trac/ticket/10200 - "${FILESDIR}/${PN}-22.1.0-force-gtk3.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 - - # puts system in EMFILE state, then the exception handler may fail - # trying to open more files due to some gi magic - sed -e '/SKIP_EMFILE/s:False:True:' \ - -i src/twisted/internet/test/test_tcp.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 - - # These tests rely on warnings which seems work unreliably between python versions - sed -e 's:test_currentEUID:_&:' \ - -e 's:test_currentUID:_&:' -i src/twisted/python/test/test_util.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() { - "${EPYTHON}" -m twisted.trial 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 -} diff --git a/dev-python/twisted/twisted-22.4.0.ebuild b/dev-python/twisted/twisted-22.4.0-r1.ebuild index 65b454179630..9863bb3ab1f5 100644 --- a/dev-python/twisted/twisted-22.4.0.ebuild +++ b/dev-python/twisted/twisted-22.4.0-r1.ebuild @@ -4,7 +4,7 @@ EAPI=8 DISTUTILS_USE_PEP517=setuptools -PYTHON_COMPAT=( python3_{8..10} pypy3 ) +PYTHON_COMPAT=( python3_{8..11} pypy3 ) PYTHON_REQ_USE="threads(+)" inherit distutils-r1 virtualx @@ -19,7 +19,7 @@ S=${WORKDIR}/${PN}-${P} LICENSE="MIT" SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~ppc ppc64 ~riscv ~s390 sparc x86" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ppc ppc64 ~riscv ~s390 sparc x86" IUSE="conch crypt http2 serial test" RESTRICT="!test? ( test )" @@ -46,7 +46,7 @@ RDEPEND=" serial? ( >=dev-python/pyserial-3.0[${PYTHON_USEDEP}] ) http2? ( >=dev-python/h2-3.0.0[${PYTHON_USEDEP}] - <dev-python/h2-4.0.0[${PYTHON_USEDEP}] + <dev-python/h2-5.0.0[${PYTHON_USEDEP}] >=dev-python/priority-1.1.0[${PYTHON_USEDEP}] <dev-python/priority-2.0[${PYTHON_USEDEP}] ) @@ -54,28 +54,32 @@ RDEPEND=" BDEPEND=" >=dev-python/incremental-21.3.0[${PYTHON_USEDEP}] test? ( - >=dev-python/appdirs-1.4.0[${PYTHON_USEDEP}] - dev-python/bcrypt[${PYTHON_USEDEP}] - >=dev-python/constantly-15.1.0[${PYTHON_USEDEP}] - dev-python/cython-test-exception-raiser[${PYTHON_USEDEP}] - dev-python/idna[${PYTHON_USEDEP}] - dev-python/pyasn1[${PYTHON_USEDEP}] - dev-python/pyserial[${PYTHON_USEDEP}] - net-misc/openssh + $(python_gen_cond_dep ' + >=dev-python/appdirs-1.4.0[${PYTHON_USEDEP}] + dev-python/bcrypt[${PYTHON_USEDEP}] + >=dev-python/constantly-15.1.0[${PYTHON_USEDEP}] + dev-python/cython-test-exception-raiser[${PYTHON_USEDEP}] + dev-python/idna[${PYTHON_USEDEP}] + dev-python/pyasn1[${PYTHON_USEDEP}] + dev-python/pyserial[${PYTHON_USEDEP}] + net-misc/openssh + !alpha? ( !hppa? ( !ia64? ( + >=dev-python/cryptography-0.9.1[${PYTHON_USEDEP}] + >=dev-python/pyopenssl-0.13[${PYTHON_USEDEP}] + dev-python/service_identity[${PYTHON_USEDEP}] + ) ) ) + ' python3_{8..10} pypy3) $(python_gen_cond_dep ' dev-python/gmpy[${PYTHON_USEDEP}] - ' 'python*') - !alpha? ( !hppa? ( !ia64? ( - >=dev-python/cryptography-0.9.1[${PYTHON_USEDEP}] - >=dev-python/pyopenssl-0.13[${PYTHON_USEDEP}] - dev-python/service_identity[${PYTHON_USEDEP}] - ) ) ) + ' python3_{8..10}) ) " PATCHES=( # https://twistedmatrix.com/trac/ticket/10200 "${FILESDIR}/${PN}-22.1.0-force-gtk3.patch" + # https://github.com/twisted/twisted/pull/1723 + "${FILESDIR}/${P}-py311.patch" ) python_prepare_all() { @@ -114,6 +118,12 @@ src_test() { } python_test() { + # please keep in sync with python_gen_cond_dep! + if ! has "${EPYTHON}" python3_{8..10} pypy3; then + einfo "Skipping tests on ${EPYTHON} (xfail)" + return + fi + "${EPYTHON}" -m twisted.trial twisted || die "Tests failed with ${EPYTHON}" } |