Skip to content

Commit 5ee9cae

Browse files
mceplbmwiedemann
authored andcommitted
Update python-hiredis to version 2.2.2 / rev 8 via SR 1072863
https://build.opensuse.org/request/show/1072863 by user mcepl + dimstar_suse - Update to 2.2.2: - Reverting gcc -BSymbolic due to symbol collisions - Add pack_command to support writing via hiredis-py - Fixing broken windows builds on python < 3.8 - Fix url in Issue tracker - Restores publishing of source distribution - Supporting hiredis 1.1.0 - Modernizing: Restoring CI, Moving to pytest - Adding LICENSE to Repository - Python 3.11 trove, and links back to the project - Integrating release drafter - Implement pack_command that serializes redis-py command to the RESP bytes object. - Add 159-sdsalloc-to-alloc.patch (gh#redis/hiredis-py#158), which replaces use of sdsalloc with plain alloc.
1 parent 72eff9c commit 5ee9cae

File tree

9 files changed

+138
-39
lines changed

9 files changed

+138
-39
lines changed

packages/p/python-hiredis/.files

65 Bytes
Binary file not shown.

packages/p/python-hiredis/.rev

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,27 @@
6262
<comment></comment>
6363
<requestid>946784</requestid>
6464
</revision>
65+
<revision rev="8" vrev="1">
66+
<srcmd5>6b68a316fb36f07ebeff2d1f06f9ca56</srcmd5>
67+
<version>2.2.2</version>
68+
<time>1679182350</time>
69+
<user>dimstar_suse</user>
70+
<comment>- Update to 2.2.2:
71+
- Reverting gcc -BSymbolic due to symbol collisions
72+
- Add pack_command to support writing via hiredis-py
73+
- Fixing broken windows builds on python &lt; 3.8
74+
- Fix url in Issue tracker
75+
- Restores publishing of source distribution
76+
- Supporting hiredis 1.1.0
77+
- Modernizing: Restoring CI, Moving to pytest
78+
- Adding LICENSE to Repository
79+
- Python 3.11 trove, and links back to the project
80+
- Integrating release drafter
81+
- Implement pack_command that serializes redis-py command to
82+
the RESP bytes object.
83+
- Add 159-sdsalloc-to-alloc.patch (gh#redis/hiredis-py#158),
84+
which replaces use of sdsalloc with plain alloc.
85+
</comment>
86+
<requestid>1072863</requestid>
87+
</revision>
6588
</revisionlist>

packages/p/python-hiredis/0001-Use-system-libhiredis.patch

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,28 @@ Forwarded: no
99
Last-Updated: 2022-01-15
1010
Patch-Name: 0001-Use-system-libhiredis.patch
1111
---
12-
setup.py 2022-01-15 16:17:07.715728053 +0100 | 2 +-
13-
1 file changed, 1 insertion(+), 1 deletion(-)
14-
15-
--- a/setup.py 2021-03-28 17:11:23.000000000 +0200
16-
+++ b/setup.py 2022-01-15 16:17:07.715728053 +0100
17-
@@ -13,7 +13,7 @@ def version():
18-
ext = Extension("hiredis.hiredis",
19-
sources=sorted(glob.glob("src/*.c") +
20-
["vendor/hiredis/%s.c" % src for src in ("alloc", "read", "sds")]),
21-
- include_dirs=["vendor"])
22-
+ extra_link_args=["-lhiredis"])
12+
setup.py | 6 ++----
13+
1 file changed, 2 insertions(+), 4 deletions(-)
2314

