1 |
commit: d85169c4e4bf3400c5d2cd2687a0940cb1326152 |
2 |
Author: Justin Lecher <jlec <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Nov 3 11:37:36 2015 +0000 |
4 |
Commit: Justin Lecher <jlec <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Nov 3 11:38:00 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d85169c4 |
7 |
|
8 |
dev-python/redis-py: Version Bump |
9 |
|
10 |
Package-Manager: portage-2.2.23 |
11 |
Signed-off-by: Justin Lecher <jlec <AT> gentoo.org> |
12 |
|
13 |
dev-python/redis-py/Manifest | 1 + |
14 |
.../files/redis-py-2.10.5-test-backport.patch | 24 ++++++++ |
15 |
.../files/redis-py-2.10.5-test-finalize.patch | 19 +++++++ |
16 |
dev-python/redis-py/redis-py-2.10.5.ebuild | 66 ++++++++++++++++++++++ |
17 |
4 files changed, 110 insertions(+) |
18 |
|
19 |
diff --git a/dev-python/redis-py/Manifest b/dev-python/redis-py/Manifest |
20 |
index 30cc386..c30dc91 100644 |
21 |
--- a/dev-python/redis-py/Manifest |
22 |
+++ b/dev-python/redis-py/Manifest |
23 |
@@ -1,4 +1,5 @@ |
24 |
DIST redis-py-2.10.1.tar.gz 84143 SHA256 644aaf429e666d2254143a6a02f3b1cca2806d0cd52bb130c8f879d3c8259d62 SHA512 694a687e22654631fcf7b0b5884c2f3b3f804befe8080a1a27f08e212afe2f64c36921e025801d67bac1786b105f23565f52768f5b62ed1d18038be8dba9542c WHIRLPOOL e1b76cf47043d3d5317fc4352c9b52598af119a1501e4d6af1615181006afa658417002fdd8e206e6d5d5556df6dcbdd34a74b89918c513802793bd6ced4cccd |
25 |
DIST redis-py-2.10.3.tar.gz 86532 SHA256 a4fb37b02860f6b1617f6469487471fd086dd2d38bbce640c2055862b9c4019c SHA512 a6dcb1160f91c444a6fd107761b2701e7d8ab2eed7b9fcc00e8f0bdcefe46c2a626611f36fe6bf520fe3cceeb509562609e6dba263e1508abe285a6eab73963c WHIRLPOOL 2b2fc577ff752f71675cade7c591442526dfbac07495d1cf61b14ac21371e76aec2d008531bb8729eb5e3f3ffd372d6c9bf9f7554e51f8076d2d79c07377d33e |
26 |
+DIST redis-py-2.10.5.tar.gz 88610 SHA256 5dfbae6acfc54edf0a7a415b99e0b21c0a3c27a7f787b292eea727b1facc5533 SHA512 b2e6cb85c274c8f1c63e27256bbab816d016a68c324bf7092cf53feae819a34fa94f45565b0f209ee981919d793b2963462eb1a6f841e9dde9885802e0ebbe8f WHIRLPOOL af0b92b5ddb69346ff285d959a5052df5d65638e70d8d1b3d4b00adb80755eef41b492bfea432507443883f206a4537faf10e82d4253d7612e74ab7a52df47f1 |
27 |
DIST redis-py-2.7.4.tar.gz 79715 SHA256 623c8d437401314f8ec92f03848638c79c757098b316f0ed40ec2deaad57e082 SHA512 9b8db28c77e9df7a243e510a4f66a021179ab8ff52cfed2cc1b18b20f167eeee138d59a868fc105a32993681551c53e98d45680c16313680e8b4f36b6defa3b9 WHIRLPOOL fa5c754dc83f7d8baea68e21e283435994380e3e7243fa9bdb74ce934f7adacc75a11c6312d4b642606aa817010abc23f8f2a7b9eac1e2c73e50e897085124ad |
28 |
DIST redis-py-2.9.1.tar.gz 62204 SHA256 af9747ec2727425b1b09252975e21502ee5a3d8d235c7f49869eb13e09ccf4e4 SHA512 6b4912acafb31c87a5bc47b0420834aa9d1eba57feb0bbacdea943b746fe2f24aee4c9f13e7b03ae4edc562043b22c370cc7f53e45be07c5408cfa9852f8ea38 WHIRLPOOL ae38ea63d605f8dd667d9fc548de972bf38d661ae6ef357070ebe7cba3b484febc45d6b7611916d8a1e262e6bbf4754257e727f41af8caa30597954a1fc20cf5 |
29 |
|
30 |
diff --git a/dev-python/redis-py/files/redis-py-2.10.5-test-backport.patch b/dev-python/redis-py/files/redis-py-2.10.5-test-backport.patch |
31 |
new file mode 100644 |
32 |
index 0000000..74d2d14 |
33 |
--- /dev/null |
34 |
+++ b/dev-python/redis-py/files/redis-py-2.10.5-test-backport.patch |
35 |
@@ -0,0 +1,24 @@ |
36 |
+From 550eee8106ca5984f104b3a2a79299d9ae0821af Mon Sep 17 00:00:00 2001 |
37 |
+From: Chris Lamb <chris@×××××××××××××.uk> |
38 |
+Date: Tue, 18 Aug 2015 13:28:40 +0200 |
39 |
+Subject: [PATCH] Fix tests under Redis 3.x; we can be of an "embedded string" |
40 |
+ format now. |
41 |
+ |
42 |
+Signed-off-by: Chris Lamb <chris@×××××××××××××.uk> |
43 |
+--- |
44 |
+ tests/test_commands.py | 2 +- |
45 |
+ 1 file changed, 1 insertion(+), 1 deletion(-) |
46 |
+ |
47 |
+diff --git a/tests/test_commands.py b/tests/test_commands.py |
48 |
+index 2e104ed..c0e56b0 100644 |
49 |
+--- a/tests/test_commands.py |
50 |
++++ b/tests/test_commands.py |
51 |
+@@ -112,7 +112,7 @@ def test_object(self, r): |
52 |
+ r['a'] = 'foo' |
53 |
+ assert isinstance(r.object('refcount', 'a'), int) |
54 |
+ assert isinstance(r.object('idletime', 'a'), int) |
55 |
+- assert r.object('encoding', 'a') == b('raw') |
56 |
++ assert r.object('encoding', 'a') in (b('raw'), b('embstr')) |
57 |
+ assert r.object('idletime', 'invalid-key') is None |
58 |
+ |
59 |
+ def test_ping(self, r): |
60 |
|
61 |
diff --git a/dev-python/redis-py/files/redis-py-2.10.5-test-finalize.patch b/dev-python/redis-py/files/redis-py-2.10.5-test-finalize.patch |
62 |
new file mode 100644 |
63 |
index 0000000..1a80748 |
64 |
--- /dev/null |
65 |
+++ b/dev-python/redis-py/files/redis-py-2.10.5-test-finalize.patch |
66 |
@@ -0,0 +1,19 @@ |
67 |
+ setup.py | 5 ----- |
68 |
+ 1 file changed, 5 deletions(-) |
69 |
+ |
70 |
+diff --git a/setup.py b/setup.py |
71 |
+index ed8fd5f..ab648a3 100644 |
72 |
+--- a/setup.py |
73 |
++++ b/setup.py |
74 |
+@@ -9,11 +9,6 @@ try: |
75 |
+ from setuptools.command.test import test as TestCommand |
76 |
+ |
77 |
+ class PyTest(TestCommand): |
78 |
+- def finalize_options(self): |
79 |
+- TestCommand.finalize_options(self) |
80 |
+- self.test_args = [] |
81 |
+- self.test_suite = True |
82 |
+- |
83 |
+ def run_tests(self): |
84 |
+ # import here, because outside the eggs aren't loaded |
85 |
+ import pytest |
86 |
|
87 |
diff --git a/dev-python/redis-py/redis-py-2.10.5.ebuild b/dev-python/redis-py/redis-py-2.10.5.ebuild |
88 |
new file mode 100644 |
89 |
index 0000000..cfc6a77 |
90 |
--- /dev/null |
91 |
+++ b/dev-python/redis-py/redis-py-2.10.5.ebuild |
92 |
@@ -0,0 +1,66 @@ |
93 |
+# Copyright 1999-2015 Gentoo Foundation |
94 |
+# Distributed under the terms of the GNU General Public License v2 |
95 |
+# $Id$ |
96 |
+ |
97 |
+EAPI=5 |
98 |
+ |
99 |
+PYTHON_COMPAT=( python2_7 python3_{3,4,5} pypy pypy3 ) |
100 |
+ |
101 |
+inherit distutils-r1 |
102 |
+ |
103 |
+MY_PN="redis" |
104 |
+MY_P="${MY_PN}-${PV}" |
105 |
+ |
106 |
+DESCRIPTION="Python client for Redis key-value store" |
107 |
+HOMEPAGE="https://github.com/andymccurdy/redis-py" |
108 |
+SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz -> ${P}.tar.gz" |
109 |
+ |
110 |
+LICENSE="MIT" |
111 |
+SLOT="0" |
112 |
+KEYWORDS="~amd64 ~arm ~hppa ~ppc64 ~x86 ~amd64-linux ~x86-linux" |
113 |
+IUSE="test" |
114 |
+ |
115 |
+RDEPEND="" |
116 |
+DEPEND="dev-python/setuptools[${PYTHON_USEDEP}] |
117 |
+ test? ( dev-db/redis |
118 |
+ >=dev-python/pytest-2.5.0[${PYTHON_USEDEP}] )" |
119 |
+ |
120 |
+S="${WORKDIR}/${MY_P}" |
121 |
+ |
122 |
+PATCHES=( |
123 |
+ "${FILESDIR}"/${P}-test-finalize.patch |
124 |
+) |
125 |
+ |
126 |
+python_prepare_all() { |
127 |
+ distutils-r1_python_prepare_all |
128 |
+ |
129 |
+ # Make sure that tests will be used from BUILD_DIR rather than cwd. |
130 |
+ mv tests tests-hidden || die |
131 |
+ |
132 |
+ # Correct local import patch syntax |
133 |
+ sed -e 's:from .conftest:from conftest:' \ |
134 |
+ -i tests-hidden/{test_connection_pool.py,test_commands.py,test_encoding.py,test_pubsub.py} \ |
135 |
+ || die |
136 |
+} |
137 |
+ |
138 |
+python_compile() { |
139 |
+ distutils-r1_python_compile |
140 |
+ |
141 |
+ if use test; then |
142 |
+ cp -r tests-hidden "${BUILD_DIR}"/tests || die |
143 |
+ fi |
144 |
+} |
145 |
+ |
146 |
+python_test() { |
147 |
+ local sock="${T}/redis.sock" |
148 |
+ |
149 |
+ "${EPREFIX}/usr/sbin/redis-server" - <<- EOF |
150 |
+ daemonize yes |
151 |
+ pidfile "${T}/redis.pid" |
152 |
+ unixsocket ${sock} |
153 |
+ EOF |
154 |
+ |
155 |
+ PYTHONPATH="${S}:${S}/tests-hidden" |
156 |
+ esetup.py test --verbose |
157 |
+ kill $(<"${T}/redis.pid") |
158 |
+} |