mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-24 06:48:18 -07:00
dev-python/redis-py: Bump to 4.0.2
Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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>
|
||||
|
||||
61
dev-python/redis-py/redis-py-4.0.2.ebuild
Normal file
61
dev-python/redis-py/redis-py-4.0.2.ebuild
Normal file
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user