summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2023-08-29 06:32:26 +0200
committerMichał Górny <mgorny@gentoo.org>2023-08-29 06:59:52 +0200
commit1465e6d2c955bc81bdfbd607418d93a82ad65013 (patch)
tree80318d5380a0d27ac3b92ed2619fc936f59713b5 /dev-python
parentdev-python/pandas: Keyword 2.0.3-r1 arm, #911347 (diff)
downloadgentoo-1465e6d2c955bc81bdfbd607418d93a82ad65013.tar.gz
gentoo-1465e6d2c955bc81bdfbd607418d93a82ad65013.tar.bz2
gentoo-1465e6d2c955bc81bdfbd607418d93a82ad65013.zip
dev-python/twisted: Bump to 23.8.0
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python')
-rw-r--r--dev-python/twisted/Manifest1
-rw-r--r--dev-python/twisted/twisted-23.8.0.ebuild154
2 files changed, 155 insertions, 0 deletions
diff --git a/dev-python/twisted/Manifest b/dev-python/twisted/Manifest
index adb006086a89..cb35e4cd670b 100644
--- a/dev-python/twisted/Manifest
+++ b/dev-python/twisted/Manifest
@@ -1,3 +1,4 @@
DIST twisted-22.10.0.gh.tar.gz 3512714 BLAKE2B 2fd36ec6922f428e959ce0169bb9a3592b8b3e43aff8d34872883ecf0fad8d0fff01a52f06b54df3dc377f4fc1a488b6d66f9287b108b4749bb7d3c749b96061 SHA512 cf9ed96430376d499ae9627a7d0656c05cb99bc9e9b15a8f4166355363818f090bc3c2b383ed4cf19e1e38fb569e8618d35a0ddde2a90a06f3c9a4ea769837e4
+DIST twisted-23.8.0.tar.gz 3478691 BLAKE2B 44fa9da691456a2b1d97f54b95787abe3e162b5639ee7ab8779c6d9525eb2a878865f450aa6fd6c461c3eba84f95361d2423e241991f52f91a27b792b6d71123 SHA512 ef0a243a4c22dd31e57087f5b2c21a657b98e23cc486f08b9926a9ebe8c4b6fec137993aea71e6c60abc3d653d995da0f65ff10dfc6c3d2cb7fdae5db08e2532
DIST twisted-23.8.0rc1.tar.gz 3479000 BLAKE2B d3dbc54759f4dcba422cbcc57451a268834f21616ea2b5d34d972f2647750afa4ae62424ae32b2e0fe22e3a886c45ff1e64280c99553aa1ee52923a192773fdf SHA512 a1e778247a311dda30cd7f9f02fa4ab8848d6d5b89de4ff83dee5a92f968b6ec8df48d1804eef780cd0a9dc1393a1a91d624e9c54e0c9cd52d930ac2b36a0b6c
DIST twisted-regen-cache.gz 911 BLAKE2B ffd3fcda6c67ffe6fd3ef581c8d507548396b66ed0708e9a5c790095e579c0d5f0f71596acf05712989da2ddef2b8d437eca973bc4d80ef8a9fa852915f38305 SHA512 95a9b931c73017d16d1b5e6b41345dddffe62b6af1a8e93b5e40d06d3d15be17b0dd0181c767ffeeb791534d463764ef9e066fa6c2ee2ac4b53c86d1da8fce03
diff --git a/dev-python/twisted/twisted-23.8.0.ebuild b/dev-python/twisted/twisted-23.8.0.ebuild
new file mode 100644
index 000000000000..bdb064ec3895
--- /dev/null
+++ b/dev-python/twisted/twisted-23.8.0.ebuild
@@ -0,0 +1,154 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=hatchling
+PYTHON_TESTED=( python3_{10..12} pypy3 )
+PYTHON_COMPAT=( "${PYTHON_TESTED[@]}" )
+PYTHON_REQ_USE="threads(+)"
+
+inherit distutils-r1 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 ~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-3.10.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/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=(
+ # https://github.com/twisted/twisted/pull/11787
+ "${FILESDIR}/${PN}-22.10.0-time.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
+
+ "${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
+}