diff options
Diffstat (limited to 'dev-python/twisted')
-rw-r--r-- | dev-python/twisted/Manifest | 4 | ||||
-rw-r--r-- | dev-python/twisted/metadata.xml | 1 | ||||
-rw-r--r-- | dev-python/twisted/twisted-22.10.0.ebuild | 169 |
3 files changed, 173 insertions, 1 deletions
diff --git a/dev-python/twisted/Manifest b/dev-python/twisted/Manifest index 389f6c75bdff..ec3196c2680b 100644 --- a/dev-python/twisted/Manifest +++ b/dev-python/twisted/Manifest @@ -1,7 +1,9 @@ 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.10.0.gh.tar.gz 3512714 BLAKE2B 2fd36ec6922f428e959ce0169bb9a3592b8b3e43aff8d34872883ecf0fad8d0fff01a52f06b54df3dc377f4fc1a488b6d66f9287b108b4749bb7d3c749b96061 SHA512 cf9ed96430376d499ae9627a7d0656c05cb99bc9e9b15a8f4166355363818f090bc3c2b383ed4cf19e1e38fb569e8618d35a0ddde2a90a06f3c9a4ea769837e4 DIST twisted-22.8.0.gh.tar.gz 3937858 BLAKE2B de5f56f2ac92db3ccd29122f3c3bacc01de325e4b00b60a0ea9bcf13c5714487d596299990d292758821e242443d8c65cda03b895196df0a635b0739f08668fc SHA512 890a11ca55fd88636f404678c6fad3fcea9d0604b1b37681a4b92ea74952bc4d1b96a571dde39a4aa82d966121156801f6b42dbd0bb5a309503591a7a77c6d71 DIST twisted-regen-cache.gz 911 BLAKE2B ffd3fcda6c67ffe6fd3ef581c8d507548396b66ed0708e9a5c790095e579c0d5f0f71596acf05712989da2ddef2b8d437eca973bc4d80ef8a9fa852915f38305 SHA512 95a9b931c73017d16d1b5e6b41345dddffe62b6af1a8e93b5e40d06d3d15be17b0dd0181c767ffeeb791534d463764ef9e066fa6c2ee2ac4b53c86d1da8fce03 +EBUILD twisted-22.10.0.ebuild 4789 BLAKE2B 353de2fc3f7e9a2cb5369ad602ffa509fdfb00cfa1bfd5f9d28a79ac268ccd2a60afcfb9eb77a0ce6ed8ff94875243aed9dba9351887b73b52f3f7bbd59a3269 SHA512 4cb20baa7d9902def40f1df0b25802a20539a308d012fa73c6b0a508b7ed7206d58ae32e4616b729ced429467726ef115456c9ed9775dc70798b0bf9a357b2d4 EBUILD twisted-22.8.0-r1.ebuild 4744 BLAKE2B 8d3f302e0986fdedb54ff00141e097f2bf75199a88d9a727b6295ff36b9a7ebfd9fed616ac1de2a3f009dd9d03fa247bd63171b1d024054184332852882d3b0a SHA512 7a7a8da9b4818c40ae482171029866609e938b05f5684137f67989320e0d90d6d4fd3d74fc9099c8fdd4d3e96a247a067a64587c457f8316385c318d2c1c7070 -MISC metadata.xml 1352 BLAKE2B da3eecfbfd73709ff8fb48b985d64fa80d134c38a0c04d8c7b08e0ebd936cb2179f579deb6f91f38fd08b74e9454b693b4a89c9ab194296104c519e6f80ddc8a SHA512 f244db7eb7a13e35f8825e2b16cf3cb953c47e68be234efc9d922462cc7ee66e1748e09bf4735bee59cd1016eb38c64ca23f70a25da5bb7311f869cebbb45569 +MISC metadata.xml 1407 BLAKE2B e0cbf18212ca69f9dfc8c593e82be28caef297f245587824276d0a6c1fce09f31d4fa7497ea7e7b2c365e2ea7ca2301bd05ff2022237db1e11d10cb5ce9ed7a5 SHA512 a57b5d63bdd457d4c15b31451ced824933d67b1932af027a3abf3eef7e009eef24484565c6f543c7bafeb1380145bc9f895c78abb1a97f3c02219f6ed2af8fdd diff --git a/dev-python/twisted/metadata.xml b/dev-python/twisted/metadata.xml index 1b215147691e..1c3b98248f3b 100644 --- a/dev-python/twisted/metadata.xml +++ b/dev-python/twisted/metadata.xml @@ -11,6 +11,7 @@ <name>Twisted Matrix Laboratories</name> </maintainer> <remote-id type="pypi">Twisted</remote-id> + <remote-id type="github">twisted/twisted</remote-id> </upstream> <use> <flag name="conch">include Twisted SSHv2 implementation</flag> diff --git a/dev-python/twisted/twisted-22.10.0.ebuild b/dev-python/twisted/twisted-22.10.0.ebuild new file mode 100644 index 000000000000..4f97100a0391 --- /dev/null +++ b/dev-python/twisted/twisted-22.10.0.ebuild @@ -0,0 +1,169 @@ +# 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 ) +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 -> ${P}.gh.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 ~loong ~m68k ppc ppc64 ~riscv ~s390 sparc ~x86" +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-21.3.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-3.0.0[${PYTHON_USEDEP}] + >=dev-python/cryptography-2.6[${PYTHON_USEDEP}] + dev-python/pyasn1[${PYTHON_USEDEP}] + ) + http2? ( + <dev-python/h2-5.0.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/incremental-21.3.0[${PYTHON_USEDEP}] + test? ( + $(python_gen_cond_dep ' + >=dev-python/appdirs-1.4.0[${PYTHON_USEDEP}] + >=dev-python/constantly-15.1.0[${PYTHON_USEDEP}] + >=dev-python/cython-test-exception-raiser-1.0.2[${PYTHON_USEDEP}] + >=dev-python/idna-2.4[${PYTHON_USEDEP}] + dev-python/hypothesis[${PYTHON_USEDEP}] + dev-python/pyasn1[${PYTHON_USEDEP}] + >=dev-python/pyhamcrest-1.9.0[${PYTHON_USEDEP}] + >=dev-python/pyserial-3.0[${PYTHON_USEDEP}] + net-misc/openssh + conch? ( + >=dev-python/bcrypt-3.0.0[${PYTHON_USEDEP}] + >=dev-python/cryptography-2.6[${PYTHON_USEDEP}] + ) + ssl? ( + >=dev-python/pyopenssl-21.0.0[${PYTHON_USEDEP}] + >=dev-python/service_identity-18.1.0[${PYTHON_USEDEP}] + ) + ' python3_{8..10} pypy3) + $(python_gen_cond_dep ' + dev-python/gmpy[${PYTHON_USEDEP}] + ' python3_{8..10}) + ) +" + +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 + + # broken by new expat + sed -e 's:test_namespaceWithWhitespace:_&:' \ + -i src/twisted/words/test/test_domish.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() { + # 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}" +} + +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 +} |