diff --git a/fix-asarray.patch b/fix-asarray.patch new file mode 100644 index 0000000..a7aa6ba --- /dev/null +++ b/fix-asarray.patch @@ -0,0 +1,34 @@ +From: Antonio Larrosa +Subject: dtype is not a positional argument + +Index: numpy-1.20.3/numpy/core/_asarray.py +=================================================================== +--- numpy-1.20.3.orig/numpy/core/_asarray.py ++++ numpy-1.20.3/numpy/core/_asarray.py +@@ -99,7 +99,7 @@ def asarray(a, dtype=None, order=None, * + if like is not None: + return _asarray_with_like(a, dtype=dtype, order=order, like=like) + +- return array(a, dtype, copy=False, order=order) ++ return array(a, dtype=dtype, copy=False, order=order) + + + _asarray_with_like = array_function_dispatch( +@@ -168,7 +168,7 @@ def asanyarray(a, dtype=None, order=None + if like is not None: + return _asanyarray_with_like(a, dtype=dtype, order=order, like=like) + +- return array(a, dtype, copy=False, order=order, subok=True) ++ return array(a, dtype=dtype, copy=False, order=order, subok=True) + + + _asanyarray_with_like = array_function_dispatch( +@@ -278,7 +278,7 @@ def asfortranarray(a, dtype=None, *, lik + if like is not None: + return _asfortranarray_with_like(a, dtype=dtype, like=like) + +- return array(a, dtype, copy=False, order='F', ndmin=1) ++ return array(a, dtype=dtype, copy=False, order='F', ndmin=1) + + + _asfortranarray_with_like = array_function_dispatch( diff --git a/python-numpy.changes b/python-numpy.changes index 51a96ea..e0ae6bd 100644 --- a/python-numpy.changes +++ b/python-numpy.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Mon Jul 5 12:22:33 UTC 2021 - Antonio Larrosa + +- Add patch to fix an invalid usage of the dtype argument. This + has already been fixed upstream but since Staging:F is so + crowded now with python packages, I think it's better to patch + it and update numpy once Staging:F is cleared: + * fix-asarray.patch + ------------------------------------------------------------------- Wed Jun 2 18:56:39 UTC 2021 - Dirk Müller diff --git a/python-numpy.spec b/python-numpy.spec index 03e2c5c..9f975fe 100644 --- a/python-numpy.spec +++ b/python-numpy.spec @@ -77,6 +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-UPSTREAM fix-asarray.patch alarrosa@suse.com -- fix invalid usage of dtype which is not a positional parameter +Patch2: fix-asarray.patch BuildRequires: %{python_module Cython >= 0.29.21} BuildRequires: %{python_module base >= 3.7} BuildRequires: %{python_module devel} @@ -160,6 +162,7 @@ This package contains files for developing applications using numpy. %setup -q -n numpy-%{version} %patch0 -p1 %patch1 -p1 +%patch2 -p1 # 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