diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-10-29 22:01:57 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-10-29 22:01:57 +0100 |
commit | 009897642a869d630779716efc51af1554f72867 (patch) | |
tree | 879100d35e2fd1f39b32b68b2abe220f156b3a20 /dev-python/txAMQP | |
parent | 9cd7e710ac676c1a318d09e665ca3558bb5c5323 (diff) |
gentoo auto-resync : 29:10:2022 - 22:01:57
Diffstat (limited to 'dev-python/txAMQP')
-rw-r--r-- | dev-python/txAMQP/Manifest | 1 | ||||
-rw-r--r-- | dev-python/txAMQP/txAMQP-0.8.2-r1.ebuild | 74 |
2 files changed, 75 insertions, 0 deletions
diff --git a/dev-python/txAMQP/Manifest b/dev-python/txAMQP/Manifest index 4da7cd8cd333..047b359edc5d 100644 --- a/dev-python/txAMQP/Manifest +++ b/dev-python/txAMQP/Manifest @@ -1,3 +1,4 @@ DIST txamqp-0.8.2.tar.gz 118560 BLAKE2B 6e60cc0785462b92d046a620cc09eda8b7783bd09186a60299eba11c8f6f5780fc38b094ea974e4f1e443d3d30ee1428f30ad25fdb43554d25db17f36d323527 SHA512 4a5e468482433e684dc690abddeba3e0a6c77630055afe44487de72feecad9c750d179c43dee4e781d09c9c21259cecd615dc9f6eaa7d9ff7ca0796248ad5a02 +EBUILD txAMQP-0.8.2-r1.ebuild 1754 BLAKE2B daa6d9d38bcf92c47a16a7194be17300ce31116b9abd72278162b66d3e68129a3131451d3ef5087ad50982e4fd698dab9d1345300338642691c69b4aa6f844c0 SHA512 b74f72c281ec0d8cdc6e1c6de9debf5a97f6f1dbcfd1271c0332c6943641781905fe0194f08c44aed62c8a22b0e0c9ae845f4b8041cbf73657fce3241fbaee29 EBUILD txAMQP-0.8.2.ebuild 1792 BLAKE2B 1fb07bdf7e9cc7e54086971cf0dffb5c465b18302d4e447f0062197507304183013432a22660c1894093aec0487baf98918bb320119f5d1906a1a380da8ba7d4 SHA512 9244021dac62da5ffe44c58ce076a8066a3048a76bfe404e7424c1ec5bc33261d587d3e76ea66c476cbfb343e8d594963dd5ee37876ec3385a1793db56c61445 MISC metadata.xml 349 BLAKE2B 6384cbbfd96d59a37c42da7e3f36c03e154033ebc4c2f666ebf517157889059474e0597b4a75315d61be2faf0781bed46c47eadb123aa6376f01ae353ecfb4a6 SHA512 7f2976c5db1eb88248ab361b3a8c15b62fad0551d94d01fd9bbf53531d72bf467e0fe52c097a704c11917b803a38cabadca400f1b01a107384314af1636da3e5 diff --git a/dev-python/txAMQP/txAMQP-0.8.2-r1.ebuild b/dev-python/txAMQP/txAMQP-0.8.2-r1.ebuild new file mode 100644 index 000000000000..bf4646499bdd --- /dev/null +++ b/dev-python/txAMQP/txAMQP-0.8.2-r1.ebuild @@ -0,0 +1,74 @@ +# 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} ) +PYTHON_REQ_USE="xml(+)" + +inherit distutils-r1 + +MY_P="${PN,,}-${PV}" + +DESCRIPTION="Python library for communicating with AMQP peers using Twisted" +HOMEPAGE="https://github.com/txamqp/txamqp" +# pypi tarball misses doc files +# https://github.com/txamqp/txamqp/pull/10 +SRC_URI="https://github.com/txamqp/txamqp/archive/${PV}.tar.gz -> ${MY_P}.tar.gz" +S="${WORKDIR}/${MY_P}" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86 ~x64-solaris" +IUSE="test" +RESTRICT="!test? ( test )" + +RDEPEND=" + dev-python/twisted[${PYTHON_USEDEP}] + dev-python/six[${PYTHON_USEDEP}] +" +BDEPEND=" + test? ( + ${RDEPEND} + net-misc/rabbitmq-server + ) +" + +python_test() { + cd src || die + # tests look for those files relatively to modules + cp -r specs "${BUILD_DIR}"/lib || die + + TXAMQP_BROKER=RABBITMQ "${EPYTHON}" -m twisted.trial txamqp + local ret=${?} + + [[ ${ret} == 0 ]] || die "Tests failed with ${EPYTHON}" +} + +src_test() { + einfo "Starting rabbitmq" + local -x RABBITMQ_LOG_BASE="${T}/rabbitmq/log" + local -x RABBITMQ_MNESIA_BASE="${T}/rabbitmq/mnesia" + local -x RABBITMQ_LOGS="${T}/rabbitmq.log" + local -x RABBITMQ_PID_FILE="${T}/rabbitmq.pid" + local -x RABBITMQ_ENABLED_PLUGINS_FILE="${T}/rabbitmq/enabled_plugins" + /usr/libexec/rabbitmq/rabbitmq-server -p 5672:5672 & + + einfo "Waiting for rabbitmq to fully load" + while ! { echo >/dev/tcp/localhost/5672 ; } &> /dev/null; do + sleep 1 + done + einfo "rabbitmq is ready" + + distutils-r1_src_test + + einfo "Stopping rabbitmq" + kill "$(<"${RABBITMQ_PID_FILE}")" || die +} + +python_install_all() { + local DOCS=( doc/* ) + + distutils-r1_python_install_all +} |