diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-08-26 00:09:36 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-08-26 00:09:36 +0100 |
commit | b1c81de4fadbd00897700a7321f03b390d952b2e (patch) | |
tree | e6cc812351d4f105c110cfc363ebb497e996f47a /dev-python/django-redis | |
parent | 7c59acba5699c9c58090a7a738669669a7307023 (diff) |
gentoo resync : 26.08.2021
Diffstat (limited to 'dev-python/django-redis')
-rw-r--r-- | dev-python/django-redis/Manifest | 2 | ||||
-rw-r--r-- | dev-python/django-redis/django-redis-5.0.0.ebuild | 73 |
2 files changed, 75 insertions, 0 deletions
diff --git a/dev-python/django-redis/Manifest b/dev-python/django-redis/Manifest index 09d041a952cd..823d6da2f268 100644 --- a/dev-python/django-redis/Manifest +++ b/dev-python/django-redis/Manifest @@ -1,3 +1,5 @@ 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 EBUILD django-redis-4.10.0.ebuild 495 BLAKE2B 3820d88bc95a84614d5370db8a4d746db09f6dc7323c65878243a2c28e8238a7f644ca99da9dbc9e46c51c5525361f6f3c904ee9a1d69b7fbe48fcf48293576d SHA512 3aa9b03f28c4f177b5b17546185403d8a53c82bbff612eb4cfb5492747b24a841c63feac33cbf587dc01c8b87fd1af54c60717a28dae7b4508c1e1823951cb1a +EBUILD django-redis-5.0.0.ebuild 1572 BLAKE2B 9ba0eb8f6914320f4e38727c9fffafc88fadbf00212a95436235209c5b7ca5cc75082db9d7573812d9cc3ef3971a851c496263c228de87e0a1b0716aa390331c SHA512 5bfb19cd2efa4c7b702dcc904a2d9fa7ac1735c5ebee385ed4504c7281be0abb890f0ce32860cc0dc16ea3276df7850ddcdadc29e7af2dfd729deada1e460bdb MISC metadata.xml 384 BLAKE2B 5d0785252e97fdb57ebed48e7f192236d384946b893ae2c36b180fac006119d094e899f756e95bcc04151b541a5329b4c55ecfdcb3542a85a3c8c449d6c6c189 SHA512 da987a6c44f22bd8d136993c38627b8059083f4b274d4b39a341089d990217efaf0a4c0ac1197476af7d5687adea3fc664d42ee33779882ac78fc02541233592 diff --git a/dev-python/django-redis/django-redis-5.0.0.ebuild b/dev-python/django-redis/django-redis-5.0.0.ebuild new file mode 100644 index 000000000000..e7e938e20d1d --- /dev/null +++ b/dev-python/django-redis/django-redis-5.0.0.ebuild @@ -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 +} |