Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-ligo-segments for
openSUSE:Factory checked in at 2024-12-02 16:59:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-ligo-segments (Old)
and /work/SRC/openSUSE:Factory/.python-ligo-segments.new.28523 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-ligo-segments"
Mon Dec 2 16:59:47 2024 rev:6 rq:1227765 version:1.4.0
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-ligo-segments/python-ligo-segments.changes
2024-10-18 15:58:28.110338757 +0200
+++
/work/SRC/openSUSE:Factory/.python-ligo-segments.new.28523/python-ligo-segments.changes
2024-12-02 17:00:17.496122033 +0100
@@ -1,0 +2,9 @@
+Mon Dec 2 06:30:32 UTC 2024 - Atri Bhattacharya <[email protected]>
+
+- Add python-3.13-compat.patch -- Compatibility for python 3.13,
+ patch taken from upstream merge request
+- Use %pyproject_* macros to build.
+- Disable testing for now as test suite is broken
+ (https://git.ligo.org/lscsoft/ligo-segments/-/issues/22).
+
+-------------------------------------------------------------------
New:
----
python-3.13-compat.patch
BETA DEBUG BEGIN:
New:
- Add python-3.13-compat.patch -- Compatibility for python 3.13,
patch taken from upstream merge request
BETA DEBUG END:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-ligo-segments.spec ++++++
--- /var/tmp/diff_new_pack.lwjWFa/_old 2024-12-02 17:00:17.984142680 +0100
+++ /var/tmp/diff_new_pack.lwjWFa/_new 2024-12-02 17:00:17.984142680 +0100
@@ -20,7 +20,9 @@
%ifarch %ix86
%bcond_with tests
%else
-%bcond_without tests
+# Disable tests for all other archs since they are broken for Python 3.13
anyway
+# https://git.ligo.org/lscsoft/ligo-segments/-/issues/22
+%bcond_with tests
%endif
%define skip_python2 1
@@ -34,8 +36,12 @@
Source:
https://files.pythonhosted.org/packages/source/l/ligo-segments/ligo-segments-%{version}.tar.gz
# PATCH-FIX-UPSTREAM ligo-segments-python312-compat.patch [email protected]
-- Initialize PyTypeObjects with PyVarObject_HEAD_INIT for python 3.12
compatibility; upstream commit
Patch0: ligo-segments-python312-compat.patch
+# PATCH-FIX-UPSTREAM python-3.13-compat.patch [email protected] --
Compatibility for python 3.13
+Patch1: python-3.13-compat.patch
BuildRequires: %{python_module devel}
+BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
+BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
# SECTION For tests
@@ -58,10 +64,10 @@
%build
export CFLAGS="%{optflags}"
-%python_build
+%pyproject_wheel
%install
-%python_install
+%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitearch}
%if %{with tests}
@@ -80,7 +86,7 @@
%doc README.rst
%license LICENSE
%{python_sitearch}/ligo/
-%{python_sitearch}/ligo_segments-%{version}-py%{python_version}.egg-info
+%{python_sitearch}/ligo_segments-%{version}*.*-info
%if 0%{?suse_version} >= 1550
%{python_sitearch}/ligo_segments-%{version}-py%{python_version}-nspkg.pth
%endif
++++++ python-3.13-compat.patch ++++++
>From b58680a5b2fa444ade61928bde1db7d261a05b32 Mon Sep 17 00:00:00 2001
From: Leo Singer <[email protected]>
Date: Mon, 7 Oct 2024 07:53:58 -0400
Subject: [PATCH] Fix build for Python 3.13
Use PyList_Extend for Python >= 3.13, and provide replacement
using _PyList_Extend for Python < 3.13. In Python 3.13, the
function _PyList_Extend was removed and the public API method
PyList_Extend was added in its place.
Fixes #21.
---
src/segmentlist.c | 22 ++++++++++++----------
1 file changed, 12 insertions(+), 10 deletions(-)
Index: ligo-segments-1.4.0/src/segmentlist.c
===================================================================
--- ligo-segments-1.4.0.orig/src/segmentlist.c
+++ ligo-segments-1.4.0/src/segmentlist.c
@@ -240,34 +240,36 @@ static PyObject *make_segment(PyObject *
}
-static int pylist_extend(PyListObject *l, PyObject *v)
+#if PY_VERSION_HEX < 0x030D0000
+static int PyList_Extend(PyObject *l, PyObject *v)
{
if(!PyList_Check(l)) {
- PyErr_SetObject(PyExc_TypeError, (PyObject *) l);
+ PyErr_SetObject(PyExc_TypeError, l);
return -1;
}
- PyObject *result = _PyList_Extend(l, v);
+ PyObject *result = _PyList_Extend((PyListObject *) l, v);
if(!result)
return -1;
Py_DECREF(result);
return 0;
}
+#endif
static PyListObject *segments_SegmentList_New(PyTypeObject *type, PyObject
*sequence)
{
- PyListObject *new;
+ PyObject *new;
if(!type->tp_alloc) {
PyErr_SetObject(PyExc_TypeError, (PyObject *) type);
return NULL;
}
- new = (PyListObject *) type->tp_alloc(type, 0);
+ new = (PyObject *) type->tp_alloc(type, 0);
if(new && sequence)
- if(pylist_extend(new, sequence)) {
+ if(PyList_Extend(new, sequence) >= 0) {
Py_DECREF(new);
new = NULL;
}
- return new;
+ return (PyListObject *) new;
}
@@ -817,7 +819,7 @@ static PyObject *__ior__(PyObject *self,
/* Faster algorithm when the two lists have very different sizes.
* OK to not test size functions for error return values */
if(PySequence_Size(other) > PyList_GET_SIZE(self) / 2) {
- if(pylist_extend((PyListObject *) self, other))
+ if(PyList_Extend(self, other) >= 0)
return NULL;
return PyObject_CallMethod(self, "coalesce", NULL);
}
@@ -988,14 +990,14 @@ static PyObject *__xor__(PyObject *self,
Py_XDECREF(other);
return NULL;
}
- if(pylist_extend((PyListObject *) new, other)) {
+ if(PyList_Extend(new, other) >= 0) {
Py_DECREF(new);
Py_DECREF(other);
return NULL;
}
Py_DECREF(other);
- if(PyList_Sort(new) < 0) {
+ if(PyList_Sort(new) >= 0) {
Py_DECREF(new);
return NULL;
}