diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-05-08 23:39:55 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-05-08 23:39:55 +0100 |
commit | 2c359e29620429f94a60fc1e832048e54ee41eb5 (patch) | |
tree | 3a24152899725be0796179577e84caf957a80ce3 /dev-python/redis | |
parent | d6a3ca89e16356791af128f18ca5d5aeaf1323e0 (diff) |
gentoo auto-resync : 08:05:2023 - 23:39:55
Diffstat (limited to 'dev-python/redis')
-rw-r--r-- | dev-python/redis/Manifest | 2 | ||||
-rw-r--r-- | dev-python/redis/redis-4.5.5.ebuild | 83 |
2 files changed, 85 insertions, 0 deletions
diff --git a/dev-python/redis/Manifest b/dev-python/redis/Manifest index 854af2dc83e9..a98501e3ff1a 100644 --- a/dev-python/redis/Manifest +++ b/dev-python/redis/Manifest @@ -1,3 +1,5 @@ DIST redis-py-4.5.4.gh.tar.gz 4739418 BLAKE2B a02a581dc12a09cedd0f5158bc261ffb0efcf0346d193ebcb060f50fa95dbaadb7322446c242ac68094bbfbd80c9879d8c9a9fc8362aa6a6e9be85d7e46d9aaa SHA512 55c4530ab715c4bddb502ce58ae3c62db9c27d16ddbfa8f87c88e9425e0285d9fd570338428c30d0a3f1fe2d81868fd8385da0255d58c3dd9b9813f9454eeb30 +DIST redis-py-4.5.5.gh.tar.gz 4748642 BLAKE2B 6e924477be81af995190328b8747e2eac3d905fcff8cd97c6f89702e3888a4185918144cf11b9173b25dd4c2e62ce988e2f1f5b2c1261bb35e64031772a5a81a SHA512 f1d8f1b009f30613776904cef42a090a51da2833d667d47f9650c9a35187d11911d5b23b20f2ba2279714758963830c873473028775f39419e4d996da54eee83 EBUILD redis-4.5.4.ebuild 1825 BLAKE2B cfa69df7a6e0a591bd4795cb4662dfc3db348782fce84f4c8c20ff9917717635843c54ca8168affa451cae1ae0859231c0ce37ec666eeaadf55a2599fbf6c3f1 SHA512 aa5b963bd244f845e783e493db321bcfc489754253d5bdb0d339d19f59c8b6e065f4ddd3c4ea70004803d9d412f1774eca39893e071cb6506faaa201475d57bb +EBUILD redis-4.5.5.ebuild 1832 BLAKE2B d209211a03f343e4885ba71257037b8ccde243801d80c416d3bb04e8645c2cec5ba3e376f2db5e927301ae0f35f101be9d007b09378655dc7c07e9ee4ad079c1 SHA512 98ae513482b8ad55edefb91679b039a15228a3dbde917b32cc840be925db2f63027728da5830bc55eef2765b4f608ba64693ec917d4b3568057f9ac22e170237 MISC metadata.xml 506 BLAKE2B 0e5747e826132dd365bdf6d3a63f0936ed476bc69c4c4d55126e692039046f51f69b193ead0baa181090b11f69ab2a49220d8f906f9fe3fc18331b76ff9e0b0f SHA512 725d650bfe345b132588930a18ade44182ec07f6697d2fd8806dc208ab1556939926e8899fc6d43691101d971f9c1e011fb8a5675fdde4698dbf4c230db15c75 diff --git a/dev-python/redis/redis-4.5.5.ebuild b/dev-python/redis/redis-4.5.5.ebuild new file mode 100644 index 000000000000..37fbc3edbe6d --- /dev/null +++ b/dev-python/redis/redis-4.5.5.ebuild @@ -0,0 +1,83 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{9..11} pypy3 ) + +inherit distutils-r1 + +MY_P=redis-py-${PV} +DESCRIPTION="Python client for Redis key-value store" +HOMEPAGE=" + https://github.com/redis/redis-py/ + https://pypi.org/project/redis/ +" +SRC_URI=" + https://github.com/redis/redis-py/archive/v${PV}.tar.gz + -> ${MY_P}.gh.tar.gz +" +S=${WORKDIR}/${MY_P} + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~sparc ~x86" + +RDEPEND=" + $(python_gen_cond_dep ' + >=dev-python/async-timeout-4.0.2[${PYTHON_USEDEP}] + ' 3.{9..10}) +" +BDEPEND=" + test? ( + dev-db/redis + dev-python/pytest-asyncio[${PYTHON_USEDEP}] + dev-python/pytest-timeout[${PYTHON_USEDEP}] + ) +" + +distutils_enable_tests pytest + +python_test() { + local EPYTEST_DESELECT=( + # Flaky test + tests/test_pubsub.py::TestPubSubDeadlock::test_pubsub_deadlock + # TODO + tests/test_commands.py::TestRedisCommands::test_acl_list + # redis-7 different return + tests/test_commands.py::TestRedisCommands::test_xautoclaim + ) + + # TODO: try to run more servers? + epytest -m "not redismod and not onlycluster and not replica and not ssl" +} + +src_test() { + local redis_pid="${T}"/redis.pid + local redis_port=6379 + + if has_version ">=dev-db/redis-7"; then + local extra_conf=" + enable-debug-command yes + enable-module-command yes + " + fi + + # Spawn Redis itself for testing purposes + einfo "Spawning Redis" + einfo "NOTE: Port ${redis_port} must be free" + "${EPREFIX}"/usr/sbin/redis-server - <<- EOF || die "Unable to start redis server" + daemonize yes + pidfile ${redis_pid} + port ${redis_port} + bind 127.0.0.1 ::1 + ${extra_conf} + EOF + + # Run the tests + distutils-r1_src_test + + # Clean up afterwards + kill "$(<"${redis_pid}")" || die +} |