···11+From 6df089258c2ef4356427263f652cff0c053c6173 Mon Sep 17 00:00:00 2001
22+From: Sveinung Rundhovde <ssru@equinor.com>
33+Date: Fri, 26 Jul 2024 15:03:33 +0200
44+Subject: [PATCH] Fix attribute error in setup.py
55+66+This line was causing a error due to an update to scikit-build. The
77+issue was that the setuptools.command.test module is not put into the
88+symbol table by the setuptools import, but it was put there during the
99+skbuild import causing it to be available. Due to changes in
1010+scikit-build this is no longer the case and the line gives an
1111+AttributError.
1212+1313+The rationale for this line was that scikit-builds test command implied
1414+develop (this was obnoxious), something that is no longer true. There is
1515+thus no longer any reason to keep this line, so we can fix this issue by
1616+simply removing it.
1717+---
1818+ python/setup.py | 1 -
1919+ 1 file changed, 1 deletion(-)
2020+2121+diff --git a/python/setup.py b/python/setup.py
2222+index 6c6553bc..6bae62f0 100644
2323+--- a/python/setup.py
2424++++ b/python/setup.py
2525+@@ -95,7 +95,6 @@ def src(x):
2626+ # supported OS X release 10.9
2727+ '-DCMAKE_OSX_DEPLOYMENT_TARGET=10.9',
2828+ ],
2929+- cmdclass = { 'test': setuptools.command.test.test },
3030+ classifiers = [
3131+ 'Development Status :: 5 - Production/Stable',
3232+ 'Environment :: Other Environment',
···11+From 75b2156a6414e2464eb15663004b8ab928374135 Mon Sep 17 00:00:00 2001
22+From: Sveinung Rundhovde <ssru@equinor.com>
33+Date: Tue, 30 Jul 2024 08:32:56 +0200
44+Subject: [PATCH] Fix test failing due to Numpy 2.0 promotion rules
55+66+From Numpy 2.0 adding a numpy.float32 and a Python numeric type returns
77+a numy.float32 when it previously returned a numpy.float64. This changes
88+the behavior when using the Python builtin sum function on a
99+numpy.float32 array as the internal computations now will be performed
1010+as numpy.float32 additions when it used to be numpy.float64.
1111+1212+Passing a numpy.double(0) as a start value to the innermost sum forces
1313+the old behavior and provides consistent results for Numpy 1 and 2.
1414+---
1515+ python/test/segyio_c.py | 4 ++--
1616+ 1 file changed, 2 insertions(+), 2 deletions(-)
1717+1818+diff --git a/python/test/segyio_c.py b/python/test/segyio_c.py
1919+index 45fe95d89..b1e144d9d 100644
2020+--- a/python/test/segyio_c.py
2121++++ b/python/test/segyio_c.py
2222+@@ -540,10 +540,10 @@ def read_line(f, metrics, iline_idx, xline_idx):
2323+ buf = numpy.zeros((len(iline_idx), samples), dtype=numpy.single)
2424+2525+ f.getline(xline_trace0, len(iline_idx), xline_stride, offsets, buf)
2626+- assert sum(sum(buf)) == approx(800.061169624, abs=1e-6)
2727++ assert sum(sum(buf), numpy.double(0)) == approx(800.061169624, abs=1e-6)
2828+2929+ f.getline(iline_trace0, len(xline_idx), iline_stride, offsets, buf)
3030+- assert sum(sum(buf)) == approx(305.061146736, abs=1e-6)
3131++ assert sum(sum(buf), numpy.double(0)) == approx(305.061146736, abs=1e-6)
3232+3333+ f.close()
3434+