diff options
author | 2023-06-17 07:45:28 +0200 | |
---|---|---|
committer | 2023-06-17 07:59:01 +0200 | |
commit | 89fa13f11185ddc2e34df3948ff07f53cec3b969 (patch) | |
tree | c3db76fffc703db3100269f870241f848581dd64 /dev-python/django-redis | |
parent | dev-python/ypy-websocket: Bump to 0.11.0 (diff) | |
download | gentoo-89fa13f11185ddc2e34df3948ff07f53cec3b969.tar.gz gentoo-89fa13f11185ddc2e34df3948ff07f53cec3b969.tar.bz2 gentoo-89fa13f11185ddc2e34df3948ff07f53cec3b969.zip |
dev-python/django-redis: Bump to 5.3.0
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/django-redis')
-rw-r--r-- | dev-python/django-redis/Manifest | 1 | ||||
-rw-r--r-- | dev-python/django-redis/django-redis-5.3.0.ebuild | 83 |
2 files changed, 84 insertions, 0 deletions
diff --git a/dev-python/django-redis/Manifest b/dev-python/django-redis/Manifest index 69b6ca626cb7..14f4d48279bf 100644 --- a/dev-python/django-redis/Manifest +++ b/dev-python/django-redis/Manifest @@ -1 +1,2 @@ DIST django-redis-5.2.0.tar.gz 44132 BLAKE2B 5d9680e43bfff506924b90cdce4fcbf40883a732af6b599c2e36d8549ce2aedbd69540b187152dc8fdc0d2a93b21c5fd2724d6386772f9b4af8632e38414b577 SHA512 65d3dc6b1d72c8b90908cf368cb66ac2eb74bdd32d0b42c8a5288b4448bd7444b21320251262627bc950eaf0d1a1ef0c3014761b690122bea9e5e20f744dd433 +DIST django-redis-5.3.0.tar.gz 44800 BLAKE2B 29a671f2899aefa6e59086bc194438aaf7e724b3edcefaf0c590a14e958847e86da34b8f94d4c29d62270f53f88395df2e911659e58471b5c037d1c2cd0f4dd7 SHA512 2867d405b69400355576eb3c052b4245844d56304979f09750251f8a2cf35ce704ebcdb6c80e6280fbfe24acfb237a3428f68081b6ada11ffc78257263703d7e diff --git a/dev-python/django-redis/django-redis-5.3.0.ebuild b/dev-python/django-redis/django-redis-5.3.0.ebuild new file mode 100644 index 000000000000..864b922bdd3b --- /dev/null +++ b/dev-python/django-redis/django-redis-5.3.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..11} ) + +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 +} |