summaryrefslogtreecommitdiff
path: root/dev-python/txamqp
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-11-23 03:02:57 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-11-23 03:02:57 +0000
commit71dd9d29cdaf7cc0ecdb9ea37d128726a941c630 (patch)
tree4eccd905f575579fe47abb8a83bbdb44ceb8c929 /dev-python/txamqp
parentc7a7ec40cf928d8fc6a8241aa208272c008c7b4d (diff)
gentoo auto-resync : 23:11:2024 - 03:02:56
Diffstat (limited to 'dev-python/txamqp')
-rw-r--r--dev-python/txamqp/Manifest3
-rw-r--r--dev-python/txamqp/metadata.xml14
-rw-r--r--dev-python/txamqp/txamqp-0.8.2-r1.ebuild74
3 files changed, 91 insertions, 0 deletions
diff --git a/dev-python/txamqp/Manifest b/dev-python/txamqp/Manifest
new file mode 100644
index 000000000000..e965f24a6603
--- /dev/null
+++ b/dev-python/txamqp/Manifest
@@ -0,0 +1,3 @@
+DIST txamqp-0.8.2.gh.tar.gz 118560 BLAKE2B 6e60cc0785462b92d046a620cc09eda8b7783bd09186a60299eba11c8f6f5780fc38b094ea974e4f1e443d3d30ee1428f30ad25fdb43554d25db17f36d323527 SHA512 4a5e468482433e684dc690abddeba3e0a6c77630055afe44487de72feecad9c750d179c43dee4e781d09c9c21259cecd615dc9f6eaa7d9ff7ca0796248ad5a02
+EBUILD txamqp-0.8.2-r1.ebuild 1715 BLAKE2B 815dd5cf1004db18681afb95eb24b86033c7423d48081da99f5b4c2e98a994540f669783f3ea05e8c6892561751b371ce655d818237cc138c0fe6d9ca76fbe60 SHA512 207340cd44c0ea843505830e6a52103c7a40a8516ffb2180f11e7ca28b9fbf1066f2a7d63e5f79b07ddce00a0f8d60915d900bdf144cdf44abe9e43241488d48
+MISC metadata.xml 448 BLAKE2B c4c26b9776816155c1bfe3de1c2740b95fc0d20737c0f6c74a700a7c0bd42d12a93f8c80baf0da13e697b9c621c9719952fa9e396fcbfdcd23c40087b1718516 SHA512 079204ba8010ed7af5b09a5723774c65fe0bb39b6debe2c6eac05bbcb4e6ea16dd1f4a654c4464244b177c3a2ca698aed326c9f07aae6dd3943df4af286b1264
diff --git a/dev-python/txamqp/metadata.xml b/dev-python/txamqp/metadata.xml
new file mode 100644
index 000000000000..b98605c34a56
--- /dev/null
+++ b/dev-python/txamqp/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>python@gentoo.org</email>
+ <name>Python</name>
+ </maintainer>
+ <stabilize-allarches/>
+ <upstream>
+ <remote-id type="pypi">txAMQP</remote-id>
+ <remote-id type="github">txamqp/txamqp</remote-id>
+ <bugs-to>https://github.com/txamqp/txamqp/issues</bugs-to>
+ </upstream>
+</pkgmetadata>
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..94bbd88adecc
--- /dev/null
+++ b/dev-python/txamqp/txamqp-0.8.2-r1.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{10..13} )
+PYTHON_REQ_USE="xml(+)"
+
+inherit distutils-r1
+
+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
+ -> ${P}.gh.tar.gz
+"
+
+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
+}