From 47bb4031ea0e98a9423d423f2181c0e3d06f256b Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 23 Jan 2023 12:55:08 +0000 Subject: gentoo auto-resync : 23:01:2023 - 12:55:07 --- dev-python/fakeredis/Manifest | 2 + dev-python/fakeredis/fakeredis-2.5.0.ebuild | 88 +++++++++++++++++++++++++++++ 2 files changed, 90 insertions(+) create mode 100644 dev-python/fakeredis/fakeredis-2.5.0.ebuild (limited to 'dev-python/fakeredis') diff --git a/dev-python/fakeredis/Manifest b/dev-python/fakeredis/Manifest index ddbaffe7baf9..acafbcc316d7 100644 --- a/dev-python/fakeredis/Manifest +++ b/dev-python/fakeredis/Manifest @@ -1,5 +1,7 @@ DIST fakeredis-py-2.2.0.gh.tar.gz 128817 BLAKE2B 8666427966e6a93cd33f521fbc38ecb9bb99e1c1a23506437d48bc6113f272aa89a465dc794b5130ef6dfa584f75f159fce0e3b6a50e5cb89b3bfe43ebcd89cd SHA512 857033a6362a6088cec715571d74a9aa1eb3eb8356ed904b10831540ce5be62d798a211d52fb3d8effab253e50fdb3f2a530d39bd722d8be357426f53fb41fe7 DIST fakeredis-py-2.4.0.gh.tar.gz 132163 BLAKE2B fc3858eb364c63d776c81d715cbfb218dc0e763d568c97b0d1dafb0716aaf87e928f9b81bd49d28fcc235f4285277446945595d42ff1d440e5c8491b78abb6c3 SHA512 5fba3e84d0506b52e1561f750e045b6227ea21387ddb3a89b8a61e9698fc0e9ec80c4a7048d9426fb0d8e9f2acd808e7e07fcb11d14d6852d9b057fec86d6e6a +DIST fakeredis-py-2.5.0.gh.tar.gz 139911 BLAKE2B 4e9c616b0066012e1ed681d06e73390fb670969c15fa57689244147a0175dbb14ff1c312066ffdc6eb2c647f884c351a98eebfb2c1ba0e6c1bbe1e6c3553808a SHA512 aff5a8679763d4cf1717f790c7c384aa8e5056e5f175c306626f3a1671fe27aa3caf24368831033c9cf5bffa2e3e6be1104b183f3912eadf34fd6f37ea0c63e8 EBUILD fakeredis-2.2.0.ebuild 2000 BLAKE2B f7948d36200ff88c5f996c79939a3a9c204929aac2ea9ba5d54ff47f66f6873f976d20423bebf1ce6b9c814b3c37cb2eb7adac6ff8e76fe9e249304a9bdc5f01 SHA512 cd10a46e35236e07289487829bc17b8026526ee99f41c35c9a56dd8a8bfe2999979bb515f4005a18aa8ec86f718d291b86781b174bd9b7bf691542d4bf6e5f2e EBUILD fakeredis-2.4.0.ebuild 2084 BLAKE2B 4591f6e8d91b0327225bfc6a2c792eab83298682c4f713786204e570bdca3b166d37616e7729e15f8bcbaf46b2a241ebcf25ce4f3146bdba451750941d6c461f SHA512 fab3b715ef33a7ca5fed697032c74237e52c23e1ca741e03109849a992d397f58705d36f476f0d8873fe47138781d84e29a62d180b9e8715044c72f1b432303c +EBUILD fakeredis-2.5.0.ebuild 2084 BLAKE2B 4591f6e8d91b0327225bfc6a2c792eab83298682c4f713786204e570bdca3b166d37616e7729e15f8bcbaf46b2a241ebcf25ce4f3146bdba451750941d6c461f SHA512 fab3b715ef33a7ca5fed697032c74237e52c23e1ca741e03109849a992d397f58705d36f476f0d8873fe47138781d84e29a62d180b9e8715044c72f1b432303c MISC metadata.xml 373 BLAKE2B 1de33db59658e6190cd0346be58208cae6c9143a52f49dc289e68aaa0d860b5bd68dfb54f2e0b005f60a67f5caa430e2ce94fc69e64bd27e1bbebb07ad29e602 SHA512 24bfcf4919363fef45c182b6de66221e580ee0e9e99ce46e91b767655dc0b6f8a9fa6c3512ba84d1040698c43a0b6a853ad8d63c1ee5fbc00a1d192defb24db5 diff --git a/dev-python/fakeredis/fakeredis-2.5.0.ebuild b/dev-python/fakeredis/fakeredis-2.5.0.ebuild new file mode 100644 index 000000000000..4186af5980d2 --- /dev/null +++ b/dev-python/fakeredis/fakeredis-2.5.0.ebuild @@ -0,0 +1,88 @@ +# Copyright 2020-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=poetry +PYTHON_COMPAT=( pypy3 python3_{9..11} ) + +inherit distutils-r1 + +MY_P=fakeredis-py-${PV} +DESCRIPTION="Fake implementation of redis API for testing purposes" +HOMEPAGE=" + https://github.com/cunla/fakeredis-py/ + https://pypi.org/project/fakeredis/ +" +SRC_URI=" + https://github.com/cunla/fakeredis-py/archive/v${PV}.tar.gz + -> ${MY_P}.gh.tar.gz +" +S=${WORKDIR}/${MY_P} + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86" + +RDEPEND=" + >=dev-python/redis-py-4.2[${PYTHON_USEDEP}] + =dev-python/sortedcontainers-2.4.0[${PYTHON_USEDEP}] +" +BDEPEND=" + test? ( + dev-db/redis + dev-python/pytest-asyncio[${PYTHON_USEDEP}] + dev-python/pytest-mock[${PYTHON_USEDEP}] + ) +" + +distutils_enable_tests pytest + +src_prepare() { + # unpin redis + sed -i -e '/redis/s:<[0-9.]*:*:' pyproject.toml || die + distutils-r1_src_prepare +} + +python_test() { + local EPYTEST_DESELECT=( + # also lupa + test/test_aioredis2.py::test_failed_script_error + # TODO + "test/test_fakeredis.py::test_set_get_nx[StrictRedis]" + "test/test_fakeredis.py::test_lpop_count[StrictRedis]" + "test/test_fakeredis.py::test_rpop_count[StrictRedis]" + "test/test_fakeredis.py::test_zadd_minus_zero[StrictRedis]" + "test/test_mixins/test_pubsub_commands.py::test_pubsub_channels[StrictRedis]" + ) + local EPYTEST_IGNORE=( + # these tests fail a lot... + test/test_hypothesis.py + ) + local args=( + # tests requiring lupa (lua support) + -k 'not test_eval and not test_lua and not test_script' + ) + epytest "${args[@]}" +} + +src_test() { + local redis_pid="${T}"/redis.pid + local redis_port=6379 + + 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 + EOF + + # Run the tests + distutils-r1_src_test + + # Clean up afterwards + kill "$(<"${redis_pid}")" || die +} -- cgit v1.2.3