Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/autobahn/
Date: Sun, 27 Mar 2022 09:31:58
Message-Id: 1648373507.60ddcaed7e728db23e6d8586d910ddf3cf208eb7.mgorny@gentoo
1 commit: 60ddcaed7e728db23e6d8586d910ddf3cf208eb7
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sun Mar 27 08:25:59 2022 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sun Mar 27 09:31:47 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=60ddcaed
7
8 dev-python/autobahn: Bump to 22.3.1
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-python/autobahn/Manifest | 1 +
13 dev-python/autobahn/autobahn-22.3.1.ebuild | 115 +++++++++++++++++++++++++++++
14 2 files changed, 116 insertions(+)
15
16 diff --git a/dev-python/autobahn/Manifest b/dev-python/autobahn/Manifest
17 index 6deaff5f9834..6362bef44864 100644
18 --- a/dev-python/autobahn/Manifest
19 +++ b/dev-python/autobahn/Manifest
20 @@ -1 +1,2 @@
21 DIST autobahn-22.2.2.tar.gz 375443 BLAKE2B a321cfeaa35e7da5aa58ade0da3bc5891baab1d4a915782e9d25038679261c19744d65baa4a981cb01025902dc8f4ffb93d8c0ad59b8db32119c0fb0eeb49d53 SHA512 95b0ee867a866b1cf67a55ffa9386addd3640b12a3e5a2673b4d496aa6d41ec49408e1f528bc21d1e390d5e3343dda0b1625d4ac0d9e9101db151c7c79623263
22 +DIST autobahn-22.3.1.tar.gz 375616 BLAKE2B 2644ff3766b268df54cf955d657870530723342dc9b040b05806766e25dbf89b78b448d8b6a949cb8a8d1486a16f6901348dc127903c34502f8663997b539ac8 SHA512 5fbeec8808d90431e37ede1b3c147ffd8e92af99af3bc4f6fec3519cdbfe5962c3d770e9102b7f54bfbdd03f453b488c8ba8eb104c6a34458ca429fd1233e037
23
24 diff --git a/dev-python/autobahn/autobahn-22.3.1.ebuild b/dev-python/autobahn/autobahn-22.3.1.ebuild
25 new file mode 100644
26 index 000000000000..a15603075d58
27 --- /dev/null
28 +++ b/dev-python/autobahn/autobahn-22.3.1.ebuild
29 @@ -0,0 +1,115 @@
30 +# Copyright 1999-2022 Gentoo Authors
31 +# Distributed under the terms of the GNU General Public License v2
32 +
33 +EAPI=8
34 +
35 +DISTUTILS_USE_PEP517=setuptools
36 +PYTHON_COMPAT=( python3_{8..10} )
37 +
38 +inherit distutils-r1 optfeature
39 +
40 +MY_P=${PN}-$(ver_rs 3 -)
41 +
42 +DESCRIPTION="WebSocket and WAMP for Twisted and Asyncio"
43 +HOMEPAGE="https://pypi.org/project/autobahn/
44 + https://crossbar.io/autobahn/
45 + https://github.com/crossbario/autobahn-python"
46 +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${MY_P}.tar.gz"
47 +S="${WORKDIR}/${MY_P}"
48 +
49 +SLOT="0"
50 +LICENSE="MIT"
51 +KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~x86"
52 +IUSE="test xbr"
53 +RESTRICT="!test? ( test )"
54 +
55 +# The order of deps is based on their appearance in setup.py
56 +# All extra deps should be included in test and in optfeature
57 +RDEPEND="
58 + >=dev-python/zope-interface-5.2.0[${PYTHON_USEDEP}]
59 + >=dev-python/twisted-20.3.0[${PYTHON_USEDEP}]
60 + >=dev-python/attrs-20.3.0[${PYTHON_USEDEP}]
61 + >=dev-python/txaio-21.2.1[${PYTHON_USEDEP}]
62 + dev-python/cryptography[${PYTHON_USEDEP}]
63 + >=dev-python/hyperlink-21.0.0[${PYTHON_USEDEP}]
64 + dev-python/setuptools[${PYTHON_USEDEP}]
65 +"
66 +BDEPEND="
67 + test? (
68 + >=dev-python/wsaccel-0.6.3[${PYTHON_USEDEP}]
69 + >=dev-python/snappy-0.6.0[${PYTHON_USEDEP}]
70 + >=dev-python/msgpack-1.0.2[${PYTHON_USEDEP}]
71 + >=dev-python/ujson-4.0.2[${PYTHON_USEDEP}]
72 + >=dev-python/cbor2-5.2.0[${PYTHON_USEDEP}]
73 + >=dev-python/py-ubjson-0.16.1[${PYTHON_USEDEP}]
74 + >=dev-python/flatbuffers-1.12[${PYTHON_USEDEP}]
75 + >=dev-python/pyopenssl-20.0.1[${PYTHON_USEDEP}]
76 + >=dev-python/service_identity-18.1.0[${PYTHON_USEDEP}]
77 + >=dev-python/pynacl-1.4.0[${PYTHON_USEDEP}]
78 + >=dev-python/pytrie-0.4[${PYTHON_USEDEP}]
79 + >=dev-python/pyqrcode-1.2.1[${PYTHON_USEDEP}]
80 + >=dev-python/cffi-1.14.5[${PYTHON_USEDEP}]
81 + >=dev-python/argon2-cffi-20.1.0[${PYTHON_USEDEP}]
82 + >=dev-python/passlib-1.7.4[${PYTHON_USEDEP}]
83 +
84 + dev-python/pytest[${PYTHON_USEDEP}]
85 + dev-python/pytest-asyncio[${PYTHON_USEDEP}]
86 + dev-python/pytest-aiohttp[${PYTHON_USEDEP}]
87 + )
88 +"
89 +
90 +python_prepare_all() {
91 + if use xbr ; then
92 + eerror "***************"
93 + eerror "Required xbr dependencies are incomplete in Gentoo."
94 + eerror "So this functionality will not yet work"
95 + eerror "Please file a bug if this feature is needed"
96 + eerror "***************"
97 + else
98 + # remove xbr components
99 + export AUTOBAHN_STRIP_XBR="True"
100 + fi
101 +
102 + # avoid useless rust dependency
103 + sed -i -e '/cryptography/s:>=3.4.6::' setup.py || die
104 +
105 + # remove twisted plugin cache regen in setup.py
106 + # to fix tinderbox sandbox issue
107 + sed -e '/import/s:reactor:__importmustfail__:' \
108 + -i setup.py || die
109 +
110 + distutils-r1_python_prepare_all
111 +}
112 +
113 +python_test() {
114 + einfo "Testing all, cryptosign using twisted"
115 + local -x USE_TWISTED=true
116 + cd "${BUILD_DIR}/install$(python_get_sitedir)" || die
117 + "${EPYTHON}" -m twisted.trial autobahn || die "Tests failed with ${EPYTHON}"
118 + unset USE_TWISTED
119 +
120 + einfo "RE-testing cryptosign and component_aio using asyncio"
121 + local -x USE_ASYNCIO=true
122 + epytest autobahn/wamp/test/test_wamp_{cryptosign,component_aio}.py
123 + unset USE_ASYNCIO
124 +
125 + rm -f twisted/plugins/dropin.cache || die
126 +}
127 +
128 +pkg_postinst() {
129 + optfeature "C-based WebSocket acceleration" "dev-python/wsaccel"
130 + optfeature "non-standard WebSocket compression support" "dev-python/snappy"
131 + optfeature "accelerated WAMP serialization support" \
132 + "dev-python/msgpack dev-python/ujson dev-python/cbor2 dev-python/flatbuffers dev-python/py-ubjson"
133 + optfeature "TLS transport encryption" \
134 + "dev-python/pyopenssl dev-python/pynacl dev-python/pytrie dev-python/pyqrcode dev-python/service_identity"
135 + optfeature "WAMP-SCRAM authentication" \
136 + "dev-python/cffi dev-python/argon2-cffi dev-python/passlib"
137 + optfeature "native SIMD acceleration" "dev-python/cffi"
138 +
139 + python_foreach_impl twisted-regen-cache
140 +}
141 +
142 +pkg_postrm() {
143 + python_foreach_impl twisted-regen-cache
144 +}