15+
--- a/setup.py
16+
+++ b/setup.py
17+
@@ -26,8 +26,7 @@ def get_linker_args():
18+
if 'win32' in sys.platform or 'darwin' in sys.platform:
19+
return []
20+
else:
21+
- return ["-Wl,-Bsymbolic", ]
22+
-
23+
+ return ["-Wl,-Bsymbolic", "-lhiredis"]
24+
25+
def get_compiler_args():
26+
if 'win32' in sys.platform:
27+
@@ -47,8 +46,7 @@ ext = Extension("hiredis.hiredis",
28+
sources=get_sources(),
29+
extra_compile_args=get_compiler_args(),
30+
extra_link_args=get_linker_args(),
31+
- libraries=get_libraries(),
32+
- include_dirs=["vendor"])
33+
+ libraries=get_libraries())
34+
2435
setup(
25-
name="hiredis",
36+
name="hiredis",
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
From c2a20695aae53de7b5160e29675344df0b805fa6 Mon Sep 17 00:00:00 2001
2+
From: Maxim Cournoyer <[email protected]>
3+
Date: Sat, 18 Mar 2023 15:18:08 -0400
4+
Subject: [PATCH] pack: Replace sdsalloc.h with alloc.h
5+
6+
Fixes #158.
7+
8+
* src/pack.c: Replace sdsalloc.h with alloc.h.
9+
(pack_command): Replace s_malloc with hi_malloc.
10+
---
11+
src/pack.c | 6 +++---
12+
1 file changed, 3 insertions(+), 3 deletions(-)
13+
14+
diff --git a/src/pack.c b/src/pack.c
15+
index 443e9d3..23e4004 100644
16+
--- a/src/pack.c
17+
+++ b/src/pack.c
18+
@@ -16,7 +16,7 @@ extern sds sdscpylen(sds s, const char *t, size_t len);
19+
extern sds sdsnewlen(const void *init, size_t initlen);
20+
#endif
21+
22+
-#include <hiredis/sdsalloc.h>
23+
+#include <hiredis/alloc.h>
24+
25+
PyObject *
26+
pack_command(PyObject *cmd)
27+
@@ -32,7 +32,7 @@ pack_command(PyObject *cmd)
28+
}
29+
30+
Py_ssize_t tokens_number = PyTuple_Size(cmd);
31+
- sds *tokens = s_malloc(sizeof(sds) * tokens_number);
32+
+ sds *tokens = hi_malloc(sizeof(sds) * tokens_number);
33+
if (tokens == NULL)
34+
{
35+
return PyErr_NoMemory();
36+
@@ -118,4 +118,4 @@ pack_command(PyObject *cmd)
37+
sdsfreesplitres(tokens, tokens_number);
38+
hi_free(lengths);
39+
return result;
40+
-}
41+
\ No newline at end of file
42+
+}
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
---
22
setup.py | 3 +--
3-
1 file changed, 1 insertion(+), 2 deletions(-)
3+
setup.py | 2 +-
4+
1 file changed, 1 insertion(+), 1 deletion(-)
45

5-
--- a/setup.py 2022-01-15 16:32:39.379711369 +0100
6-
+++ b/setup.py 2022-01-15 16:33:03.091710944 +0100
7-
@@ -11,8 +11,7 @@ def version():
8-
return module.__version__
6+
--- a/setup.py
7+
+++ b/setup.py
8+
@@ -19,7 +19,7 @@ def version():
99

10-
ext = Extension("hiredis.hiredis",
11-
- sources=sorted(glob.glob("src/*.c") +
12-
- ["vendor/hiredis/%s.c" % src for src in ("alloc", "read", "sds")]),
13-
+ sources=sorted(glob.glob("src/*.c")),
14-
extra_link_args=["-lhiredis"])
10+
def get_sources():
11+
hiredis_sources = ("alloc", "async", "hiredis", "net", "read", "sds", "sockcompat")
12+
- return sorted(glob.glob("src/*.c") + ["vendor/hiredis/%s.c" % src for src in hiredis_sources])
13+
+ return sorted(glob.glob("src/*.c"))
1514

