Accepting request 1046565 from home:bnavigator:branches:devel:languages:python:numeric
- Split out python flavors into testing multibuilds. Depending on the obs worker, the test suite can take almost an hour per flavor. - Replace allow-numpy-1.24.patch with an updated numba-pr8620-np1.24.patch to also work with still present numpy 1.23 in Factory (discussed upstream in gh#numba/numba#8620) - Merge fix-cli-test.patch into skip-failing-tests.patch OBS-URL: https://build.opensuse.org/request/show/1046565 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-numba?expand=0&rev=62
This commit is contained in:
parent
1f5d040253
commit
e18eb501ab
@ -1,3 +1,5 @@
|
|||||||
<multibuild>
|
<multibuild>
|
||||||
<package>test</package>
|
<package>test-py38</package>
|
||||||
|
<package>test-py39</package>
|
||||||
|
<package>test-py310</package>
|
||||||
</multibuild>
|
</multibuild>
|
||||||
|
@ -1,12 +0,0 @@
|
|||||||
Index: numba-0.56.2/numba/tests/test_cli.py
|
|
||||||
===================================================================
|
|
||||||
--- numba-0.56.2.orig/numba/tests/test_cli.py
|
|
||||||
+++ numba-0.56.2/numba/tests/test_cli.py
|
|
||||||
@@ -264,6 +264,7 @@ class TestGDBCLIInfoBrokenGdbs(TestCase)
|
|
||||||
self.assertIn("No such file or directory", stdout)
|
|
||||||
self.assertIn(path, stdout)
|
|
||||||
|
|
||||||
+ @unittest.skip("Fails on type check in OBS")
|
|
||||||
def test_nonsense_gdb_binary(self):
|
|
||||||
# Tests that a nonsense binary specified as gdb it picked up ok
|
|
||||||
env = os.environ.copy()
|
|
@ -1,32 +1,7 @@
|
|||||||
---
|
Index: numba-0.56.4/numba/cuda/tests/cudapy/test_intrinsics.py
|
||||||
numba/__init__.py | 4 -
|
===================================================================
|
||||||
numba/cuda/tests/cudapy/test_intrinsics.py | 4 -
|
--- numba-0.56.4.orig/numba/cuda/tests/cudapy/test_intrinsics.py
|
||||||
numba/np/arraymath.py | 6 ++
|
+++ numba-0.56.4/numba/cuda/tests/cudapy/test_intrinsics.py
|
||||||
numba/np/ufunc/_internal.c | 25 +++++------
|
|
||||||
numba/stencils/stencilparfor.py | 7 ++-
|
|
||||||
numba/tests/test_array_methods.py | 15 ++-----
|
|
||||||
numba/tests/test_comprehension.py | 2
|
|
||||||
numba/tests/test_linalg.py | 61 +++++++++++++++--------------
|
|
||||||
numba/tests/test_mathlib.py | 2
|
|
||||||
numba/tests/test_np_functions.py | 12 +++--
|
|
||||||
setup.py | 2
|
|
||||||
11 files changed, 75 insertions(+), 65 deletions(-)
|
|
||||||
|
|
||||||
--- a/numba/__init__.py
|
|
||||||
+++ b/numba/__init__.py
|
|
||||||
@@ -142,8 +142,8 @@ def _ensure_critical_deps():
|
|
||||||
|
|
||||||
if numpy_version < (1, 18):
|
|
||||||
raise ImportError("Numba needs NumPy 1.18 or greater")
|
|
||||||
- elif numpy_version > (1, 23):
|
|
||||||
- raise ImportError("Numba needs NumPy 1.23 or less")
|
|
||||||
+ elif numpy_version > (1, 24):
|
|
||||||
+ raise ImportError("Numba needs NumPy 1.24 or less")
|
|
||||||
|
|
||||||
try:
|
|
||||||
import scipy
|
|
||||||
--- a/numba/cuda/tests/cudapy/test_intrinsics.py
|
|
||||||
+++ b/numba/cuda/tests/cudapy/test_intrinsics.py
|
|
||||||
@@ -619,7 +619,7 @@ class TestCudaIntrinsic(CUDATestCase):
|
@@ -619,7 +619,7 @@ class TestCudaIntrinsic(CUDATestCase):
|
||||||
arg2 = np.float16(4.)
|
arg2 = np.float16(4.)
|
||||||
compiled[1, 1](ary, arg1, arg2)
|
compiled[1, 1](ary, arg1, arg2)
|
||||||
@ -45,8 +20,10 @@
|
|||||||
compiled[1, 1](ary, arg1, arg2)
|
compiled[1, 1](ary, arg1, arg2)
|
||||||
np.testing.assert_allclose(ary[0], arg2)
|
np.testing.assert_allclose(ary[0], arg2)
|
||||||
|
|
||||||
--- a/numba/np/arraymath.py
|
Index: numba-0.56.4/numba/np/arraymath.py
|
||||||
+++ b/numba/np/arraymath.py
|
===================================================================
|
||||||
|
--- numba-0.56.4.orig/numba/np/arraymath.py
|
||||||
|
+++ numba-0.56.4/numba/np/arraymath.py
|
||||||
@@ -4177,6 +4177,10 @@ iinfo = namedtuple('iinfo', _iinfo_suppo
|
@@ -4177,6 +4177,10 @@ iinfo = namedtuple('iinfo', _iinfo_suppo
|
||||||
# This module is imported under the compiler lock which should deal with the
|
# This module is imported under the compiler lock which should deal with the
|
||||||
# lack of thread safety in the warning filter.
|
# lack of thread safety in the warning filter.
|
||||||
@ -58,17 +35,10 @@
|
|||||||
np122plus = numpy_version >= (1, 22)
|
np122plus = numpy_version >= (1, 22)
|
||||||
w = None
|
w = None
|
||||||
with warnings.catch_warnings(record=True) as w:
|
with warnings.catch_warnings(record=True) as w:
|
||||||
@@ -4203,7 +4207,7 @@ def _gen_np_machar():
|
Index: numba-0.56.4/numba/np/ufunc/_internal.c
|
||||||
return impl
|
===================================================================
|
||||||
|
--- numba-0.56.4.orig/numba/np/ufunc/_internal.c
|
||||||
|
+++ numba-0.56.4/numba/np/ufunc/_internal.c
|
||||||
-_gen_np_machar()
|
|
||||||
+# _gen_np_machar()
|
|
||||||
|
|
||||||
|
|
||||||
def generate_xinfo(np_func, container, attr):
|
|
||||||
--- a/numba/np/ufunc/_internal.c
|
|
||||||
+++ b/numba/np/ufunc/_internal.c
|
|
||||||
@@ -285,9 +285,7 @@ static struct _ufunc_dispatch {
|
@@ -285,9 +285,7 @@ static struct _ufunc_dispatch {
|
||||||
PyCFunctionWithKeywords ufunc_accumulate;
|
PyCFunctionWithKeywords ufunc_accumulate;
|
||||||
PyCFunctionWithKeywords ufunc_reduceat;
|
PyCFunctionWithKeywords ufunc_reduceat;
|
||||||
@ -179,8 +149,10 @@
|
|||||||
)
|
)
|
||||||
return MOD_ERROR_VAL;
|
return MOD_ERROR_VAL;
|
||||||
|
|
||||||
--- a/numba/stencils/stencilparfor.py
|
Index: numba-0.56.4/numba/stencils/stencilparfor.py
|
||||||
+++ b/numba/stencils/stencilparfor.py
|
===================================================================
|
||||||
|
--- numba-0.56.4.orig/numba/stencils/stencilparfor.py
|
||||||
|
+++ numba-0.56.4/numba/stencils/stencilparfor.py
|
||||||
@@ -21,6 +21,7 @@ from numba.core.ir_utils import (get_cal
|
@@ -21,6 +21,7 @@ from numba.core.ir_utils import (get_cal
|
||||||
find_callname, require, find_const, GuardException)
|
find_callname, require, find_const, GuardException)
|
||||||
from numba.core.errors import NumbaValueError
|
from numba.core.errors import NumbaValueError
|
||||||
@ -202,8 +174,10 @@
|
|||||||
dtype_attr_var = ir.Var(scope, mk_unique_var("$np_attr_attr"), loc)
|
dtype_attr_var = ir.Var(scope, mk_unique_var("$np_attr_attr"), loc)
|
||||||
self.typemap[dtype_attr_var.name] = types.functions.NumberClass(return_type.dtype)
|
self.typemap[dtype_attr_var.name] = types.functions.NumberClass(return_type.dtype)
|
||||||
dtype_attr_assign = ir.Assign(dtype_np_attr_call, dtype_attr_var, loc)
|
dtype_attr_assign = ir.Assign(dtype_np_attr_call, dtype_attr_var, loc)
|
||||||
--- a/numba/tests/test_array_methods.py
|
Index: numba-0.56.4/numba/tests/test_array_methods.py
|
||||||
+++ b/numba/tests/test_array_methods.py
|
===================================================================
|
||||||
|
--- numba-0.56.4.orig/numba/tests/test_array_methods.py
|
||||||
|
+++ numba-0.56.4/numba/tests/test_array_methods.py
|
||||||
@@ -1193,7 +1193,7 @@ class TestArrayMethods(MemoryLeakMixin,
|
@@ -1193,7 +1193,7 @@ class TestArrayMethods(MemoryLeakMixin,
|
||||||
pyfunc = array_sum_dtype_kws
|
pyfunc = array_sum_dtype_kws
|
||||||
cfunc = jit(nopython=True)(pyfunc)
|
cfunc = jit(nopython=True)(pyfunc)
|
||||||
@ -253,8 +227,10 @@
|
|||||||
|
|
||||||
for arr_list in all_test_arrays:
|
for arr_list in all_test_arrays:
|
||||||
for arr in arr_list:
|
for arr in arr_list:
|
||||||
--- a/numba/tests/test_comprehension.py
|
Index: numba-0.56.4/numba/tests/test_comprehension.py
|
||||||
+++ b/numba/tests/test_comprehension.py
|
===================================================================
|
||||||
|
--- numba-0.56.4.orig/numba/tests/test_comprehension.py
|
||||||
|
+++ numba-0.56.4/numba/tests/test_comprehension.py
|
||||||
@@ -11,6 +11,7 @@ from numba import jit, typed
|
@@ -11,6 +11,7 @@ from numba import jit, typed
|
||||||
from numba.core import types, utils
|
from numba.core import types, utils
|
||||||
from numba.core.errors import TypingError, LoweringError
|
from numba.core.errors import TypingError, LoweringError
|
||||||
@ -271,8 +247,10 @@
|
|||||||
def test_comp_nest_with_dependency(self):
|
def test_comp_nest_with_dependency(self):
|
||||||
def comp_nest_with_dependency(n):
|
def comp_nest_with_dependency(n):
|
||||||
l = np.array([[i * j for j in range(i+1)] for i in range(n)])
|
l = np.array([[i * j for j in range(i+1)] for i in range(n)])
|
||||||
--- a/numba/tests/test_linalg.py
|
Index: numba-0.56.4/numba/tests/test_linalg.py
|
||||||
+++ b/numba/tests/test_linalg.py
|
===================================================================
|
||||||
|
--- numba-0.56.4.orig/numba/tests/test_linalg.py
|
||||||
|
+++ numba-0.56.4/numba/tests/test_linalg.py
|
||||||
@@ -1122,6 +1122,32 @@ class TestLinalgSvd(TestLinalgBase):
|
@@ -1122,6 +1122,32 @@ class TestLinalgSvd(TestLinalgBase):
|
||||||
Tests for np.linalg.svd.
|
Tests for np.linalg.svd.
|
||||||
"""
|
"""
|
||||||
@ -356,8 +334,10 @@
|
|||||||
|
|
||||||
|
|
||||||
class TestLinalgQr(TestLinalgBase):
|
class TestLinalgQr(TestLinalgBase):
|
||||||
--- a/numba/tests/test_mathlib.py
|
Index: numba-0.56.4/numba/tests/test_mathlib.py
|
||||||
+++ b/numba/tests/test_mathlib.py
|
===================================================================
|
||||||
|
--- numba-0.56.4.orig/numba/tests/test_mathlib.py
|
||||||
|
+++ numba-0.56.4/numba/tests/test_mathlib.py
|
||||||
@@ -516,7 +516,7 @@ class TestMathLib(TestCase):
|
@@ -516,7 +516,7 @@ class TestMathLib(TestCase):
|
||||||
with warnings.catch_warnings():
|
with warnings.catch_warnings():
|
||||||
warnings.simplefilter("error", RuntimeWarning)
|
warnings.simplefilter("error", RuntimeWarning)
|
||||||
@ -367,8 +347,10 @@
|
|||||||
naive_hypot, val, val)
|
naive_hypot, val, val)
|
||||||
|
|
||||||
def test_hypot_npm(self):
|
def test_hypot_npm(self):
|
||||||
--- a/numba/tests/test_np_functions.py
|
Index: numba-0.56.4/numba/tests/test_np_functions.py
|
||||||
+++ b/numba/tests/test_np_functions.py
|
===================================================================
|
||||||
|
--- numba-0.56.4.orig/numba/tests/test_np_functions.py
|
||||||
|
+++ numba-0.56.4/numba/tests/test_np_functions.py
|
||||||
@@ -932,11 +932,11 @@ class TestNPFunctions(MemoryLeakMixin, T
|
@@ -932,11 +932,11 @@ class TestNPFunctions(MemoryLeakMixin, T
|
||||||
yield np.inf, None
|
yield np.inf, None
|
||||||
yield np.PINF, None
|
yield np.PINF, None
|
||||||
@ -403,14 +385,31 @@
|
|||||||
@TestCase.run_test_in_subprocess
|
@TestCase.run_test_in_subprocess
|
||||||
def test_np_MachAr_deprecation_np122(self):
|
def test_np_MachAr_deprecation_np122(self):
|
||||||
# Tests that Numba is replaying the NumPy 1.22 deprecation warning
|
# Tests that Numba is replaying the NumPy 1.22 deprecation warning
|
||||||
--- a/setup.py
|
Index: numba-0.56.4/setup.py
|
||||||
+++ b/setup.py
|
===================================================================
|
||||||
|
--- numba-0.56.4.orig/setup.py
|
||||||
|
+++ numba-0.56.4/setup.py
|
||||||
@@ -23,7 +23,7 @@ min_python_version = "3.7"
|
@@ -23,7 +23,7 @@ min_python_version = "3.7"
|
||||||
max_python_version = "3.11" # exclusive
|
max_python_version = "3.11" # exclusive
|
||||||
min_numpy_build_version = "1.11"
|
min_numpy_build_version = "1.11"
|
||||||
min_numpy_run_version = "1.18"
|
min_numpy_run_version = "1.18"
|
||||||
-max_numpy_run_version = "1.24"
|
-max_numpy_run_version = "1.24"
|
||||||
+max_numpy_run_version = "1.25"
|
+max_numpy_run_version = "1.25" # exclusive
|
||||||
min_llvmlite_version = "0.39.0dev0"
|
min_llvmlite_version = "0.39.0dev0"
|
||||||
max_llvmlite_version = "0.40"
|
max_llvmlite_version = "0.40"
|
||||||
|
|
||||||
|
Index: numba-0.56.4/numba/__init__.py
|
||||||
|
===================================================================
|
||||||
|
--- numba-0.56.4.orig/numba/__init__.py
|
||||||
|
+++ numba-0.56.4/numba/__init__.py
|
||||||
|
@@ -142,8 +142,8 @@ def _ensure_critical_deps():
|
||||||
|
|
||||||
|
if numpy_version < (1, 18):
|
||||||
|
raise ImportError("Numba needs NumPy 1.18 or greater")
|
||||||
|
- elif numpy_version > (1, 23):
|
||||||
|
- raise ImportError("Numba needs NumPy 1.23 or less")
|
||||||
|
+ elif numpy_version > (1, 24):
|
||||||
|
+ raise ImportError("Numba needs NumPy 1.24 or less")
|
||||||
|
|
||||||
|
try:
|
||||||
|
import scipy
|
@ -1,3 +1,14 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jan 3 12:13:00 UTC 2023 - Ben Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
- Split out python flavors into testing multibuilds. Depending on
|
||||||
|
the obs worker, the test suite can take almost an hour per
|
||||||
|
flavor.
|
||||||
|
- Replace allow-numpy-1.24.patch with an updated
|
||||||
|
numba-pr8620-np1.24.patch to also work with still present numpy
|
||||||
|
1.23 in Factory (discussed upstream in gh#numba/numba#8620)
|
||||||
|
- Merge fix-cli-test.patch into skip-failing-tests.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Jan 2 21:27:24 UTC 2023 - Ben Greiner <code@bnavigator.de>
|
Mon Jan 2 21:27:24 UTC 2023 - Ben Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
@ -17,20 +17,40 @@
|
|||||||
|
|
||||||
|
|
||||||
%define skip_python2 1
|
%define skip_python2 1
|
||||||
|
# Not compatible with Python 3.11 yet. If this changes, and the python311
|
||||||
|
# flavor is active, make sure to expand the multibuild test flavors
|
||||||
|
# https://github.com/numba/numba/issues/8304
|
||||||
%define skip_python311 1
|
%define skip_python311 1
|
||||||
%define plainpython python
|
%define plainpython python
|
||||||
# upper bound is exclusive: min-numpy_ver <= numpy < max_numpy_ver
|
# upper bound is exclusive: min-numpy_ver <= numpy < max_numpy_ver
|
||||||
%define min_numpy_ver 1.18
|
%define min_numpy_ver 1.18
|
||||||
%define max_numpy_ver 1.25
|
%define max_numpy_ver 1.25
|
||||||
|
|
||||||
%global flavor @BUILD_FLAVOR@%{nil}
|
%global flavor @BUILD_FLAVOR@%{nil}
|
||||||
%if "%{flavor}" == "test"
|
%if "%{flavor}" == ""
|
||||||
%define psuffix -test
|
|
||||||
%bcond_without test
|
|
||||||
%else
|
|
||||||
%define psuffix %{nil}
|
%define psuffix %{nil}
|
||||||
%bcond_with test
|
%bcond_with test
|
||||||
%endif
|
%endif
|
||||||
Name: python-numba%{psuffix}
|
%if "%{flavor}" == "test-py38"
|
||||||
|
%define psuffix -test-py38
|
||||||
|
%define skip_python39 1
|
||||||
|
%define skip_python310 1
|
||||||
|
%bcond_without test
|
||||||
|
%endif
|
||||||
|
%if "%{flavor}" == "test-py39"
|
||||||
|
%define psuffix -test-py39
|
||||||
|
%define skip_python38 1
|
||||||
|
%define skip_python310 1
|
||||||
|
%bcond_without test
|
||||||
|
%endif
|
||||||
|
%if "%{flavor}" == "test-py310"
|
||||||
|
%define psuffix -test-py310
|
||||||
|
%define skip_python38 1
|
||||||
|
%define skip_python39 1
|
||||||
|
%bcond_without test
|
||||||
|
%endif
|
||||||
|
|
||||||
|
Name: python-numba%{?psuffix}
|
||||||
Version: 0.56.4
|
Version: 0.56.4
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: NumPy-aware optimizing compiler for Python using LLVM
|
Summary: NumPy-aware optimizing compiler for Python using LLVM
|
||||||
@ -38,14 +58,12 @@ License: BSD-2-Clause
|
|||||||
URL: https://numba.pydata.org/
|
URL: https://numba.pydata.org/
|
||||||
# SourceRepository: https://github.com/numba/numba
|
# SourceRepository: https://github.com/numba/numba
|
||||||
Source: https://files.pythonhosted.org/packages/source/n/numba/numba-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/n/numba/numba-%{version}.tar.gz
|
||||||
|
# PATCH-FIX-UPSTREAM numba-pr8620-np1.24.patch gh#numba/numba#8620 + raising upper bound in setup.py and numba/__init__.py
|
||||||
|
Patch1: numba-pr8620-np1.24.patch
|
||||||
# PATCH-FIX-OPENSUSE skip tests failing due to OBS specifics
|
# PATCH-FIX-OPENSUSE skip tests failing due to OBS specifics
|
||||||
Patch2: fix-cli-test.patch
|
|
||||||
Patch3: skip-failing-tests.patch
|
Patch3: skip-failing-tests.patch
|
||||||
# PATCH-FIX-OPENSUSE update-tbb-backend-calls-2021.6.patch, based on gh#numba/numba#7608
|
# PATCH-FIX-OPENSUSE update-tbb-backend-calls-2021.6.patch, based on gh#numba/numba#7608
|
||||||
Patch4: update-tbb-backend-calls-2021.6.patch
|
Patch4: update-tbb-backend-calls-2021.6.patch
|
||||||
# PATCH-FIX-UPSTREAM allow-numpy-1.24.patch gh#numba/numba#8620
|
|
||||||
# Allow working with numpy 1.24 and higher
|
|
||||||
Patch5: allow-numpy-1.24.patch
|
|
||||||
BuildRequires: %{python_module devel >= 3.7}
|
BuildRequires: %{python_module devel >= 3.7}
|
||||||
BuildRequires: %{python_module numpy-devel >= %{min_numpy_ver} with %python-numpy-devel < %{max_numpy_ver}}
|
BuildRequires: %{python_module numpy-devel >= %{min_numpy_ver} with %python-numpy-devel < %{max_numpy_ver}}
|
||||||
BuildRequires: %{python_module pip}
|
BuildRequires: %{python_module pip}
|
||||||
|
@ -41,3 +41,15 @@
|
|||||||
def test_init_prange(self):
|
def test_init_prange(self):
|
||||||
def test_impl():
|
def test_impl():
|
||||||
n = 20
|
n = 20
|
||||||
|
Index: numba-0.56.2/numba/tests/test_cli.py
|
||||||
|
===================================================================
|
||||||
|
--- numba-0.56.2.orig/numba/tests/test_cli.py
|
||||||
|
+++ numba-0.56.2/numba/tests/test_cli.py
|
||||||
|
@@ -264,6 +264,7 @@ class TestGDBCLIInfoBrokenGdbs(TestCase)
|
||||||
|
self.assertIn("No such file or directory", stdout)
|
||||||
|
self.assertIn(path, stdout)
|
||||||
|
|
||||||
|
+ @unittest.skip("Fails on type check in OBS")
|
||||||
|
def test_nonsense_gdb_binary(self):
|
||||||
|
# Tests that a nonsense binary specified as gdb it picked up ok
|
||||||
|
env = os.environ.copy()
|
||||||
|
Loading…
Reference in New Issue
Block a user