Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-hiredis for openSUSE:Factory checked in at 2023-03-19 16:16:53 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-hiredis (Old) and /work/SRC/openSUSE:Factory/.python-hiredis.new.31432 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-hiredis" Sun Mar 19 16:16:53 2023 rev:9 rq:1072918 version:2.2.2 Changes: -------- --- /work/SRC/openSUSE:Factory/python-hiredis/python-hiredis.changes 2023-03-19 00:33:18.864870015 +0100 +++ /work/SRC/openSUSE:Factory/.python-hiredis.new.31432/python-hiredis.changes 2023-03-19 16:17:07.743482736 +0100 @@ -1,0 +2,8 @@ +Sun Mar 19 09:47:32 UTC 2023 - Matej Cepl <mc...@suse.com> + +- Replace 0001-Use-system-libhiredis.patch with + the upstream provided (gh#redis/hiredis-py!161) + 161-use-system-hiredis.patch for proper use of the system + hiredis library. + +------------------------------------------------------------------- Old: ---- 0001-Use-system-libhiredis.patch New: ---- 161-use-system-hiredis.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-hiredis.spec ++++++ --- /var/tmp/diff_new_pack.Nkc9BZ/_old 2023-03-19 16:17:08.239485148 +0100 +++ /var/tmp/diff_new_pack.Nkc9BZ/_new 2023-03-19 16:17:08.247485187 +0100 @@ -23,13 +23,15 @@ License: BSD-3-Clause URL: https://github.com/redis/hiredis-py Source: https://files.pythonhosted.org/packages/source/h/hiredis/hiredis-%{version}.tar.gz -Patch0: 0001-Use-system-libhiredis.patch # PATCH-FIX-UPSTREAM drop-vendor-sources.patch gh#redis/hiredis-py#90 mc...@suse.com # Allow to use platform hiredis libs on build -Patch1: drop-vendor-sources.patch +Patch0: drop-vendor-sources.patch # PATCH-FIX-UPSTREAM 159-sdsalloc-to-alloc.patch gh#redis/hiredis-py#158 mc...@suse.com # Don't use sdsalloc, we actually don't need it -Patch2: 159-sdsalloc-to-alloc.patch +Patch1: 159-sdsalloc-to-alloc.patch +# PATCH-FIX-UPSTREAM 161-use-system-hiredis.patch gh#redis/hiredis-py#158 mc...@suse.com +# use system hiredis instead +Patch2: 161-use-system-hiredis.patch BuildRequires: %{python_module devel} BuildRequires: %{python_module pip} BuildRequires: %{python_module wheel} @@ -44,6 +46,9 @@ %prep %autosetup -p1 -n hiredis-%{version} +# Use system hiredis +rm -r vendor/hiredis + %build %pyproject_wheel ++++++ 161-use-system-hiredis.patch ++++++ >From dacfaf17e3a8383d7a6cc377cf99b44770b04d06 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer <maxim.courno...@gmail.com> Date: Sat, 18 Mar 2023 21:32:21 -0400 Subject: [PATCH] setup.py: Fallback to use the system hiredis library. Fixes #158 fully, including using a system-provided hiredis. When the hiredis git submodule hasn't been initialized, print a message about it, and attempt to link against the a system-provided hiredis library instead. * setup.py (is_hiredis_bundled): New procedure. (get_hiredis_bundled_sources): Likewise. Print a message when bundled_hiredis_sources is empty. (get_sources): Adjust to use the above procedure. (get_linker_args): Add -lhiredis when the bundled hiredis is not used. --- setup.py | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) --- a/setup.py +++ b/setup.py @@ -7,6 +7,7 @@ except ImportError: import importlib import glob import io +import os import sys @@ -17,16 +18,38 @@ def version(): return module.__version__ +def is_hiredis_bundled(): + hiredis_submodule = 'vendor/hiredis' + if (os.path.exists(hiredis_submodule) + and not os.path.isfile(hiredis_submodule)): + return not os.listdir() + return False + + +def get_hiredis_bundled_sources(): + hiredis_sources = ("alloc", "async", "hiredis", "net", "read", + "sds", "sockcompat") + if is_hiredis_bundled(): + return ["vendor/hiredis/%s.c" % src for src in hiredis_sources] + return [] + + +if not is_hiredis_bundled(): + print('the bundled hiredis sources were not found;' + ' system hiredis will be used\n' + 'to use the bundled hiredis sources instead,' + ' run "git submodule update --init"') + def get_sources(): - hiredis_sources = ("alloc", "async", "hiredis", "net", "read", "sds", "sockcompat") - return sorted(glob.glob("src/*.c")) + return sorted(glob.glob("src/*.c") + get_hiredis_bundled_sources()) def get_linker_args(): if 'win32' in sys.platform or 'darwin' in sys.platform: return [] else: - return ["-Wl,-Bsymbolic", ] + return ["-Wl,-Bsymbolic", ] + \ + ['-lhiredis'] if not is_hiredis_bundled() else [] def get_compiler_args():