mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-24 18:58:08 -07:00
dev-python/django-redis: add 5.0.0, enable py3.{9,10}, EAPI=8, add tests
Closes: https://bugs.gentoo.org/718728 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
This commit is contained in:
@@ -1 +1,2 @@
|
||||
DIST django-redis-4.10.0.tar.gz 59208 BLAKE2B 76a6887fdcce7decaeb2c4b76ff0ff58b8b074e902f6ccfc57dbdd21aeac82fbe37367caaf0af1c6facd5b87db6bb053b2fc553ba87b3cca970f2c0b1f99e35c SHA512 39e2d72699ceb2b0887e7048db22a4067001fb5e2c10ae2c5d2d8a0ab71e862773e443ba3a109f7b874b994a842e89772b3e33152aafd2a98e1cd906d5d2e690
|
||||
DIST django-redis-5.0.0.tar.gz 47508 BLAKE2B 67d87bcbde16730abd71945fe081d425c1047962ff2ca0c382f65d0588ef72103204f8febfeeda9ea382cf53a5c871c087a85ea817f04fac383961f69324557f SHA512 4516e30122845b49789f04fd079b5bc99a732e814d82deb817f14d105895069defa627f1852ce3fd8464de313a5f01ba81f87272f7a98830f7100dbb0c0bfb12
|
||||
|
||||
73
dev-python/django-redis/django-redis-5.0.0.ebuild
Normal file
73
dev-python/django-redis/django-redis-5.0.0.ebuild
Normal file
@@ -0,0 +1,73 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{8..10} )
|
||||
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"
|
||||
|
||||
RDEPEND="
|
||||
>=dev-python/django-2.2[${PYTHON_USEDEP}]
|
||||
>=dev-python/redis-py-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}]
|
||||
)
|
||||
"
|
||||
|
||||
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
|
||||
)
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user