Accepting request 870996 from devel:languages:python:numeric

OBS-URL: https://build.opensuse.org/request/show/870996
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-numpy?expand=0&rev=98
This commit is contained in:
Dominique Leuenberger 2021-02-16 21:33:50 +00:00 committed by Git OBS Bridge
commit 5027d4ba1c
6 changed files with 64 additions and 59 deletions

View File

@ -1,21 +0,0 @@
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
@@ -4,6 +4,8 @@ import sys
import numpy as np
from numpy.testing import assert_, assert_equal, assert_raises
+import pytest
+import sys
# NOTE: This class should be kept as an exact copy of the example from the
# docstring for NDArrayOperatorsMixin.
@@ -193,6 +195,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)

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a76f502430dd98d7546e1ea2250a7360c065a5fdea52b2dffe8ae7180909b6f4
size 7318340

3
numpy-1.20.1.zip Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3bc63486a870294683980d76ec1e3efc786295ae00128f9ea38e2c6e74d5a60a
size 7750776

View File

@ -1,3 +1,37 @@
-------------------------------------------------------------------
Wed Feb 10 12:19:07 UTC 2021 - Ben Greiner <code@bnavigator.de>
- Update to version 1.20.1
* The distutils bug that caused problems with downstream projects
is fixed.
* The random.shuffle regression is fixed.
- Higlights for 1.20.0:
* Annotations for NumPy functions. This work is ongoing and
improvements can be expected pending feedback from users.
* Wider use of SIMD to increase execution speed of ufuncs. Much
work has been done in introducing universal functions that
will ease use of modern features across different hardware
platforms. This work is ongoing.
* Preliminary work in changing the dtype and casting
implementations in order to provide an easier path to
extending dtypes. This work is ongoing but enough has been
done to allow experimentation and feedback.
* Extensive documentation improvements comprising some 185 PR
merges. This work is ongoing and part of the larger project to
improve NumPys online presence and usefulness to new users.
* Further cleanups related to removing Python 2.7. This improves
code readability and removes technical debt.
* Preliminary support for the upcoming Cython 3.0.
- Full release notes at
https://numpy.org/doc/stable/release/1.20.0-notes.html
- Now requires Python >= 3.7 (NEP 29)
* Drop fix-py34-tests.patch
* Skip python36 build
- Drop s390x.patch -- The patch was applied for all big endian
architectures. Mark those tests appropriately in the check
section instead. gh#numpy/numpy#11831
- Skip two tests on ix86: gh#numpy/numpy#18387 gh#numpy/numpy#18388
-------------------------------------------------------------------
Sat Jan 16 21:39:13 UTC 2021 - Benjamin Greiner <code@bnavigator.de>

View File

