diff --git a/fix-py34-tests.patch b/fix-py34-tests.patch new file mode 100644 index 0000000..4f0fa8e --- /dev/null +++ b/fix-py34-tests.patch @@ -0,0 +1,20 @@ +Index: numpy-1.16.2/numpy/lib/tests/test_mixins.py +=================================================================== +--- numpy-1.16.2.orig/numpy/lib/tests/test_mixins.py ++++ numpy-1.16.2/numpy/lib/tests/test_mixins.py +@@ -7,6 +7,7 @@ import sys + import numpy as np + from numpy.testing import assert_, assert_equal, assert_raises + ++import pytest + + PY2 = sys.version_info.major < 3 + +@@ -199,6 +200,7 @@ class TestNDArrayOperatorsMixin(object): + err_msg = 'failed for operator {}'.format(op) + _assert_equal_type_and_value(expected, actual, err_msg=err_msg) + ++ @pytest.mark.skipif(sys.version_info < (3, 5), reason="requires python >= 3.5") + def test_matmul(self): + array = np.array([1, 2], dtype=np.float64) + array_like = ArrayLike(array) diff --git a/python-numpy.changes b/python-numpy.changes index a16d622..56daac5 100644 --- a/python-numpy.changes +++ b/python-numpy.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Mar 25 10:20:50 UTC 2019 - Thomas Bechtold + +- add fix-py34-tests.patch to fix build with python3.4 from SLE12SP4 + ------------------------------------------------------------------- Tue Mar 12 21:03:43 CET 2019 - Matej Cepl diff --git a/python-numpy.spec b/python-numpy.spec index bc5dfd8..3960868 100644 --- a/python-numpy.spec +++ b/python-numpy.spec @@ -91,6 +91,8 @@ Patch0: numpy-buildfix.patch Patch1: numpy-1.9.0-remove-__declspec.patch # PATCH-FIX-UPSTREAM riscv.patch -- Add support for RISC-V Patch2: riscv.patch +# # PATCH-FIX-SLE fix-py34-tests.patch -- python 3.4 support +Patch3: fix-py34-tests.patch %if 0%{?suse_version} BuildRequires: fdupes %endif @@ -165,6 +167,7 @@ This package contains files for developing applications using numpy. %patch0 -p1 %patch1 -p1 %patch2 -p1 +%patch3 -p1 # Fix non-executable scripts sed -i '1s/^#!.*$//' numpy/{compat/setup,distutils/{conv_template,cpuinfo,exec_command,from_template,setup,system_info},f2py/{__init__,auxfuncs,capi_maps,cb_rules,cfuncs,common_rules,crackfortran,diagnose,f2py2e,f90mod_rules,func2subr,rules,setup,use_rules},ma/{setup,bench},matrixlib/setup,setup,testing/{print_coercion_tables,setup}}.py