diff options
author | Michał Górny <mgorny@gentoo.org> | 2021-11-22 23:37:32 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2021-11-23 00:04:23 +0100 |
commit | f5e17a96d1a32f638be4ccb3c4bccf2bdf981e18 (patch) | |
tree | bd2c2093f1e4214c78517c8e0b0d897a461f372b /dev-python/redis-py | |
parent | dev-python/iso8601: Bump to 1.0.1 (diff) | |
download | gentoo-f5e17a96d1a32f638be4ccb3c4bccf2bdf981e18.tar.gz gentoo-f5e17a96d1a32f638be4ccb3c4bccf2bdf981e18.tar.bz2 gentoo-f5e17a96d1a32f638be4ccb3c4bccf2bdf981e18.zip |
dev-python/redis-py: Bump to 4.0.2
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/redis-py')
-rw-r--r-- | dev-python/redis-py/Manifest | 1 | ||||
-rw-r--r-- | dev-python/redis-py/metadata.xml | 2 | ||||
-rw-r--r-- | dev-python/redis-py/redis-py-4.0.2.ebuild | 61 |
3 files changed, 63 insertions, 1 deletions
diff --git a/dev-python/redis-py/Manifest b/dev-python/redis-py/Manifest index fb2f7d6f986a..60c1bce0736f 100644 --- a/dev-python/redis-py/Manifest +++ b/dev-python/redis-py/Manifest @@ -1 +1,2 @@ DIST redis-py-3.5.3.tar.gz 141112 BLAKE2B b953d553a3cfa2d6ba6f5aa35dfaf93865acbfad0e901a96082c3b1c027dc23b6ceedde185f24e86772522fbbf4f0a4d18e115a6b40aff6a65450bbe397d5c07 SHA512 eae6ac6b3e0f1366a9c29e5e2d9a5210e4627e62e3006159b1c290f36cd9c1c2c12cafe0944f7a010e04632b517874f230aa9411491993b7ecf2080546217206 +DIST redis-py-4.0.2.tar.gz 2262717 BLAKE2B 7db99843b4ee354b0841de1cacca001901b0614868e6cd545edb0f3705b7dc7d7a0ee755e2184ec1fb080a845a2f193ff5ab5a4dd99006eed6b9a1c89fbee131 SHA512 3f73ddd2ceb551fa447cfb4ecdc1d393957bbfd8c184ae3d357f9f47fff860f1c4684ec0fc3cb85fea530454456c17a98a2a56e592bef4cd9ad17bb405c1a0f7 diff --git a/dev-python/redis-py/metadata.xml b/dev-python/redis-py/metadata.xml index 93aefe765a0d..998ac9ce8e08 100644 --- a/dev-python/redis-py/metadata.xml +++ b/dev-python/redis-py/metadata.xml @@ -12,6 +12,6 @@ <stabilize-allarches/> <upstream> <remote-id type="pypi">redis</remote-id> - <remote-id type="github">andymccurdy/redis-py</remote-id> + <remote-id type="github">redis/redis-py</remote-id> </upstream> </pkgmetadata> diff --git a/dev-python/redis-py/redis-py-4.0.2.ebuild b/dev-python/redis-py/redis-py-4.0.2.ebuild new file mode 100644 index 000000000000..ccefac5ea7ba --- /dev/null +++ b/dev-python/redis-py/redis-py-4.0.2.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{9..10} pypy3 ) +inherit distutils-r1 + +MY_PN="redis" +MY_P="${MY_PN}-${PV}" + +DESCRIPTION="Python client for Redis key-value store" +HOMEPAGE="https://github.com/redis/redis-py" +SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/${MY_P}" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~x86" + +RDEPEND=" + dev-python/deprecated[${PYTHON_USEDEP}]" +BDEPEND=" + test? ( + dev-db/redis + ) +" + +distutils_enable_tests pytest + +python_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 + # NOTE: On sam@'s machine, spawning Redis can hang in the sandbox. + # I'm not restricting tests yet because this doesn't happen for anyone else AFAICT. + elog "Spawning Redis" + elog "NOTE: Port ${redis_port} must be free" + "${EPREFIX}"/usr/sbin/redis-server - <<< "${redis_test_config}" || die + + # Run the tests + epytest -k "not redismod" + + # Clean up afterwards + local pid=$(<"${redis_pid}") + kill "${pid}" || die + local retries=10 + while [[ -f ${redis_pid} ]]; do + sleep 1 + if [[ $(( retries-- )) -eq 0 ]]; then + die "redis did not stop" + fi + done +} |