summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/django-redis')
-rw-r--r--dev-python/django-redis/Manifest2
-rw-r--r--dev-python/django-redis/django-redis-4.10.0.ebuild20
-rw-r--r--dev-python/django-redis/django-redis-5.4.0.ebuild83
-rw-r--r--dev-python/django-redis/metadata.xml6
4 files changed, 89 insertions, 22 deletions
diff --git a/dev-python/django-redis/Manifest b/dev-python/django-redis/Manifest
index 57ff3e1cacd6..ac9c29bbbe25 100644
--- a/dev-python/django-redis/Manifest
+++ b/dev-python/django-redis/Manifest
@@ -1 +1 @@
-DIST django-redis-4.10.0.tar.gz 59208 BLAKE2B 76a6887fdcce7decaeb2c4b76ff0ff58b8b074e902f6ccfc57dbdd21aeac82fbe37367caaf0af1c6facd5b87db6bb053b2fc553ba87b3cca970f2c0b1f99e35c SHA512 39e2d72699ceb2b0887e7048db22a4067001fb5e2c10ae2c5d2d8a0ab71e862773e443ba3a109f7b874b994a842e89772b3e33152aafd2a98e1cd906d5d2e690
+DIST django-redis-5.4.0.tar.gz 52567 BLAKE2B f3ac670500dbe57d795905d10d3a63102c60de6b61e96af257c0e654cd7aa7dc2e70e512bad55ef4129dd11f60ceaaeeccf78b94486550a555a843e4dea98f1f SHA512 12eb85ee3ce2c8fcf013c804a630bd3eb943de0980d1f6d365b5b5ed762ab956db80329f3e170f330ccc5b9e6f178ffa7938b1880477b7fb609d2cc3680b984a
diff --git a/dev-python/django-redis/django-redis-4.10.0.ebuild b/dev-python/django-redis/django-redis-4.10.0.ebuild
deleted file mode 100644
index 58ee6c87a0cd..000000000000
--- a/dev-python/django-redis/django-redis-4.10.0.ebuild
+++ /dev/null
@@ -1,20 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7,8} )
-
-inherit distutils-r1
-
-DESCRIPTION="Full featured redis cache backend for Django"
-HOMEPAGE="https://github.com/jazzband/django-redis/"
-SRC_URI="mirror://pypi/${PN:0:1}"/${PN}/${P}.tar.gz
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="~amd64"
-
-DEPEND=">=dev-python/django-1.11[${PYTHON_USEDEP}]
- >=dev-python/redis-py-2.10.0[${PYTHON_USEDEP}]"
-RDEPEND="${DEPEND}"
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
+}
diff --git a/dev-python/django-redis/metadata.xml b/dev-python/django-redis/metadata.xml
index e093c7994dc6..3e88aa426230 100644
--- a/dev-python/django-redis/metadata.xml
+++ b/dev-python/django-redis/metadata.xml
@@ -1,10 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>williamh@gentoo.org</email>
<name>William Hubbs</name>
</maintainer>
+ <maintainer type="project">
+ <email>python@gentoo.org</email>
+ <name>Python</name>
+ </maintainer>
<upstream>
<remote-id type="github">jazzband/django-redis</remote-id>
<remote-id type="pypi">django-redis</remote-id>