summaryrefslogtreecommitdiff
path: root/dev-python/django-redis
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-10-02 11:46:02 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-10-02 11:46:02 +0100
commitfade240e5eae2521e59569af4ab63e27415f4e5b (patch)
tree18ce5cd3bed52f77d3ff5fbe8b47a025b6892619 /dev-python/django-redis
parent16c48ec5caa018c82b1db0f23542c29893f9b919 (diff)
gentoo auto-resync : 02:10:2023 - 11:46:02
Diffstat (limited to 'dev-python/django-redis')
-rw-r--r--dev-python/django-redis/Manifest2
-rw-r--r--dev-python/django-redis/django-redis-5.4.0.ebuild83
2 files changed, 85 insertions, 0 deletions
diff --git a/dev-python/django-redis/Manifest b/dev-python/django-redis/Manifest
index 283e1bad04b3..983f148b1282 100644
--- a/dev-python/django-redis/Manifest
+++ b/dev-python/django-redis/Manifest
@@ -1,3 +1,5 @@
DIST django-redis-5.3.0.tar.gz 44800 BLAKE2B 29a671f2899aefa6e59086bc194438aaf7e724b3edcefaf0c590a14e958847e86da34b8f94d4c29d62270f53f88395df2e911659e58471b5c037d1c2cd0f4dd7 SHA512 2867d405b69400355576eb3c052b4245844d56304979f09750251f8a2cf35ce704ebcdb6c80e6280fbfe24acfb237a3428f68081b6ada11ffc78257263703d7e
+DIST django-redis-5.4.0.tar.gz 52567 BLAKE2B f3ac670500dbe57d795905d10d3a63102c60de6b61e96af257c0e654cd7aa7dc2e70e512bad55ef4129dd11f60ceaaeeccf78b94486550a555a843e4dea98f1f SHA512 12eb85ee3ce2c8fcf013c804a630bd3eb943de0980d1f6d365b5b5ed762ab956db80329f3e170f330ccc5b9e6f178ffa7938b1880477b7fb609d2cc3680b984a
EBUILD django-redis-5.3.0.ebuild 1725 BLAKE2B e27938e6e595e2a983f411d1e26a9914b0880a68765275c0e4a9bb9c7c95b3efe9f2fad5a9294dcb7bef603dbad0e0a4ab6364e6023d60e6873739b4ccf6e122 SHA512 be2b93c0bcf3e1270e8e08102d5806b57e8a3713d49aa6c5b53ff23e4b71b4e57b2217345c786f41dbef9fc1f683716fbb21e7925306ac087f4000fd72cea95d
+EBUILD django-redis-5.4.0.ebuild 1725 BLAKE2B e27938e6e595e2a983f411d1e26a9914b0880a68765275c0e4a9bb9c7c95b3efe9f2fad5a9294dcb7bef603dbad0e0a4ab6364e6023d60e6873739b4ccf6e122 SHA512 be2b93c0bcf3e1270e8e08102d5806b57e8a3713d49aa6c5b53ff23e4b71b4e57b2217345c786f41dbef9fc1f683716fbb21e7925306ac087f4000fd72cea95d
MISC metadata.xml 486 BLAKE2B 5bbffdb40a82538635cec1802d748bcf8c628390de12d19450486651f84f0c23ff7471354080aa51ae80790600d76f35a6fd37f720cb61cf410eab92bd15cbed SHA512 45cb2046312b95a3f9c87287e9a01015dc46b767de2dac060e79ee5457fa066f3229e815b313b4692128c88f6e13208f96048532ffe6554533427edc92286a2b
diff --git a/dev-python/django-redis/django-redis-5.4.0.ebuild b/dev-python/django-redis/django-redis-5.4.0.ebuild
new file mode 100644
index 000000000000..28c605fdb016
--- /dev/null
+++ b/dev-python/django-redis/django-redis-5.4.0.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
+PYPI_NO_NORMALIZE=1
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit distutils-r1 pypi
+
+DESCRIPTION="Full featured redis cache backend for Django"
+HOMEPAGE="
+ https://github.com/jazzband/django-redis/
+ https://pypi.org/project/django-redis/
+"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="
+ >=dev-python/django-3.2[${PYTHON_USEDEP}]
+ >=dev-python/redis-3.0.0[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ test? (
+ dev-db/redis
+ dev-python/lz4[${PYTHON_USEDEP}]
+ dev-python/msgpack[${PYTHON_USEDEP}]
+ dev-python/pytest-django[${PYTHON_USEDEP}]
+ dev-python/pytest-mock[${PYTHON_USEDEP}]
+ )
+"
+
+distutils_enable_tests pytest
+
+src_prepare() {
+ sed -e '/--cov/d' \
+ -e '/--no-cov/d' \
+ -i setup.cfg || die
+ distutils-r1_src_prepare
+}
+
+python_test() {
+ cd tests || die
+ local setting_file settings=(
+ settings.sqlite
+ settings.sqlite_json
+ settings.sqlite_lz4
+ settings.sqlite_msgpack
+ settings.sqlite_sharding
+ settings.sqlite_zlib
+ # TODO: requires pyzstd
+# settings.sqlite_zstd
+ )
+ for setting_file in "${settings[@]}"; do
+ einfo "Testing ${setting_file} configuration"
+ epytest "--ds=${setting_file}"
+ done
+}
+
+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
+ "
+
+ # Spawn Redis itself for testing purposes
+ einfo "Spawning Redis"
+ einfo "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
+}