diff --git a/58.patch b/58.patch new file mode 100644 index 0000000..b6ca91e --- /dev/null +++ b/58.patch @@ -0,0 +1,23 @@ +From ce1da838d74031cfbd3c4dae3a28b9c3c11b5000 Mon Sep 17 00:00:00 2001 +From: Robert Scheck +Date: Sun, 16 Jun 2024 19:03:43 +0200 +Subject: [PATCH] Change incompatible pointer type from RadixNodeObject to + PyObject + +--- + radix/_radix.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/radix/_radix.c b/radix/_radix.c +index 5a1b88f..5dcfc59 100644 +--- a/radix/_radix.c ++++ b/radix/_radix.c +@@ -524,7 +524,7 @@ add_node_to_list(radix_node_t *node, void *arg) + PyObject *ret = arg; + + if (node->data != NULL) +- PyList_Append(ret, ((RadixNodeObject *)node->data)); ++ PyList_Append(ret, ((PyObject *)node->data)); + return (0); + } + diff --git a/python-py-radix.changes b/python-py-radix.changes index 8c527a4..f36573a 100644 --- a/python-py-radix.changes +++ b/python-py-radix.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Tue Jun 18 10:45:53 UTC 2024 - John Paul Adrian Glaubitz + +- Cherry-pick upstream patch to fix build with GCC 14 + * https://github.com/mjschultz/py-radix/pull/58.patch +- Switch package to modern Python Stack on SLE-15 + + Use Python 3.11 on SLE-15 by default + + Drop support for older Python versions + ------------------------------------------------------------------- Thu Jan 25 11:52:58 UTC 2018 - sebix+novell.com@sebix.at diff --git a/python-py-radix.spec b/python-py-radix.spec index b949bbb..3e01a13 100644 --- a/python-py-radix.spec +++ b/python-py-radix.spec @@ -1,7 +1,7 @@ # # spec file for package python-py-radix # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,19 +12,21 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} +%{?sle15_python_module_pythons} Name: python-py-radix Version: 0.10.0 Release: 0 Summary: Radix tree implementation -License: ISC AND BSD-4-Clause +License: BSD-4-Clause AND ISC Group: Development/Languages/Python -Url: https://github.com/mjschultz/py-radix +URL: https://github.com/mjschultz/py-radix Source: https://files.pythonhosted.org/packages/source/p/py-radix/py-radix-%{version}.tar.gz +# PATCH-FIX-UPSTREAM - Change incompatible pointer type from RadixNodeObject to PyObject +Patch: https://github.com/mjschultz/py-radix/pull/58.patch BuildRequires: %{python_module devel} BuildRequires: %{python_module setuptools} BuildRequires: fdupes @@ -43,6 +45,7 @@ This package includes the C-extension. %prep %setup -q -n py-radix-%{version} +%patch -P0 -p1 %build export CFLAGS="%{optflags}"