Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package lal for openSUSE:Factory checked in 
at 2023-02-04 14:15:56
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/lal (Old)
 and      /work/SRC/openSUSE:Factory/.lal.new.4462 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "lal"

Sat Feb  4 14:15:56 2023 rev:10 rq:1063156 version:7.2.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/lal/lal.changes  2022-11-26 18:45:47.727334529 
+0100
+++ /work/SRC/openSUSE:Factory/.lal.new.4462/lal.changes        2023-02-04 
14:20:13.235143727 +0100
@@ -1,0 +2,11 @@
+Sat Jan 28 06:06:33 UTC 2023 - Stefan Brüns <stefan.bru...@rwth-aachen.de>
+
+- Fix build after numpy 1.24 API changes, add
+  replace_numpy_object.patch
+- Explicitly add python3-py dependency, no longer pulled in by
+  pytest
+- Replace broken python_compileall macro by correct compileall
+  invocation (>= 3.9 only, skip with 3.8), make reproducible
+- Disable build on all architecture where char is unsigned
+
+-------------------------------------------------------------------

New:
----
  replace_numpy_object.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ lal.spec ++++++
--- /var/tmp/diff_new_pack.vaFXrK/_old  2023-02-04 14:20:13.607145843 +0100
+++ /var/tmp/diff_new_pack.vaFXrK/_new  2023-02-04 14:20:13.615145888 +0100
@@ -1,7 +1,7 @@
 #
-# spec file
+# spec file for package lal
 #
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -45,6 +45,8 @@
 Source:         
https://software.igwn.org/sources/source/lalsuite/lal-%{version}.tar.xz
 # PATCH-FIX-UPSTREAM -- See 
https://git.ligo.org/lscsoft/lalsuite/-/commit/847f9f1bf9c8e029db6426de098a963d542ab08b.patch
 Patch0:         swig_4_1_compat.patch
+# PATCH-FIX-UPSTREAM -- 
https://git.ligo.org/lscsoft/lalsuite/-/commit/e4269307540b.patch
+Patch1:         replace_numpy_object.patch
 BuildRequires:  %{python_module devel}
 BuildRequires:  %{python_module numpy-devel}
 BuildRequires:  %{python_module numpy}
@@ -65,7 +67,10 @@
 Requires:       python-six
 Recommends:     python-ligo-lw
 Recommends:     python-ligo-segments
-ExcludeArch:    %{ix86}
+# Broken on all archs where 'char' is unsigned
+# https://git.ligo.org/lscsoft/lalsuite/-/issues/581
+# Also broken on x86
+ExcludeArch:    %{ix86} %{arm} %{ppc} aarch64 ppc64 ppc64le riscv64
 %if %{with octave}
 BuildRequires:  octave-devel
 BuildRequires:  swig >= 4.0
@@ -77,6 +82,8 @@
 BuildRequires:  python3-freezegun
 BuildRequires:  python3-ligo-lw
 BuildRequires:  python3-ligo-segments
+# python3-py - remove with next update -- 
https://git.ligo.org/lscsoft/lalsuite/-/merge_requests/2033
+BuildRequires:  python3-py
 BuildRequires:  python3-pytest
 BuildRequires:  python3-python-dateutil
 BuildRequires:  python3-scipy
@@ -171,11 +178,27 @@
 find %{buildroot}%{_libdir} -name "*.a" -delete -print
 
 %{python_expand # FIX env HASHBANGS
-sed -Ei "1{/^#!\/usr\/bin\/env python/d}" 
%{buildroot}%{$python_sitearch}/lal/gpstime.py
-sed -Ei "1{/^#!\/usr\/bin\/env python/d}" 
%{buildroot}%{$python_sitearch}/lal/series.py
-sed -Ei "1{/^#!\/usr\/bin\/env python/d}" 
%{buildroot}%{$python_sitearch}/lal/antenna.py
+sed -Ei "1{/^#!\/usr\/bin\/env python/d}" \
+    %{buildroot}%{$python_sitearch}/lal/{gpstime,series,antenna}.py
+rm 
%{buildroot}%{$python_sitearch}/lal/__pycache__/{gpstime,series,antenna}*.pyc
+
+# Only compileall >= 3.9 has '-s strip_prefix' option
+if [ %{$python_version_nodots} -ge 39 ]; then \
+  for d in %{buildroot}%{$python_sitelib} %{buildroot}%{$python_sitearch}; do \
+    if [ -d $d ]; then \
+      $python -m compileall -s %{buildroot} $d; \
+      $python -O -m compileall -s %{buildroot} $d; \
+    fi; \
+  done \
+fi;
+}
+# python_compileall is broken, see 
https://github.com/openSUSE/python-rpm-macros/issues/150
+#%%{?python_compileall}
+
+%{python_expand # Verify we don't have broken cache files
+# "-exec false {} +" makes the return code nonzero on match
+find %{buildroot}%{$python_sitearch} -iname \*pyc -type f \( -exec grep 
'home/abuild' '{}' \; -and -exec false '{}' \+ \)
 }
-%{?python_compileall}
 
 %python_expand %fdupes %{buildroot}%{$python_sitearch}/
 %endif

++++++ replace_numpy_object.patch ++++++
>From e4269307540b77ffc015c7be54191cf3350c798b Mon Sep 17 00:00:00 2001
From: "duncan.macleod" <duncan.macl...@ligo.org>
Date: Tue, 10 Jan 2023 16:30:46 +0000
Subject: [PATCH] lal: replace numpy.object with builtin object

numpy.object was a deprecated alias to object, see
https://numpy.org/devdocs/release/1.20.0-notes.html#using-the-aliases-of-builtin-types-like-np-int-is-deprecated
---
 lal/swig/SWIGTestLALPython.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lal/swig/SWIGTestLALPython.py b/lal/swig/SWIGTestLALPython.py
index b634b2c3d7..661c6fecab 100644
--- a/swig/SWIGTestLALPython.py
+++ b/swig/SWIGTestLALPython.py
@@ -135,7 +135,7 @@ def test_string_conversions():
 strs = ["a", "bc", "def"]
 sv = lal.CreateStringVector(*strs)
 assert sv.length == 3
-assert (sv.data.astype(numpy.object) == strs).all()
+assert (sv.data.astype(object) == strs).all()
 strs[0] = "ghijk"
 sv.data[0] = strs[0]
 strs.append("lmnopq")
-- 
GitLab

Reply via email to