@ -17,8 +17,8 @@
%global flavor @BUILD_FLAVOR@%{nil}
%define ver 1.19.5
%define _ver 1_19_5
%define ver 1.20.1
%define _ver 1_20_1
%define pname python-numpy
%define hpc_upcase_trans_hyph() %(echo %{**} | tr [a-z] [A-Z] | tr '-' '_')
%if "%{flavor}" == ""
@ -43,6 +43,7 @@
%endif
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
%define skip_python36 1
%{?with_hpc:%{hpc_requires}}
%bcond_with ringdisabled
%if %{without hpc}
@ -76,10 +77,8 @@ Source99: python-numpy-rpmlintrc
Patch0: numpy-buildfix.patch
# PATCH-FIX-OPENSUSE numpy-1.9.0-remove-__declspec.patch -- fix for spurious compiler warnings that cause build failure
Patch1: numpy-1.9.0-remove-__declspec.patch
# # PATCH-FIX-SLE fix-py34-tests.patch -- python 3.4 support
Patch3: fix-py34-tests.patch
Patch4: s390x.patch
BuildRequires: %{python_module Cython >= 0.29.21}
BuildRequires: %{python_module base >= 3.7}
BuildRequires: %{python_module devel}
BuildRequires: %{python_module hypothesis >= 5.12.0}
BuildRequires: %{python_module pytest >= 5.4.2}
@ -161,11 +160,6 @@ This package contains files for developing applications using numpy.
%setup -q -n numpy-%{version}
%patch0 -p1
%patch1 -p1
%patch3 -p1
%ifarch s390x ppc ppc64
# TestF{77,90}ReturnCharacter are broken on all big-endian architectures (#11831)
%patch4 -p1
%endif
# Fix non-executable scripts
sed -i '1s/^#!.*$//' numpy/{compat/setup,random/_examples/cython/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
sed -i '1s/^#!.*$//' numpy/random/_examples/cython/*.pyx
@ -253,6 +247,7 @@ EOF
%if %{without hpc}
export PATH="%{buildroot}%{_bindir}:$PATH"
mkdir testing
cp numpy/conftest.py testing/
pushd testing
# flaky tests
test_failok+=" or test_structured_object_indexing"
@ -261,10 +256,23 @@ test_failok+=" or test_structured_object_item_setting"
%ifarch ppc64 ppc64le
test_failok+=" or test_generalized_sq"
%endif
# these tests fail on big endian gh#numpy/numpy#11831
%ifarch s390x ppc ppc64
test_failok+=" or TestF77ReturnCharacter"
test_failok+=" or TestF90ReturnCharacter"
%endif
%ifarch %ix86
# (arm 32-bit seems okay here)
# gh#numpy/numpy#18387
test_failok+=" or test_pareto"
# gh#numpy/numpy#18388
test_failok+=" or test_float_remainder_overflow"
%endif
%{python_expand # for all python3 flavors
export PYTHONPATH=%{buildroot}%{$python_sitearch}
export PYTHONDONTWRITEBYTECODE=1
testcall="pytest-%{$python_bin_suffix} -n auto %{buildroot}%{$python_sitearch}/numpy"
$python -c 'from numpy import _pytesttester as ptt; ptt._show_numpy_info()'
testcall="pytest-%{$python_bin_suffix} -n auto -c ../pytest.ini %{buildroot}%{$python_sitearch}/numpy"
[ -n "$test_failok" ] && ${testcall} -k "${test_failok:4}" || true
${testcall} ${test_failok:+-k "not (${test_failok:4})"}
rm -Rf %{buildroot}%{$python_sitearch}/numpy/.pytest_cache
@ -292,7 +300,8 @@ popd
%{python_sitearch}/numpy-%{version}-py*.egg-info
%license %{python_sitearch}/numpy/LICENSE.txt
%exclude %{python_sitearch}/numpy/core/include/
%exclude %{python_sitearch}/numpy/distutils/mingw/gfortran_vs2003_hack.c
%exclude %{python_sitearch}/numpy/distutils/mingw/*.c
%exclude %{python_sitearch}/numpy/distutils/checks/*.c
%exclude %{python_sitearch}/numpy/f2py/src/
%exclude %{python_sitearch}/numpy/core/lib/libnpymath.a
%exclude %{python_sitearch}/numpy/random/lib/libnpyrandom.a
@ -308,7 +317,8 @@ popd
%exclude %{p_python_sitearch}/numpy/core/include/
%exclude %{p_python_sitearch}/numpy/core/lib/libnpymath.a
%exclude %{p_python_sitearch}/numpy/random/lib/libnpyrandom.a
%exclude %{p_python_sitearch}/numpy/distutils/mingw/gfortran_vs2003_hack.c
%exclude %{p_python_sitearch}/numpy/distutils/mingw/*.c
%exclude %{p_python_sitearch}/numpy/distutils/checks/*.c
%exclude %{p_python_sitearch}/numpy/f2py/src/
%endif
@ -325,7 +335,8 @@ popd
%license LICENSE.txt
%if %{without hpc}
%{python_sitearch}/numpy/core/include/
%{python_sitearch}/numpy/distutils/mingw/gfortran_vs2003_hack.c
%{python_sitearch}/numpy/distutils/mingw/*.c
%{python_sitearch}/numpy/distutils/checks/*.c
%{python_sitearch}/numpy/f2py/src/
%{python_sitearch}/numpy/core/lib/libnpymath.a
%{python_sitearch}/numpy/random/lib/libnpyrandom.a
@ -333,7 +344,8 @@ popd
%{p_python_sitearch}/numpy/core/include/
%{p_python_sitearch}/numpy/core/lib/libnpymath.a
%{p_python_sitearch}/numpy/random/lib/libnpyrandom.a
%{p_python_sitearch}/numpy/distutils/mingw/gfortran_vs2003_hack.c
%{p_python_sitearch}/numpy/distutils/mingw/*.c
%{p_python_sitearch}/numpy/distutils/checks/*.c
%{p_python_sitearch}/numpy/f2py/src/
%endif

View File

@ -1,20 +0,0 @@
Index: numpy-1.16.4/numpy/f2py/tests/test_return_character.py
===================================================================
--- numpy-1.16.4.orig/numpy/f2py/tests/test_return_character.py
+++ numpy-1.16.4/numpy/f2py/tests/test_return_character.py
@@ -32,6 +32,7 @@ class TestReturnCharacter(util.F2PyTest)
raise NotImplementedError
+@pytest.mark.skip(reason="Test broken on s390x")
class TestF77ReturnCharacter(TestReturnCharacter):
code = """
function t0(value)
@@ -87,6 +88,7 @@ cf2py intent(out) ts
self.check_function(getattr(self.module, name), name)
+@pytest.mark.skip(reason="Test broken on s390x")
class TestF90ReturnCharacter(TestReturnCharacter):
suffix = ".f90"
code = """