summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Zamarin <arthurzam@gentoo.org>2021-08-16 19:01:48 +0300
committerArthur Zamarin <arthurzam@gentoo.org>2021-08-16 22:07:53 +0300
commitb0caf91fff7455e75b0dc0a41a6be1cc2f436679 (patch)
tree6dd17c3f3bfab33d77f25d055887a7248d8085ea /dev-python/aioredis
parentdev-python/hiredis: enable pypy3 (diff)
downloadgentoo-b0caf91fff7455e75b0dc0a41a6be1cc2f436679.tar.gz
gentoo-b0caf91fff7455e75b0dc0a41a6be1cc2f436679.tar.bz2
gentoo-b0caf91fff7455e75b0dc0a41a6be1cc2f436679.zip
dev-python/aioredis: New dep for dev-python/fakeredis
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'dev-python/aioredis')
-rw-r--r--dev-python/aioredis/Manifest1
-rw-r--r--dev-python/aioredis/aioredis-2.0.0.ebuild56
-rw-r--r--dev-python/aioredis/metadata.xml13
3 files changed, 70 insertions, 0 deletions
diff --git a/dev-python/aioredis/Manifest b/dev-python/aioredis/Manifest
new file mode 100644
index 000000000000..3464ef7fb086
--- /dev/null
+++ b/dev-python/aioredis/Manifest
@@ -0,0 +1 @@
+DIST aioredis-2.0.0.tar.gz 110808 BLAKE2B c10b7d9ba9a6878d3a28f9cada836acbceb7d62525cfc65a52fc3a15edebf5b736ad81f249477e30d1f920473067f27048530f7fd4d0a45cb5391976eb6e4c3e SHA512 edc738215bdb1459af8657f06b8194cdfbb6814f4d40b723e11a1fdec5607b73033eca0bffac758afa2cca9532de910a508c9fb27c5885952426266a14c21eee
diff --git a/dev-python/aioredis/aioredis-2.0.0.ebuild b/dev-python/aioredis/aioredis-2.0.0.ebuild
new file mode 100644
index 000000000000..d2e9e1e4bcf8
--- /dev/null
+++ b/dev-python/aioredis/aioredis-2.0.0.ebuild
@@ -0,0 +1,56 @@
+# Copyright 2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} pypy3 )
+inherit distutils-r1 optfeature
+
+DESCRIPTION="asyncio Redis client library"
+HOMEPAGE="https://pypi.org/project/aioredis/ https://github.com/aio-libs/aioredis-py"
+SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="
+ dev-python/async_timeout[${PYTHON_USEDEP}]
+ dev-python/typing-extensions[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ test? (
+ dev-db/redis
+ dev-python/hiredis[${PYTHON_USEDEP}]
+ dev-python/mock[${PYTHON_USEDEP}]
+ dev-python/pytest-asyncio[${PYTHON_USEDEP}]
+ dev-python/pytest-xdist[${PYTHON_USEDEP}]
+ )
+"
+
+distutils_enable_tests pytest
+
+src_test() {
+ local redis_pid="${T}"/redis.pid
+ local redis_port=6379
+ local redis_test_config="
+ daemonize yes
+ pidfile ${redis_pid}
+ port ${redis_port}
+ bind 127.0.0.1
+ "
+
+ elog "Spawning Redis"
+ elog "NOTE: Port ${redis_port} must be free"
+ "${EPREFIX}"/usr/sbin/redis-server - <<< "${redis_test_config}" || die
+
+ # Run the tests
+ distutils-r1_src_test
+
+ # Clean up afterwards
+ kill "$(<"${redis_pid}")" || die
+}
+
+pkg_postinst() {
+ optfeature "hiredis parser" dev-python/hiredis
+}
diff --git a/dev-python/aioredis/metadata.xml b/dev-python/aioredis/metadata.xml
new file mode 100644
index 000000000000..51f05add569e
--- /dev/null
+++ b/dev-python/aioredis/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>arthurzam@gentoo.org</email>
+ <name>Arthur Zamarin</name>
+ </maintainer>
+ <stabilize-allarches/>
+ <upstream>
+ <remote-id type="github">aio-libs/aioredis-py</remote-id>
+ <remote-id type="pypi">aioredis</remote-id>
+ </upstream>
+</pkgmetadata>