16-
setup(
15+
16+
def get_linker_args():

packages/p/python-hiredis/hiredis-2.0.0.tar.gz

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/ipfs/bafkreie4e4f5avt2trqgomue4aabgl3aho2ozpgxa5lhmr5gr6c66roe2q

packages/p/python-hiredis/python-hiredis.changes

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
-------------------------------------------------------------------
2+
Sat Mar 18 20:17:39 UTC 2023 - Matej Cepl <[email protected]>
3+
4+
- Update to 2.2.2:
5+
- Reverting gcc -BSymbolic due to symbol collisions
6+
- Add pack_command to support writing via hiredis-py
7+
- Fixing broken windows builds on python < 3.8
8+
- Fix url in Issue tracker
9+
- Restores publishing of source distribution
10+
- Supporting hiredis 1.1.0
11+
- Modernizing: Restoring CI, Moving to pytest
12+
- Adding LICENSE to Repository
13+
- Python 3.11 trove, and links back to the project
14+
- Integrating release drafter
15+
- Implement pack_command that serializes redis-py command to
16+
the RESP bytes object.
17+
18+
- Add 159-sdsalloc-to-alloc.patch (gh#redis/hiredis-py#158),
19+
which replaces use of sdsalloc with plain alloc.
20+
121
-------------------------------------------------------------------
222
Sat Jan 15 15:37:17 UTC 2022 - Matthias Fehring <[email protected]>
323

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#
22
# spec file for package python-hiredis
33
#
4-
# Copyright (c) 2022 SUSE LLC
4+
# Copyright (c) 2023 SUSE LLC
55
#
66
# All modifications and additions to the file contributed by third parties
77
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,9 +16,8 @@
1616
#
1717

1818

19-
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
2019
Name: python-hiredis
21-
Version: 2.0.0
20+
Version: 2.2.2
2221
Release: 0
2322
Summary: Python wrapper for hiredis
2423
License: BSD-3-Clause
@@ -27,9 +26,13 @@ Source: https://files.pythonhosted.org/packages/source/h/hiredis/hiredis
2726
Patch0: 0001-Use-system-libhiredis.patch
2827
# PATCH-FIX-UPSTREAM drop-vendor-sources.patch gh#redis/hiredis-py#90 [email protected]
2928
# Allow to use platform hiredis libs on build
30-
Patch2: drop-vendor-sources.patch
29+
Patch1: drop-vendor-sources.patch
30+
# PATCH-FIX-UPSTREAM 159-sdsalloc-to-alloc.patch gh#redis/hiredis-py#158 [email protected]
31+
# Don't use sdsalloc, we actually don't need it
32+
Patch2: 159-sdsalloc-to-alloc.patch
3133
BuildRequires: %{python_module devel}
32-
BuildRequires: %{python_module setuptools}
34+
BuildRequires: %{python_module pip}
35+
BuildRequires: %{python_module wheel}
3336
BuildRequires: fdupes
3437
BuildRequires: hiredis-devel >= 1.0.0
3538
BuildRequires: python-rpm-macros
@@ -39,23 +42,23 @@ BuildRequires: python-rpm-macros
3942
Python wrapper for hiredis C connector.
4043

4144
%prep
42-
%setup -q -n hiredis-%{version}
43-
%autopatch -p1
45+
%autosetup -p1 -n hiredis-%{version}
4446

4547
%build
46-
%python_build
48+
%pyproject_wheel
4749

4850
%install
49-
%python_install
51+
%pyproject_install
5052
%python_expand %fdupes %{buildroot}%{$python_sitearch}
5153

52-
%check
53-
%python_exec setup.py build_ext --inplace
54-
export PYTHONPATH=%{buildroot}%{$python_sitearch}
55-
%python_exec test.py
54+
# %%check
55+
# export PYTHONPATH=%%{buildroot}%%{$python_sitearch}
56+
# %%python_exec test.py
5657

5758
%files %{python_files}
58-
%license COPYING
59-
%{python_sitearch}/*
59+
%license LICENSE
60+
%doc README.md
61+
%{python_sitearch}/hiredis
62+
%{python_sitearch}/hiredis-%{version}*-info
6063

6164
%changelog

0 commit comments

Comments
 (0)