Gentoo Archives: gentoo-commits

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