Merge remote-tracking branch 'up/master' into master-riscv64

Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
This commit is contained in:
David Abdurachmanov 2020-06-06 08:31:14 +03:00
commit daeff83087
Signed by: davidlt
GPG Key ID: 8B7F1DA0E2C9FDBB
4 changed files with 48 additions and 61 deletions

6
.gitignore vendored
View File

@ -70,3 +70,9 @@ numpy-1.4.1.tar.gz
/numpy-1.17.2.tar.gz
/numpy-1.17.3.tar.gz
/numpy-1.17.4.tar.gz
/numpy-1.18.0.tar.gz
/numpy-1.18.1.tar.gz
/numpy-1.18.2.tar.gz
/numpy-1.18.3.tar.gz
/numpy-1.18.4.tar.gz
/numpy-1.19.0rc2.tar.gz

View File

@ -1,51 +0,0 @@
From af36784b2b38577a87208003d6827d02dc0c0fc2 Mon Sep 17 00:00:00 2001
From: Michael Hudson-Doyle <michael.hudson@canonical.com>
Date: Thu, 24 Oct 2019 21:46:00 +1300
Subject: [PATCH] BUG: fix integer size confusion in handling array's ndmin
argument
The ndmin local variable was changed from an "int" to an "npy_intp" but
&ndmin is passed to PyArg_ParseTupleAndKeywords against a "i" argument
spec, but these integers have different sizes (well on an LP64 platform
anyway). This actually works on a little endian system but fails
on a big endian one. Fix this by converting the local back to an int,
and being a little careful before assigning the result of PyLong_AsLong to
it.
Fixes #14767
---
numpy/core/src/multiarray/multiarraymodule.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/numpy/core/src/multiarray/multiarraymodule.c b/numpy/core/src/multiarray/multiarraymodule.c
index 44156704996..9693275e74d 100644
--- a/numpy/core/src/multiarray/multiarraymodule.c
+++ b/numpy/core/src/multiarray/multiarraymodule.c
@@ -1562,8 +1562,7 @@ _array_fromobject(PyObject *NPY_UNUSED(ignored), PyObject *args, PyObject *kws)
PyArrayObject *oparr = NULL, *ret = NULL;
npy_bool subok = NPY_FALSE;
npy_bool copy = NPY_TRUE;
- int nd;
- npy_intp ndmin = 0;
+ int ndmin = 0, nd;
PyArray_Descr *type = NULL;
PyArray_Descr *oldtype = NULL;
NPY_ORDER order = NPY_KEEPORDER;
@@ -1625,13 +1624,14 @@ _array_fromobject(PyObject *NPY_UNUSED(ignored), PyObject *args, PyObject *kws)
ndmin_obj = PyDict_GetItem(kws, npy_ma_str_ndmin);
if (ndmin_obj) {
- ndmin = PyLong_AsLong(ndmin_obj);
- if (error_converting(ndmin)) {
+ long t = PyLong_AsLong(ndmin_obj);
+ if (error_converting(t)) {
goto clean_type;
}
- else if (ndmin > NPY_MAXDIMS) {
+ else if (t > NPY_MAXDIMS) {
goto full_path;
}
+ ndmin = t;
}
/* copy=False with default dtype, order (any is OK) and ndim */

View File

@ -1,24 +1,26 @@
#uncomment next line for a release candidate or a beta
#%%global relc rc1
##%global relc rc1
# Simple way to disable tests
%if 0%{?flatpak}
%bcond_with tests
%else
%bcond_without tests
%endif
%global modname numpy
Name: numpy
Version: 1.17.4
Release: 2.0.riscv64%{?dist}
Version: 1.19.0
Release: 0.rc2.0.riscv64%{?dist}
Epoch: 1
Summary: A fast multidimensional array facility for Python
# Everything is BSD except for class SafeEval in numpy/lib/utils.py which is Python
License: BSD and Python and ASL 2.0
URL: http://www.numpy.org/
Source0: https://github.com/%{name}/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.gz
Source0: https://github.com/%{name}/%{name}/releases/download/v%{version}rc2/%{name}-%{version}rc2.tar.gz
Source1: https://docs.scipy.org/doc/numpy/numpy-html-1.17.0.zip
# https://github.com/numpy/numpy/issues/14767
Patch0001: https://github.com/numpy/numpy/pull/14769.patch
%description
@ -47,8 +49,10 @@ BuildRequires: python3-setuptools
BuildRequires: python3-Cython
BuildRequires: gcc-gfortran gcc
BuildRequires: lapack-devel
BuildRequires: python3-hypothesis
%if %{with tests}
BuildRequires: python3-pytest
BuildRequires: python3-test
%endif
%ifarch %{openblas_arches}
BuildRequires: openblas-devel
@ -89,7 +93,7 @@ This package provides the complete documentation for NumPy.
%prep
%autosetup -n %{name}-%{version}%{?relc} -p1
%autosetup -n %{name}-%{version}rc2 -p1
# Force re-cythonization (ifed for PKG-INFO presence in setup.py)
rm PKG-INFO
@ -169,7 +173,7 @@ python3 runtests.py
%files -n python3-numpy
%license LICENSE.txt
%doc THANKS.txt site.cfg.example
%{python3_sitearch}/%{name}/__pycache__/*
%{python3_sitearch}/%{name}/__pycache__
%dir %{python3_sitearch}/%{name}
%{python3_sitearch}/%{name}/*.py*
%{python3_sitearch}/%{name}/core
@ -188,6 +192,7 @@ python3 runtests.py
%{python3_sitearch}/%{name}-*.egg-info
%exclude %{python3_sitearch}/%{name}/LICENSE.txt
%{_includedir}/numpy
%{python3_sitearch}/%{name}/__init__.pxd
%files -n python3-numpy-f2py
%{_bindir}/f2py
@ -201,9 +206,36 @@ python3 runtests.py
%changelog
* Mon Dec 23 2019 David Abdurachmanov <david.abdurachmanov@sifive.com> - 1:1.17.4-2.0.riscv64
* Sat Jun 06 2020 David Abdurachmanov <david.abdurachmanov@sifive.com> - 1:1.19.0-0.rc2.0.riscv64
- Disable test_float test on riscv64
* Mon Jun 01 2020 Gwyn Ciesla <gwync@protonmail.com> - 1:1.19.0-0.rc2
- 1.9.0 rc2
* Fri May 22 2020 Miro Hrončok <mhroncok@redhat.com> - 1:1.18.4-3
- Rebuilt for Python 3.9
* Fri May 08 2020 Gwyn Ciesla <gwync@protonmail.com> - 1:1.18.4-2
- Own __pycache__ dir, 1833392
* Sun May 03 2020 Gwyn Ciesla <gwync@protonmail.com> - 1:1.18.4-1
- 1.18.4
* Mon Apr 20 2020 Gwyn Ciesla <gwync@protonmail.com> - 1:1.18.3-1
- 1.18.3
* Wed Mar 18 2020 Gwyn Ciesla <gwync@protonmail.com> - 1:1.18.2-1
- 1.18.2
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.18.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Mon Jan 06 2020 Gwyn Ciesla <gwync@protonmail.com> - 1:1.18.1-1
- 1.18.1
* Mon Dec 30 2019 Gwyn Ciesla <gwync@protonmail.com> - 1:1.18.0-1
- 1.18.0
* Mon Nov 11 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1:1.17.4-2
- Backport patch for s390x failures
- Enable non-broken tests on ppc64le

View File

@ -1,2 +1,2 @@
SHA512 (numpy-1.17.4.tar.gz) = ba1ff6a8884ab1b674f3acd9a349abfa96dd4275949511359c5923afaf5e38d00c36e56ae05e42a17cc1ef88cb66692e0788fe30ddd786a448e498723de0254a
SHA512 (numpy-1.19.0rc2.tar.gz) = a4870e90efa49ceab95adde1536f81f427107b87f8f3a2a4ba8d75d2a68d6482a3bd9b4b734e4ac7b9aba3cb79ea6e6a4a5089ee94fa15dcf200b37667a46ec3
SHA512 (numpy-html-1.17.0.zip) = 83b0a780d87d1dbf2c32a5359a8b2251d4636d35f7398cb5f72159317943906684cfb7fc26f95a26872f0216ee1b66772ce83674f87a7a6faa4d5829c5e5cfe7