Accepting request 904174 from home:alarrosa:branches:openSUSE:Factory:Rings:1-MinimalX

- 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

OBS-URL: https://build.opensuse.org/request/show/904174
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-numpy?expand=0&rev=90
This commit is contained in:
Dirk Mueller 2021-07-05 17:14:03 +00:00 committed by Git OBS Bridge
parent 16887d977a
commit 6b0fd26340
3 changed files with 46 additions and 0 deletions

34
fix-asarray.patch Normal file
View File

@ -0,0 +1,34 @@
From: Antonio Larrosa <alarrosa@suse.com>
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(

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Mon Jul 5 12:22:33 UTC 2021 - Antonio Larrosa <alarrosa@suse.com>
- 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 <dmueller@suse.com>

View File

@ -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