1 |
commit: 9a759f9a58b3b42fd0939bb4070f61a003eb2b0b |
2 |
Author: Sven Wegener <swegener <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Apr 1 11:36:03 2020 +0000 |
4 |
Commit: Sven Wegener <swegener <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Apr 1 11:37:28 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9a759f9a |
7 |
|
8 |
dev-python/hiredis: Version bump |
9 |
|
10 |
Package-Manager: Portage-2.3.89, Repoman-2.3.20 |
11 |
Signed-off-by: Sven Wegener <swegener <AT> gentoo.org> |
12 |
|
13 |
dev-python/hiredis/Manifest | 1 + |
14 |
.../hiredis/files/hiredis-1.0.1-api-0.14.patch | 32 ++++++++++++++++++++++ |
15 |
.../hiredis/files/hiredis-1.0.1-system-libs.patch | 15 ++++++++++ |
16 |
dev-python/hiredis/hiredis-1.0.1.ebuild | 24 ++++++++++++++++ |
17 |
4 files changed, 72 insertions(+) |
18 |
|
19 |
diff --git a/dev-python/hiredis/Manifest b/dev-python/hiredis/Manifest |
20 |
index 03eb100b294..a24f01ae4f0 100644 |
21 |
--- a/dev-python/hiredis/Manifest |
22 |
+++ b/dev-python/hiredis/Manifest |
23 |
@@ -1 +1,2 @@ |
24 |
DIST hiredis-0.2.0.tar.gz 46113 BLAKE2B bb0479f99f5f705488846ff5e7b52d6e8a5c34519936aa747027e8a597271d3ba70efc2455f54c24248091a4477ac2a307cad7d89a03c96cb7d331e6b6e82a30 SHA512 9eb18ec089517340043d14938a213b139dc948dc9cf2f9c65e632bb4694ac22543b87a5875c1cea083e2bc8e303103c749047889cdb3e9d5680b586d34330c86 |
25 |
+DIST hiredis-1.0.1.tar.gz 54460 BLAKE2B 90bdbd99f47b0765636dbeee9fc3cbb9c71fd7ba752a0d58ab9c2c9d2ee93bfc1a343465618d1127703ae09a4870d6691d7d5b52f59150849a448eae73c6a1d3 SHA512 8aa5e29b09f42826d746857d55b8042b40ffa3977386b0f8b2ea1b2ede0c28337f3df4bbd177192d8873570810bc9d0987f1f2b29f094f27adaa4aaf409c3a6b |
26 |
|
27 |
diff --git a/dev-python/hiredis/files/hiredis-1.0.1-api-0.14.patch b/dev-python/hiredis/files/hiredis-1.0.1-api-0.14.patch |
28 |
new file mode 100644 |
29 |
index 00000000000..16c42022828 |
30 |
--- /dev/null |
31 |
+++ b/dev-python/hiredis/files/hiredis-1.0.1-api-0.14.patch |
32 |
@@ -0,0 +1,32 @@ |
33 |
+diff -Nur hiredis-1.0.1.orig/src/reader.c hiredis-1.0.1/src/reader.c |
34 |
+--- hiredis-1.0.1.orig/src/reader.c 2019-11-13 11:38:29.000000000 +0100 |
35 |
++++ hiredis-1.0.1/src/reader.c 2020-04-01 13:15:19.852085240 +0200 |
36 |
+@@ -167,7 +167,7 @@ |
37 |
+ static void Reader_dealloc(hiredis_ReaderObject *self) { |
38 |
+ // we don't need to free self->encoding as the buffer is managed by Python |
39 |
+ // https://docs.python.org/3/c-api/arg.html#strings-and-buffers |
40 |
+- redisReplyReaderFree(self->reader); |
41 |
++ redisReaderFree(self->reader); |
42 |
+ Py_XDECREF(self->protocolErrorClass); |
43 |
+ Py_XDECREF(self->replyErrorClass); |
44 |
+ |
45 |
+@@ -271,7 +271,7 @@ |
46 |
+ goto error; |
47 |
+ } |
48 |
+ |
49 |
+- redisReplyReaderFeed(self->reader, (char *)buf.buf + off, len); |
50 |
++ redisReaderFeed(self->reader, (char *)buf.buf + off, len); |
51 |
+ PyBuffer_Release(&buf); |
52 |
+ Py_RETURN_NONE; |
53 |
+ |
54 |
+@@ -290,8 +290,8 @@ |
55 |
+ return NULL; |
56 |
+ } |
57 |
+ |
58 |
+- if (redisReplyReaderGetReply(self->reader, (void**)&obj) == REDIS_ERR) { |
59 |
+- errstr = redisReplyReaderGetError(self->reader); |
60 |
++ if (redisReaderGetReply(self->reader, (void**)&obj) == REDIS_ERR) { |
61 |
++ errstr = redisReaderGetError(self->reader); |
62 |
+ /* protocolErrorClass might be a callable. call it, then use it's type */ |
63 |
+ err = createError(self->protocolErrorClass, errstr, strlen(errstr)); |
64 |
+ if (err != NULL) { |
65 |
|
66 |
diff --git a/dev-python/hiredis/files/hiredis-1.0.1-system-libs.patch b/dev-python/hiredis/files/hiredis-1.0.1-system-libs.patch |
67 |
new file mode 100644 |
68 |
index 00000000000..c11d0baa563 |
69 |
--- /dev/null |
70 |
+++ b/dev-python/hiredis/files/hiredis-1.0.1-system-libs.patch |
71 |
@@ -0,0 +1,15 @@ |
72 |
+diff -Nur hiredis-1.0.1.orig/setup.py hiredis-1.0.1/setup.py |
73 |
+--- hiredis-1.0.1.orig/setup.py 2019-11-13 11:38:29.000000000 +0100 |
74 |
++++ hiredis-1.0.1/setup.py 2020-03-19 08:18:53.414214592 +0100 |
75 |
+@@ -11,9 +11,8 @@ |
76 |
+ return module.__version__ |
77 |
+ |
78 |
+ ext = Extension("hiredis.hiredis", |
79 |
+- sources=sorted(glob.glob("src/*.c") + |
80 |
+- ["vendor/hiredis/%s.c" % src for src in ("read", "sds")]), |
81 |
+- include_dirs=["vendor"]) |
82 |
++ sources=sorted(glob.glob("src/*.c")), |
83 |
++ libraries=["hiredis"]) |
84 |
+ |
85 |
+ setup( |
86 |
+ name="hiredis", |
87 |
|
88 |
diff --git a/dev-python/hiredis/hiredis-1.0.1.ebuild b/dev-python/hiredis/hiredis-1.0.1.ebuild |
89 |
new file mode 100644 |
90 |
index 00000000000..bc7739eaeec |
91 |
--- /dev/null |
92 |
+++ b/dev-python/hiredis/hiredis-1.0.1.ebuild |
93 |
@@ -0,0 +1,24 @@ |
94 |
+# Copyright 1999-2020 Gentoo Authors |
95 |
+# Distributed under the terms of the GNU General Public License v2 |
96 |
+ |
97 |
+EAPI=7 |
98 |
+PYTHON_COMPAT=( python3_{6,7,8} ) |
99 |
+ |
100 |
+inherit distutils-r1 |
101 |
+ |
102 |
+DESCRIPTION="Python extension that wraps hiredis" |
103 |
+HOMEPAGE="https://github.com/pietern/hiredis-py" |
104 |
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
105 |
+ |
106 |
+LICENSE="BSD" |
107 |
+SLOT="0" |
108 |
+KEYWORDS="~amd64 ~arm ~x86" |
109 |
+IUSE="" |
110 |
+ |
111 |
+DEPEND=">=dev-libs/hiredis-0.14:=" |
112 |
+RDEPEND="${DEPEND}" |
113 |
+ |
114 |
+PATCHES=( |
115 |
+ "${FILESDIR}"/${P}-system-libs.patch |
116 |
+ "${FILESDIR}"/${P}-api-0.14.patch |
117 |
+) |