summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Zamarin <arthurzam@gentoo.org>2022-06-30 22:10:57 +0300
committerArthur Zamarin <arthurzam@gentoo.org>2022-06-30 22:19:17 +0300
commitd0577d8ac128724a21c88091640ccb1972958e8e (patch)
tree2ed2ff3fbe6757b00ba1d158aadc2d76411fb3cc /dev-python/pika
parentsci-libs/gdal: depend on newer ogdi w/ .pc (diff)
downloadgentoo-d0577d8ac128724a21c88091640ccb1972958e8e.tar.gz
gentoo-d0577d8ac128724a21c88091640ccb1972958e8e.tar.bz2
gentoo-d0577d8ac128724a21c88091640ccb1972958e8e.zip
dev-python/pika: add 1.3.0, enable tests, PEP517
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'dev-python/pika')
-rw-r--r--dev-python/pika/Manifest1
-rw-r--r--dev-python/pika/pika-1.3.0.ebuild59
2 files changed, 60 insertions, 0 deletions
diff --git a/dev-python/pika/Manifest b/dev-python/pika/Manifest
index 1dc78742df02..fbf8ea30e8d6 100644
--- a/dev-python/pika/Manifest
+++ b/dev-python/pika/Manifest
@@ -1 +1,2 @@
DIST pika-1.2.0.tar.gz 144945 BLAKE2B c8b163e4efeb4630da7f1901dfc087c2f3e53d5828eba7ee519e6f696d6c86d48d72c8c1ed98df9c3c0a6889265b072f5c709abec98522992ba699691e96acb1 SHA512 3ea4ecc3b2c722e8b1ec7d220e0cad7c7ed315a4800cbff6903d351885dc6a792318da1767f4bf1a4a40510be444ee18f3881f654c4ec84de8c3005aa2a404bf
+DIST pika-1.3.0.gh.tar.gz 316588 BLAKE2B 0d808b45aa72d7d01fde41d85fbe07c44f7c87dac0b5e6bd40f09264370eaec55bb8d003cae36b0b9835615ab6a94c6f227c499866db63f8fc1c8a4e9592d324 SHA512 ebc12faf2d180dbc226afa34a37492f121d3a01f8884b90bfb0f31972bfb14d8cbff3fa00c2350314f7da4471b34e261328e50f878cd9df67ab896478f28e731
diff --git a/dev-python/pika/pika-1.3.0.ebuild b/dev-python/pika/pika-1.3.0.ebuild
new file mode 100644
index 000000000000..df253c49a033
--- /dev/null
+++ b/dev-python/pika/pika-1.3.0.ebuild
@@ -0,0 +1,59 @@
+# 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} )
+inherit distutils-r1
+
+DESCRIPTION="Pure-Python implementation of the AMQP"
+HOMEPAGE="
+ https://pika.readthedocs.io/
+ https://github.com/pika/pika/
+ https://pypi.org/project/pika/
+"
+SRC_URI="https://github.com/pika/pika/archive/${PV}.tar.gz -> ${P}.gh.tar.gz"
+
+LICENSE="MPL-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~x86"
+IUSE="test"
+RESTRICT="test !test? ( test )"
+PROPERTIES="test_network"
+
+BDEPEND="
+ test? (
+ dev-python/gevent[${PYTHON_USEDEP}]
+ dev-python/nose[${PYTHON_USEDEP}]
+ dev-python/nose2[${PYTHON_USEDEP}]
+ dev-python/twisted[${PYTHON_USEDEP}]
+ www-servers/tornado[${PYTHON_USEDEP}]
+ net-misc/rabbitmq-server
+ )
+"
+
+python_test() {
+ nose2 -v || 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
+}