diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-03-22 00:41:01 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-03-22 00:41:01 +0000 |
commit | 23b767af73549eeb4dd3069e09d0f2fcb88669a8 (patch) | |
tree | 7ad731ac748d72a48ae7079bc8fb0718c554d65d /dev-python/redis | |
parent | 3003897133b1bcfe9a241c2708e938903879aee3 (diff) |
gentoo auto-resync : 22:03:2023 - 00:41:01
Diffstat (limited to 'dev-python/redis')
-rw-r--r-- | dev-python/redis/Manifest | 2 | ||||
-rw-r--r-- | dev-python/redis/redis-4.5.2.ebuild | 83 |
2 files changed, 85 insertions, 0 deletions
diff --git a/dev-python/redis/Manifest b/dev-python/redis/Manifest index d2bbd38e5981..aadf3f2ea7f4 100644 --- a/dev-python/redis/Manifest +++ b/dev-python/redis/Manifest @@ -1,3 +1,5 @@ DIST redis-py-4.5.1.gh.tar.gz 4737828 BLAKE2B ce4f44c32e0c0bf050c868725e41b037dc9c8bc1915f83994db5196a44fc618acfb9670e61e640c4c756c9e66794a96f9d4d140c58fccc06b181dce040275377 SHA512 bbee0aee1568a95a591c9083a901c2f47dfb5c9cfa9186b4a47a6575691cd7634d2c461fad84c54fc6df53a83029d1facd19e7c59cafa4331254ef8f04967cb6 +DIST redis-py-4.5.2.gh.tar.gz 4738198 BLAKE2B d3b566bee468c46536811580c21a66b94b157079858502edd2f2359944b1029e56370b5763ba27b55f446cb6eef45c99e0132547d02b4dcb63a0d910c7c477ad SHA512 6f4a30051749b31a0fcde1e61996fb9a92e71094a8f3dabeaef8aa1794431e59be8c67f337f6476b73eaca78ab14edd6e2c4de4621b9311f9124e70c68c1eec1 EBUILD redis-4.5.1.ebuild 1785 BLAKE2B ddfd60d2ed4e589c9c000adb8fb5a14e1e1960c9b8ac6be66f0950b3dff1f16a34a9dd9b44d800bae645b76fa7ad427e834e9f4e9de8da904476dcafdcb04895 SHA512 8e62f3858bbbeb0e37d8859cc8d50c395459e885e460f3e0e1a8fa397e8e757910ce8f087f19bd49216dfdbb2ee8031ecbb85331735c34f4d22ccb4a1e8f211b +EBUILD redis-4.5.2.ebuild 1832 BLAKE2B d209211a03f343e4885ba71257037b8ccde243801d80c416d3bb04e8645c2cec5ba3e376f2db5e927301ae0f35f101be9d007b09378655dc7c07e9ee4ad079c1 SHA512 98ae513482b8ad55edefb91679b039a15228a3dbde917b32cc840be925db2f63027728da5830bc55eef2765b4f608ba64693ec917d4b3568057f9ac22e170237 MISC metadata.xml 506 BLAKE2B 0e5747e826132dd365bdf6d3a63f0936ed476bc69c4c4d55126e692039046f51f69b193ead0baa181090b11f69ab2a49220d8f906f9fe3fc18331b76ff9e0b0f SHA512 725d650bfe345b132588930a18ade44182ec07f6697d2fd8806dc208ab1556939926e8899fc6d43691101d971f9c1e011fb8a5675fdde4698dbf4c230db15c75 diff --git a/dev-python/redis/redis-4.5.2.ebuild b/dev-python/redis/redis-4.5.2.ebuild new file mode 100644 index 000000000000..37fbc3edbe6d --- /dev/null +++ b/dev-python/redis/redis-4.5.2.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 +} |