Compare commits
No commits in common. "c8-stream-2.7" and "stream-python38-3.8-rhel-8.9.0" have entirely different histories.
c8-stream-
...
stream-pyt
4
.gitignore
vendored
4
.gitignore
vendored
@ -1,2 +1,2 @@
|
|||||||
SOURCES/numpy-1.14.2.tar.gz
|
/numpy-1.17.3.tar.gz
|
||||||
SOURCES/numpy-html-1.13.0.zip
|
/numpy-html-1.17.0.zip
|
||||||
|
|||||||
@ -1,2 +0,0 @@
|
|||||||
c00e70468703830a26ee9173ba1cf4aedf08718f SOURCES/numpy-1.14.2.tar.gz
|
|
||||||
b23d66880bba5f56baa81ce02eb5a55de046c0a7 SOURCES/numpy-html-1.13.0.zip
|
|
||||||
47
0001-Remove-failing-test-from-linalg-module.patch
Normal file
47
0001-Remove-failing-test-from-linalg-module.patch
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
From 2f26ca02a4ba91eb583aee50fc59eaf8c5ffa72f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Lumir Balhar <lbalhar@redhat.com>
|
||||||
|
Date: Mon, 25 Nov 2019 16:47:59 +0100
|
||||||
|
Subject: [PATCH] Remove failing test from linalg module
|
||||||
|
|
||||||
|
---
|
||||||
|
numpy/linalg/tests/test_linalg.py | 24 ------------------------
|
||||||
|
1 file changed, 24 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/numpy/linalg/tests/test_linalg.py b/numpy/linalg/tests/test_linalg.py
|
||||||
|
index 831c059..24663b1 100644
|
||||||
|
--- a/numpy/linalg/tests/test_linalg.py
|
||||||
|
+++ b/numpy/linalg/tests/test_linalg.py
|
||||||
|
@@ -1703,30 +1703,6 @@ class TestQR(object):
|
||||||
|
class TestCholesky(object):
|
||||||
|
# TODO: are there no other tests for cholesky?
|
||||||
|
|
||||||
|
- def test_basic_property(self):
|
||||||
|
- # Check A = L L^H
|
||||||
|
- shapes = [(1, 1), (2, 2), (3, 3), (50, 50), (3, 10, 10)]
|
||||||
|
- dtypes = (np.float32, np.float64, np.complex64, np.complex128)
|
||||||
|
-
|
||||||
|
- for shape, dtype in itertools.product(shapes, dtypes):
|
||||||
|
- np.random.seed(1)
|
||||||
|
- a = np.random.randn(*shape)
|
||||||
|
- if np.issubdtype(dtype, np.complexfloating):
|
||||||
|
- a = a + 1j*np.random.randn(*shape)
|
||||||
|
-
|
||||||
|
- t = list(range(len(shape)))
|
||||||
|
- t[-2:] = -1, -2
|
||||||
|
-
|
||||||
|
- a = np.matmul(a.transpose(t).conj(), a)
|
||||||
|
- a = np.asarray(a, dtype=dtype)
|
||||||
|
-
|
||||||
|
- c = np.linalg.cholesky(a)
|
||||||
|
-
|
||||||
|
- b = np.matmul(c, c.transpose(t).conj())
|
||||||
|
- assert_allclose(b, a,
|
||||||
|
- err_msg="{} {}\n{}\n{}".format(shape, dtype, a, c),
|
||||||
|
- atol=500 * a.shape[0] * np.finfo(dtype).eps)
|
||||||
|
-
|
||||||
|
def test_0_size(self):
|
||||||
|
class ArraySubclass(np.ndarray):
|
||||||
|
pass
|
||||||
|
--
|
||||||
|
2.23.0
|
||||||
|
|
||||||
14
0002-xfail-TestCond.test_nan_unonditionally.patch
Normal file
14
0002-xfail-TestCond.test_nan_unonditionally.patch
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
diff --git a/numpy/linalg/tests/test_linalg.py b/numpy/linalg/tests/test_linalg.py
|
||||||
|
index 24663b1..665bf0e 100644
|
||||||
|
--- a/numpy/linalg/tests/test_linalg.py
|
||||||
|
+++ b/numpy/linalg/tests/test_linalg.py
|
||||||
|
@@ -759,6 +759,9 @@ class TestCond(CondCases):
|
||||||
|
for A, p in itertools.product(As, p_neg):
|
||||||
|
linalg.cond(A, p)
|
||||||
|
|
||||||
|
+ @pytest.mark.xfail(True, run=False,
|
||||||
|
+ reason="Platform/LAPACK-dependent failure, "
|
||||||
|
+ "see gh-18914")
|
||||||
|
def test_nan(self):
|
||||||
|
# nans should be passed through, not converted to infs
|
||||||
|
ps = [None, 1, -1, 2, -2, 'fro']
|
||||||
@ -1,166 +0,0 @@
|
|||||||
From 0fcfa065d900040c80628b31b8b6ea606c131086 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Paul Ivanov <pivanov5@bloomberg.net>
|
|
||||||
Date: Wed, 30 Jan 2019 14:22:44 -0800
|
|
||||||
Subject: [PATCH] BUG: load fails when using pickle without allow_pickle=True
|
|
||||||
|
|
||||||
a partial mitigation of #12759.
|
|
||||||
|
|
||||||
see also https://nvd.nist.gov/vuln/detail/CVE-2019-6446
|
|
||||||
---
|
|
||||||
numpy/core/tests/test_regression.py | 2 +-
|
|
||||||
numpy/lib/format.py | 8 ++++++--
|
|
||||||
numpy/lib/npyio.py | 17 ++++++++++++-----
|
|
||||||
numpy/lib/tests/test_format.py | 15 +++++++++------
|
|
||||||
numpy/lib/tests/test_io.py | 2 +-
|
|
||||||
5 files changed, 29 insertions(+), 15 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/numpy/core/tests/test_regression.py b/numpy/core/tests/test_regression.py
|
|
||||||
index a3b0114..2be6bf3 100644
|
|
||||||
--- a/numpy/core/tests/test_regression.py
|
|
||||||
+++ b/numpy/core/tests/test_regression.py
|
|
||||||
@@ -96,7 +96,7 @@ class TestRegression(object):
|
|
||||||
ca = np.char.array(np.arange(1000, 1010), itemsize=4)
|
|
||||||
ca.dump(f)
|
|
||||||
f.seek(0)
|
|
||||||
- ca = np.load(f)
|
|
||||||
+ ca = np.load(f, allow_pickle=True)
|
|
||||||
f.close()
|
|
||||||
|
|
||||||
def test_noncontiguous_fill(self):
|
|
||||||
diff --git a/numpy/lib/format.py b/numpy/lib/format.py
|
|
||||||
index 363bb21..b91142c 100644
|
|
||||||
--- a/numpy/lib/format.py
|
|
||||||
+++ b/numpy/lib/format.py
|
|
||||||
@@ -602,7 +602,7 @@ def write_array(fp, array, version=None, allow_pickle=True, pickle_kwargs=None):
|
|
||||||
fp.write(chunk.tobytes('C'))
|
|
||||||
|
|
||||||
|
|
||||||
-def read_array(fp, allow_pickle=True, pickle_kwargs=None):
|
|
||||||
+def read_array(fp, allow_pickle=False, pickle_kwargs=None):
|
|
||||||
"""
|
|
||||||
Read an array from an NPY file.
|
|
||||||
|
|
||||||
@@ -612,7 +612,11 @@ def read_array(fp, allow_pickle=True, pickle_kwargs=None):
|
|
||||||
If this is not a real file object, then this may take extra memory
|
|
||||||
and time.
|
|
||||||
allow_pickle : bool, optional
|
|
||||||
- Whether to allow reading pickled data. Default: True
|
|
||||||
+ Whether to allow writing pickled data. Default: False
|
|
||||||
+
|
|
||||||
+ .. versionchanged:: 1.14.2
|
|
||||||
+ Made default False in response to CVE-2019-6446.
|
|
||||||
+
|
|
||||||
pickle_kwargs : dict
|
|
||||||
Additional keyword arguments to pass to pickle.load. These are only
|
|
||||||
useful when loading object arrays saved on Python 2 when using
|
|
||||||
diff --git a/numpy/lib/npyio.py b/numpy/lib/npyio.py
|
|
||||||
index 76b135c..c6522f5 100644
|
|
||||||
--- a/numpy/lib/npyio.py
|
|
||||||
+++ b/numpy/lib/npyio.py
|
|
||||||
@@ -130,7 +130,11 @@ class NpzFile(object):
|
|
||||||
An object on which attribute can be performed as an alternative
|
|
||||||
to getitem access on the `NpzFile` instance itself.
|
|
||||||
allow_pickle : bool, optional
|
|
||||||
- Allow loading pickled data. Default: True
|
|
||||||
+ Allow loading pickled data. Default: False
|
|
||||||
+
|
|
||||||
+ .. versionchanged:: 1.14.2
|
|
||||||
+ Made default False in response to CVE-2019-6446.
|
|
||||||
+
|
|
||||||
pickle_kwargs : dict, optional
|
|
||||||
Additional keyword arguments to pass on to pickle.load.
|
|
||||||
These are only useful when loading object arrays saved on
|
|
||||||
@@ -166,7 +170,7 @@ class NpzFile(object):
|
|
||||||
|
|
||||||
"""
|
|
||||||
|
|
||||||
- def __init__(self, fid, own_fid=False, allow_pickle=True,
|
|
||||||
+ def __init__(self, fid, own_fid=False, allow_pickle=False,
|
|
||||||
pickle_kwargs=None):
|
|
||||||
# Import is postponed to here since zipfile depends on gzip, an
|
|
||||||
# optional component of the so-called standard library.
|
|
||||||
@@ -265,7 +269,7 @@ class NpzFile(object):
|
|
||||||
return self.files.__contains__(key)
|
|
||||||
|
|
||||||
|
|
||||||
-def load(file, mmap_mode=None, allow_pickle=True, fix_imports=True,
|
|
||||||
+def load(file, mmap_mode=None, allow_pickle=False, fix_imports=True,
|
|
||||||
encoding='ASCII'):
|
|
||||||
"""
|
|
||||||
Load arrays or pickled objects from ``.npy``, ``.npz`` or pickled files.
|
|
||||||
@@ -287,8 +291,11 @@ def load(file, mmap_mode=None, allow_pickle=True, fix_imports=True,
|
|
||||||
Allow loading pickled object arrays stored in npy files. Reasons for
|
|
||||||
disallowing pickles include security, as loading pickled data can
|
|
||||||
execute arbitrary code. If pickles are disallowed, loading object
|
|
||||||
- arrays will fail.
|
|
||||||
- Default: True
|
|
||||||
+ arrays will fail. Default: False
|
|
||||||
+
|
|
||||||
+ .. versionchanged:: 1.14.2
|
|
||||||
+ Made default False in response to CVE-2019-6446.
|
|
||||||
+
|
|
||||||
fix_imports : bool, optional
|
|
||||||
Only useful when loading Python 2 generated pickled files on Python 3,
|
|
||||||
which includes npy/npz files containing object arrays. If `fix_imports`
|
|
||||||
diff --git a/numpy/lib/tests/test_format.py b/numpy/lib/tests/test_format.py
|
|
||||||
index 2d2b4ce..04e090c 100644
|
|
||||||
--- a/numpy/lib/tests/test_format.py
|
|
||||||
+++ b/numpy/lib/tests/test_format.py
|
|
||||||
@@ -426,7 +426,7 @@ def roundtrip(arr):
|
|
||||||
f = BytesIO()
|
|
||||||
format.write_array(f, arr)
|
|
||||||
f2 = BytesIO(f.getvalue())
|
|
||||||
- arr2 = format.read_array(f2)
|
|
||||||
+ arr2 = format.read_array(f2, allow_pickle=True)
|
|
||||||
return arr2
|
|
||||||
|
|
||||||
|
|
||||||
@@ -553,7 +553,7 @@ def test_pickle_python2_python3():
|
|
||||||
path = os.path.join(data_dir, fname)
|
|
||||||
|
|
||||||
for encoding in ['bytes', 'latin1']:
|
|
||||||
- data_f = np.load(path, encoding=encoding)
|
|
||||||
+ data_f = np.load(path, allow_pickle=True, encoding=encoding)
|
|
||||||
if fname.endswith('.npz'):
|
|
||||||
data = data_f['x']
|
|
||||||
data_f.close()
|
|
||||||
@@ -575,16 +575,19 @@ def test_pickle_python2_python3():
|
|
||||||
if sys.version_info[0] >= 3:
|
|
||||||
if fname.startswith('py2'):
|
|
||||||
if fname.endswith('.npz'):
|
|
||||||
- data = np.load(path)
|
|
||||||
+ data = np.load(path, allow_pickle=True)
|
|
||||||
assert_raises(UnicodeError, data.__getitem__, 'x')
|
|
||||||
data.close()
|
|
||||||
- data = np.load(path, fix_imports=False, encoding='latin1')
|
|
||||||
+ data = np.load(path, allow_pickle=True, fix_imports=False,
|
|
||||||
+ encoding='latin1')
|
|
||||||
assert_raises(ImportError, data.__getitem__, 'x')
|
|
||||||
data.close()
|
|
||||||
else:
|
|
||||||
- assert_raises(UnicodeError, np.load, path)
|
|
||||||
+ assert_raises(UnicodeError, np.load, path,
|
|
||||||
+ allow_pickle=True)
|
|
||||||
assert_raises(ImportError, np.load, path,
|
|
||||||
- encoding='latin1', fix_imports=False)
|
|
||||||
+ allow_pickle=True, fix_imports=False,
|
|
||||||
+ encoding='latin1')
|
|
||||||
|
|
||||||
|
|
||||||
def test_pickle_disallow():
|
|
||||||
diff --git a/numpy/lib/tests/test_io.py b/numpy/lib/tests/test_io.py
|
|
||||||
index 2daa015..bde2567 100644
|
|
||||||
--- a/numpy/lib/tests/test_io.py
|
|
||||||
+++ b/numpy/lib/tests/test_io.py
|
|
||||||
@@ -87,7 +87,7 @@ class RoundtripTest(object):
|
|
||||||
|
|
||||||
"""
|
|
||||||
save_kwds = kwargs.get('save_kwds', {})
|
|
||||||
- load_kwds = kwargs.get('load_kwds', {})
|
|
||||||
+ load_kwds = kwargs.get('load_kwds', {"allow_pickle": True})
|
|
||||||
file_on_disk = kwargs.get('file_on_disk', False)
|
|
||||||
|
|
||||||
if file_on_disk:
|
|
||||||
--
|
|
||||||
2.21.0
|
|
||||||
|
|
||||||
File diff suppressed because it is too large
Load Diff
@ -1,39 +1,30 @@
|
|||||||
%if 0%{?fedora} || 0%{?rhel} > 7
|
|
||||||
%bcond_without python3
|
|
||||||
%else
|
|
||||||
%bcond_with python3
|
|
||||||
%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
|
|
||||||
%endif
|
|
||||||
|
|
||||||
#uncomment next line for a release candidate or a beta
|
#uncomment next line for a release candidate or a beta
|
||||||
#%%global relc rc1
|
#%%global relc rc1
|
||||||
|
|
||||||
|
# Simple way to disable tests
|
||||||
|
%bcond_without tests
|
||||||
|
|
||||||
%global modname numpy
|
%global modname numpy
|
||||||
|
|
||||||
Name: numpy
|
Name: numpy
|
||||||
Version: 1.14.2
|
Version: 1.17.3
|
||||||
Release: 16%{?dist}
|
Release: 7%{?dist}
|
||||||
Epoch: 1
|
|
||||||
Summary: A fast multidimensional array facility for Python
|
Summary: A fast multidimensional array facility for Python
|
||||||
|
|
||||||
Group: Development/Languages
|
|
||||||
# Everything is BSD except for class SafeEval in numpy/lib/utils.py which is Python
|
# Everything is BSD except for class SafeEval in numpy/lib/utils.py which is Python
|
||||||
License: BSD and Python
|
License: BSD and Python and ASL 2.0
|
||||||
URL: http://www.numpy.org/
|
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}/%{name}-%{version}.tar.gz
|
||||||
Source1: https://docs.scipy.org/doc/numpy/numpy-html-1.13.0.zip
|
Source1: https://docs.scipy.org/doc/numpy/numpy-html-1.17.0.zip
|
||||||
Patch0: numpy-1.14.2-float128.patch
|
# Upstream issue: https://github.com/numpy/numpy/issues/13173
|
||||||
Patch1: numpy-1.14.2-CVE-2019-6446.patch
|
Patch0: 0001-Remove-failing-test-from-linalg-module.patch
|
||||||
|
# Upstream PR: https://github.com/numpy/numpy/pull/18943
|
||||||
BuildRequires: python2-devel lapack-devel python2-setuptools gcc-gfortran python2-nose
|
Patch1: 0002-xfail-TestCond.test_nan_unonditionally.patch
|
||||||
BuildRequires: /usr/bin/sed
|
|
||||||
BuildRequires: python2-Cython
|
|
||||||
%ifarch %{openblas_arches}
|
|
||||||
BuildRequires: openblas-devel
|
|
||||||
%else
|
|
||||||
BuildRequires: atlas-devel
|
|
||||||
%endif
|
|
||||||
|
|
||||||
|
# Exclude i686 arch. Due to a modularity issue it's being added to the
|
||||||
|
# x86_64 compose of CRB, but we don't want to ship it at all.
|
||||||
|
# See: https://projects.engineering.redhat.com/browse/RCM-72605
|
||||||
|
ExcludeArch: i686
|
||||||
|
|
||||||
%description
|
%description
|
||||||
NumPy is a general-purpose array-processing package designed to
|
NumPy is a general-purpose array-processing package designed to
|
||||||
@ -48,57 +39,30 @@ basic linear algebra and random number generation. Also included in
|
|||||||
this package is a version of f2py that works properly with NumPy.
|
this package is a version of f2py that works properly with NumPy.
|
||||||
|
|
||||||
|
|
||||||
%package -n python2-numpy
|
%package -n python%{python3_pkgversion}-numpy
|
||||||
Summary: A fast multidimensional array facility for Python
|
|
||||||
Requires: python2-nose
|
|
||||||
%{?python_provide:%python_provide python2-%{modname}}
|
|
||||||
Obsoletes: numpy < 1:1.10.1-3
|
|
||||||
%description -n python2-numpy
|
|
||||||
NumPy is a general-purpose array-processing package designed to
|
|
||||||
efficiently manipulate large multi-dimensional arrays of arbitrary
|
|
||||||
records without sacrificing too much speed for small multi-dimensional
|
|
||||||
arrays. NumPy is built on the Numeric code base and adds features
|
|
||||||
introduced by numarray as well as an extended C-API and the ability to
|
|
||||||
create arrays of arbitrary type.
|
|
||||||
|
|
||||||
There are also basic facilities for discrete fourier transform,
|
|
||||||
basic linear algebra and random number generation. Also included in
|
|
||||||
this package is a version of f2py that works properly with NumPy.
|
|
||||||
|
|
||||||
|
|
||||||
%package -n python2-numpy-f2py
|
|
||||||
Summary: f2py for numpy
|
|
||||||
Group: Development/Libraries
|
|
||||||
Requires: python2-%{name} = %{epoch}:%{version}-%{release}
|
|
||||||
Requires: python2-devel
|
|
||||||
Obsoletes: numpy-f2py < 1:1.10.1-3
|
|
||||||
%{?python_provide:%python_provide python2-numpy-f2py}
|
|
||||||
|
|
||||||
|
|
||||||
%description -n python2-numpy-f2py
|
|
||||||
This package includes a version of f2py that works properly with NumPy.
|
|
||||||
|
|
||||||
|
|
||||||
%package -n python2-numpy-doc
|
|
||||||
Summary: Documentation for numpy
|
|
||||||
Requires: python2-%{name} = %{epoch}:%{version}-%{release}
|
|
||||||
BuildArch: noarch
|
|
||||||
|
|
||||||
%description -n python2-numpy-doc
|
|
||||||
This package provides the complete documentation for NumPy.
|
|
||||||
|
|
||||||
%if %{with python3}
|
|
||||||
%package -n python3-numpy
|
|
||||||
Summary: A fast multidimensional array facility for Python
|
Summary: A fast multidimensional array facility for Python
|
||||||
|
|
||||||
Group: Development/Languages
|
|
||||||
License: BSD
|
License: BSD
|
||||||
%{?python_provide:%python_provide python3-numpy}
|
%{?python_provide:%python_provide python%{python3_pkgversion}-numpy}
|
||||||
BuildRequires: python3-devel
|
|
||||||
BuildRequires: python3-setuptools
|
|
||||||
BuildRequires: python3-nose
|
|
||||||
|
|
||||||
%description -n python3-numpy
|
BuildRequires: python%{python3_pkgversion}-devel
|
||||||
|
BuildRequires: python%{python3_pkgversion}-setuptools
|
||||||
|
BuildRequires: python%{python3_pkgversion}-Cython
|
||||||
|
BuildRequires: python%{python3_pkgversion}-rpm-macros
|
||||||
|
BuildRequires: gcc-gfortran gcc
|
||||||
|
BuildRequires: lapack-devel
|
||||||
|
%if %{with tests}
|
||||||
|
BuildRequires: python%{python3_pkgversion}-pytest
|
||||||
|
%endif
|
||||||
|
%ifarch %{openblas_arches}
|
||||||
|
BuildRequires: openblas-devel
|
||||||
|
%else
|
||||||
|
BuildRequires: atlas-devel
|
||||||
|
%endif
|
||||||
|
|
||||||
|
Requires: python%{python3_pkgversion}-setuptools
|
||||||
|
|
||||||
|
%description -n python%{python3_pkgversion}-numpy
|
||||||
NumPy is a general-purpose array-processing package designed to
|
NumPy is a general-purpose array-processing package designed to
|
||||||
efficiently manipulate large multi-dimensional arrays of arbitrary
|
efficiently manipulate large multi-dimensional arrays of arbitrary
|
||||||
records without sacrificing too much speed for small multi-dimensional
|
records without sacrificing too much speed for small multi-dimensional
|
||||||
@ -110,44 +74,44 @@ There are also basic facilities for discrete fourier transform,
|
|||||||
basic linear algebra and random number generation. Also included in
|
basic linear algebra and random number generation. Also included in
|
||||||
this package is a version of f2py that works properly with NumPy.
|
this package is a version of f2py that works properly with NumPy.
|
||||||
|
|
||||||
%package -n python3-numpy-f2py
|
%package -n python%{python3_pkgversion}-numpy-f2py
|
||||||
Summary: f2py for numpy
|
Summary: f2py for numpy
|
||||||
Group: Development/Libraries
|
Requires: python%{python3_pkgversion}-numpy%{?_isa} = %{version}-%{release}
|
||||||
Requires: python3-numpy = %{epoch}:%{version}-%{release}
|
Requires: python%{python3_pkgversion}-devel
|
||||||
Requires: python3-devel
|
Provides: python%{python3_pkgversion}-f2py = %{version}-%{release}
|
||||||
Provides: python3-f2py = %{version}-%{release}
|
%{?python_provide:%python_provide python%{python3_pkgversion}-numpy-f2py}
|
||||||
Obsoletes: python3-f2py <= 2.45.241_1927
|
|
||||||
%{?python_provide:%python_provide python3-numpy-f2py}
|
|
||||||
|
|
||||||
%description -n python3-numpy-f2py
|
# Require alternatives version that implements the --keep-foreign flag
|
||||||
|
Requires(postun): alternatives >= 1.19.1-1
|
||||||
|
# python38 installs the alternatives master symlink to which we attach a slave
|
||||||
|
Requires: python38
|
||||||
|
Requires(post): python38
|
||||||
|
Requires(postun): python38
|
||||||
|
|
||||||
|
%description -n python%{python3_pkgversion}-numpy-f2py
|
||||||
This package includes a version of f2py that works properly with NumPy.
|
This package includes a version of f2py that works properly with NumPy.
|
||||||
|
|
||||||
%package -n python3-numpy-doc
|
%package -n python%{python3_pkgversion}-numpy-doc
|
||||||
Summary: Documentation for numpy
|
Summary: Documentation for numpy
|
||||||
Requires: python3-numpy = %{epoch}:%{version}-%{release}
|
Requires: python%{python3_pkgversion}-numpy = %{version}-%{release}
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
%description -n python3-numpy-doc
|
%description -n python%{python3_pkgversion}-numpy-doc
|
||||||
This package provides the complete documentation for NumPy.
|
This package provides the complete documentation for NumPy.
|
||||||
|
|
||||||
%endif # with python3
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{name}-%{version}%{?relc}
|
%autosetup -n %{name}-%{version}%{?relc} -p1
|
||||||
#%setup -q -n numpy-cc2b04
|
|
||||||
%patch0 -p1
|
|
||||||
%patch1 -p1
|
|
||||||
|
|
||||||
# workaround for rhbz#849713
|
# Force re-cythonization (ifed for PKG-INFO presence in setup.py)
|
||||||
# http://mail.scipy.org/pipermail/numpy-discussion/2012-July/063530.html
|
rm PKG-INFO
|
||||||
rm numpy/distutils/command/__init__.py && touch numpy/distutils/command/__init__.py
|
|
||||||
|
|
||||||
%ifarch %{openblas_arches}
|
%ifarch %{openblas_arches}
|
||||||
# Use openblas pthreads as recommended by upstream (see comment in site.cfg.example)
|
# Use openblas pthreads as recommended by upstream (see comment in site.cfg.example)
|
||||||
cat >> site.cfg <<EOF
|
cat >> site.cfg <<EOF
|
||||||
[openblas]
|
[openblas]
|
||||||
|
libraries = openblasp
|
||||||
library_dirs = %{_libdir}
|
library_dirs = %{_libdir}
|
||||||
openblas_libs = openblasp
|
|
||||||
EOF
|
EOF
|
||||||
%else
|
%else
|
||||||
# Atlas 3.10 library names
|
# Atlas 3.10 library names
|
||||||
@ -160,15 +124,9 @@ EOF
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with python3}
|
|
||||||
rm -rf %{py3dir}
|
|
||||||
cp -a . %{py3dir}
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%set_build_flags
|
%set_build_flags
|
||||||
%if %{with python3}
|
|
||||||
pushd %{py3dir}
|
|
||||||
%ifarch %{openblas_arches}
|
%ifarch %{openblas_arches}
|
||||||
env OPENBLAS=%{_libdir} \
|
env OPENBLAS=%{_libdir} \
|
||||||
%else
|
%else
|
||||||
@ -177,17 +135,6 @@ env ATLAS=%{_libdir} \
|
|||||||
BLAS=%{_libdir} \
|
BLAS=%{_libdir} \
|
||||||
LAPACK=%{_libdir} CFLAGS="%{optflags}" \
|
LAPACK=%{_libdir} CFLAGS="%{optflags}" \
|
||||||
%{__python3} setup.py build
|
%{__python3} setup.py build
|
||||||
popd
|
|
||||||
%endif # with _python3
|
|
||||||
|
|
||||||
%ifarch %{openblas_arches}
|
|
||||||
env OPENBLAS=%{_libdir} \
|
|
||||||
%else
|
|
||||||
env ATLAS=%{_libdir} \
|
|
||||||
%endif
|
|
||||||
BLAS=%{_libdir} \
|
|
||||||
LAPACK=%{_libdir} CFLAGS="%{optflags}" \
|
|
||||||
%{__python2} setup.py build
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
mkdir docs
|
mkdir docs
|
||||||
@ -195,33 +142,7 @@ pushd docs
|
|||||||
unzip %{SOURCE1}
|
unzip %{SOURCE1}
|
||||||
popd
|
popd
|
||||||
|
|
||||||
# first install python3 so the binaries are overwritten by the python2 ones
|
#%%{__python3} setup.py install -O1 --skip-build --root %%{buildroot}
|
||||||
%if %{with python3}
|
|
||||||
pushd %{py3dir}
|
|
||||||
#%%{__python2} setup.py install -O1 --skip-build --root %%{buildroot}
|
|
||||||
# skip-build currently broken, this works around it for now
|
|
||||||
%ifarch %{openblas_arches}
|
|
||||||
env OPENBLAS=%{_libdir} \
|
|
||||||
%else
|
|
||||||
env ATLAS=%{_libdir} \
|
|
||||||
%endif
|
|
||||||
FFTW=%{_libdir} BLAS=%{_libdir} \
|
|
||||||
LAPACK=%{_libdir} CFLAGS="%{optflags}" \
|
|
||||||
%{__python3} setup.py install --root %{buildroot}
|
|
||||||
pushd %{buildroot}%{_bindir} &> /dev/null
|
|
||||||
|
|
||||||
# The custom install script gets the Python version from the executable name,
|
|
||||||
# e.g. "python3" -> "3", but when built by "platform-python" it guesses the
|
|
||||||
# version as "rm-python". Renaming the file here is the easiest correction.
|
|
||||||
mv f2pyrm-python f2py3
|
|
||||||
|
|
||||||
popd &> /dev/null
|
|
||||||
|
|
||||||
popd
|
|
||||||
|
|
||||||
%endif # with python3
|
|
||||||
|
|
||||||
#%%{__python2} setup.py install -O1 --skip-build --root %%{buildroot}
|
|
||||||
# skip-build currently broken, this works around it for now
|
# skip-build currently broken, this works around it for now
|
||||||
%ifarch %{openblas_arches}
|
%ifarch %{openblas_arches}
|
||||||
env OPENBLAS=%{_libdir} \
|
env OPENBLAS=%{_libdir} \
|
||||||
@ -230,88 +151,44 @@ env ATLAS=%{_libdir} \
|
|||||||
%endif
|
%endif
|
||||||
FFTW=%{_libdir} BLAS=%{_libdir} \
|
FFTW=%{_libdir} BLAS=%{_libdir} \
|
||||||
LAPACK=%{_libdir} CFLAGS="%{optflags}" \
|
LAPACK=%{_libdir} CFLAGS="%{optflags}" \
|
||||||
%{__python2} setup.py install --root %{buildroot}
|
%{__python3} setup.py install --root %{buildroot}
|
||||||
|
|
||||||
pushd %{buildroot}%{_bindir} &> /dev/null
|
pushd %{buildroot}%{_bindir} &> /dev/null
|
||||||
# symlink for anyone who was using f2py.numpy
|
# Remove unversioned binaries
|
||||||
mv f2py{2,-%{python2_version}}
|
rm f2py
|
||||||
ln -s f2py-%{python2_version} f2py-2
|
rm f2py3
|
||||||
ln -s f2py-%{python2_version} f2py2
|
|
||||||
popd &> /dev/null
|
popd &> /dev/null
|
||||||
#install -D -p -m 0644 docs/f2py/f2py.1 %{buildroot}%{_mandir}/man1/f2py.1
|
|
||||||
|
|
||||||
#symlink for includes, BZ 185079
|
|
||||||
mkdir -p %{buildroot}%{_includedir}
|
|
||||||
ln -s %{python2_sitearch}/%{name}/core/include/numpy/ %{buildroot}%{_includedir}/numpy
|
|
||||||
|
|
||||||
|
# All ghost files controlled by alternatives need to exist for the files
|
||||||
|
# section check to succeed
|
||||||
|
touch %{buildroot}%{_bindir}/f2py3
|
||||||
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
# Having LDFLAGS set in the environment (for Flatpak builds, in particular), breaks
|
%if %{with tests}
|
||||||
# f2py Makefiles which use that variable like: 'LDFLAGS = -s -shared'
|
%if "%{_arch}" != "s390x" && "%{_arch}" != "ppc64le"
|
||||||
unset LDFLAGS
|
%{__python3} runtests.py -v
|
||||||
pushd doc &> /dev/null
|
|
||||||
PATH="%{buildroot}%{_bindir}:${PATH}" \
|
|
||||||
PYTHONPATH="%{buildroot}%{python2_sitearch}" \
|
|
||||||
%{__python2} -c "import pkg_resources, numpy, sys ; sys.exit(0 if numpy.test(verbose=2).wasSuccessful() else 1)" \
|
|
||||||
%ifarch s390 s390x
|
|
||||||
|| :
|
|
||||||
%endif
|
%endif
|
||||||
# don't remove this comment
|
|
||||||
popd &> /dev/null
|
|
||||||
|
|
||||||
%if %{with python3}
|
|
||||||
pushd doc &> /dev/null
|
|
||||||
PATH="%{buildroot}%{_bindir}:${PATH}" \
|
|
||||||
PYTHONPATH="%{buildroot}%{python3_sitearch}" \
|
|
||||||
%{__python3} -c "import pkg_resources, numpy, sys ; sys.exit(0 if numpy.test(verbose=2).wasSuccessful() else 1)" \
|
|
||||||
%ifarch s390 s390x
|
|
||||||
|| :
|
|
||||||
%endif
|
%endif
|
||||||
# don't remove this comment
|
|
||||||
popd &> /dev/null
|
|
||||||
|
|
||||||
%endif # with python3
|
|
||||||
|
|
||||||
|
|
||||||
%files -n python2-numpy
|
%post -n python%{python3_pkgversion}-numpy-f2py
|
||||||
|
alternatives --add-slave python3 %{_bindir}/python3.8 \
|
||||||
|
%{_bindir}/f2py3 \
|
||||||
|
f2py3 \
|
||||||
|
%{_bindir}/f2py3.8
|
||||||
|
|
||||||
|
%postun -n python%{python3_pkgversion}-numpy-f2py
|
||||||
|
# Do this only during uninstall process (not during update)
|
||||||
|
if [ $1 -eq 0 ]; then
|
||||||
|
alternatives --keep-foreign --remove-slave python3 %{_bindir}/python3.8 \
|
||||||
|
f2py3
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
%files -n python%{python3_pkgversion}-numpy
|
||||||
%license LICENSE.txt
|
%license LICENSE.txt
|
||||||
%doc THANKS.txt site.cfg.example
|
%doc THANKS.txt site.cfg.example
|
||||||
%dir %{python2_sitearch}/%{name}
|
%{python3_sitearch}/%{name}/__pycache__/*
|
||||||
%{python2_sitearch}/%{name}/*.py*
|
|
||||||
%{python2_sitearch}/%{name}/core
|
|
||||||
%{python2_sitearch}/%{name}/distutils
|
|
||||||
%{python2_sitearch}/%{name}/doc
|
|
||||||
%{python2_sitearch}/%{name}/fft
|
|
||||||
%{python2_sitearch}/%{name}/lib
|
|
||||||
%{python2_sitearch}/%{name}/linalg
|
|
||||||
%{python2_sitearch}/%{name}/ma
|
|
||||||
%{python2_sitearch}/%{name}/random
|
|
||||||
%{python2_sitearch}/%{name}/testing
|
|
||||||
%{python2_sitearch}/%{name}/tests
|
|
||||||
%{python2_sitearch}/%{name}/compat
|
|
||||||
%{python2_sitearch}/%{name}/matrixlib
|
|
||||||
%{python2_sitearch}/%{name}/polynomial
|
|
||||||
%{python2_sitearch}/%{name}-*.egg-info
|
|
||||||
%{_includedir}/numpy
|
|
||||||
%exclude %{python2_sitearch}/%{name}/LICENSE.txt
|
|
||||||
|
|
||||||
%files -n python2-numpy-f2py
|
|
||||||
%doc docs/f2py/*.html
|
|
||||||
#%{_mandir}/man*/*
|
|
||||||
%{_bindir}/f2py2
|
|
||||||
%{_bindir}/f2py-2
|
|
||||||
%{_bindir}/f2py-%{python2_version}
|
|
||||||
%{python2_sitearch}/%{name}/f2py
|
|
||||||
|
|
||||||
%files -n python2-numpy-doc
|
|
||||||
%doc docs/*
|
|
||||||
|
|
||||||
%if %{with python3}
|
|
||||||
%files -n python3-numpy
|
|
||||||
%license LICENSE.txt
|
|
||||||
%doc THANKS.txt site.cfg.example
|
|
||||||
%{python3_sitearch}/%{name}/__pycache__
|
|
||||||
%dir %{python3_sitearch}/%{name}
|
%dir %{python3_sitearch}/%{name}
|
||||||
%{python3_sitearch}/%{name}/*.py*
|
%{python3_sitearch}/%{name}/*.py*
|
||||||
%{python3_sitearch}/%{name}/core
|
%{python3_sitearch}/%{name}/core
|
||||||
@ -330,72 +207,109 @@ popd &> /dev/null
|
|||||||
%{python3_sitearch}/%{name}-*.egg-info
|
%{python3_sitearch}/%{name}-*.egg-info
|
||||||
%exclude %{python3_sitearch}/%{name}/LICENSE.txt
|
%exclude %{python3_sitearch}/%{name}/LICENSE.txt
|
||||||
|
|
||||||
%files -n python3-numpy-f2py
|
%files -n python%{python3_pkgversion}-numpy-f2py
|
||||||
%{_bindir}/f2py3
|
%{_bindir}/f2py%{python3_version}
|
||||||
|
%ghost %{_bindir}/f2py3
|
||||||
%{python3_sitearch}/%{name}/f2py
|
%{python3_sitearch}/%{name}/f2py
|
||||||
|
|
||||||
%files -n python3-numpy-doc
|
%files -n python%{python3_pkgversion}-numpy-doc
|
||||||
%doc docs/*
|
%doc docs/*
|
||||||
|
|
||||||
%endif # with python3
|
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Fri Jan 08 2021 Nikola Forró <nforro@redhat.com> - 1:1.14.2-16
|
* Mon Jul 17 2023 Charalampos Stratakis <cstratak@redhat.com> - 1.17.3-7
|
||||||
- Fix include path
|
- Skip TestCond.test_nan
|
||||||
- Related: rhbz#1907601
|
- Resolves: rhbz#2217862
|
||||||
|
|
||||||
* Wed Dec 16 2020 Nikola Forró <nforro@redhat.com> - 1:1.14.2-15
|
* Mon Aug 02 2021 Tomas Orsava <torsava@redhat.com> - 1.17.3-6
|
||||||
- Fix %check
|
- Adjusted the postun scriptlets to enable upgrading to RHEL 9
|
||||||
- Related: rhbz#1907601
|
- Resolves: rhbz#1933055
|
||||||
|
|
||||||
* Tue Dec 15 2020 Nikola Forró <nforro@redhat.com> - 1:1.14.2-14
|
* Mon Mar 09 2020 Tomas Orsava <torsava@redhat.com> - 1.17.3-5
|
||||||
- Use macros rather than hardcoded paths
|
- Implement the alternatives system for the executables
|
||||||
- Resolves: rhbz#1907601
|
- Resolves: rhbz#1807041
|
||||||
|
|
||||||
* Wed Jun 05 2019 Nikola Forró <nforro@redhat.com> - 1:1.14.2-13
|
* Thu Dec 12 2019 Tomas Orsava <torsava@redhat.com> - 1.17.3-4
|
||||||
- Fix CVE-2019-6446
|
- Exclude unsupported i686 arch
|
||||||
- Resolves: rhbz#1668829
|
|
||||||
|
|
||||||
* Thu May 30 2019 Charalampos Stratakis <cstratak@redhat.com> - 1.14.2-12
|
* Mon Nov 25 2019 Lumír Balhar <lbalhar@redhat.com> - 1.17.3-3
|
||||||
- Set proper build flags for https://fedoraproject.org/wiki/Changes/Python_Extension_Flags
|
- Removed test which fails due to outdated openblas
|
||||||
- Resolves: rhbz#1715036
|
|
||||||
|
|
||||||
* Thu May 30 2019 Nikola Forró <nforro@redhat.com> - 1.14.2-11
|
* Wed Nov 20 2019 Lumír Balhar <lbalhar@redhat.com> - 1.17.3-2
|
||||||
- Fix broken float128 on all arches except x86_64
|
- Adjusted for Python 3.8 module in RHEL 8
|
||||||
- Resolves: rhbz#1688709
|
- Removed the Epoch from Fedora
|
||||||
|
|
||||||
* Thu Apr 25 2019 Tomas Orsava <torsava@redhat.com> - 1.14.2-10
|
* Fri Oct 18 2019 Gwyn Ciesla <gwync@protonmail.com> - 1:1.17.3-1
|
||||||
- Bumping due to problems with modular RPM upgrade path
|
- 1.17.3
|
||||||
- Resolves: rhbz#1695587
|
|
||||||
|
|
||||||
* Tue Oct 09 2018 Lumír Balhar <lbalhar@redhat.com> - 1:1.14.2-9
|
* Sat Sep 07 2019 Gwyn Ciesla <gwync@protonmail.com> - 1:1.17.2-1
|
||||||
- Remove unversioned provides
|
- 1.17.2
|
||||||
- Resolves: rhbz#1628242
|
|
||||||
|
|
||||||
* Tue Oct 02 2018 Lumír Balhar <lbalhar@redhat.com> - 1:1.14.2-8
|
* Thu Aug 29 2019 Gwyn Ciesla <gwync@protonmail.com> - 1:1.17.1-1
|
||||||
- Fix unversioned requires/buildrequires
|
- 1.17.1
|
||||||
- Resolves: rhbz#1628242
|
|
||||||
|
|
||||||
* Tue Aug 14 2018 Lumír Balhar <lbalhar@redhat.com> - 1:1.14.2-7
|
* Thu Aug 15 2019 Miro Hrončok <mhroncok@redhat.com> - 1:1.17.0-3
|
||||||
- Bring symlink f2py2 back for symlink modules
|
- Rebuilt for Python 3.8
|
||||||
- Resolves: rhbz#1615727
|
|
||||||
|
|
||||||
* Wed Aug 08 2018 Lumír Balhar <lbalhar@redhat.com> - 1:1.14.2-6
|
* Thu Aug 01 2019 Miro Hrončok <mhroncok@redhat.com> - 1:1.17.0-2
|
||||||
- Remove unversioned binaries from python2 subpackage
|
- Reintroduce libnpymath.a (#1735674)
|
||||||
- Resolves: rhbz#1613343
|
|
||||||
|
|
||||||
* Tue Jul 31 2018 Lumír Balhar <lbalhar@redhat.com> - 1:1.14.2-5
|
* Tue Jul 30 2019 Gwyn Ciesla <gwync@protonmail.com> 1:1.17.0-1
|
||||||
- Switch python3 coditions to bcond
|
- 1.17.0, split out Python 2.
|
||||||
|
|
||||||
* Mon Jun 25 2018 Tomas Orsava <torsava@redhat.com> - 1:1.14.2-4
|
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.16.4-3
|
||||||
- Use python2 macros instead of unversioned python macros
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||||
|
|
||||||
* Sat Apr 28 2018 Tomas Orsava <torsava@redhat.com> - 1:1.14.2-3
|
* Thu Jun 20 2019 Kalev Lember <klember@redhat.com> - 1:1.16.4-2
|
||||||
- Change the shebang of f2py to the versioned /usr/bin/python2
|
- Avoid hardcoding /usr prefix
|
||||||
|
|
||||||
* Fri Apr 27 2018 Tomas Orsava <torsava@redhat.com> - 1:1.14.2-2
|
* Tue May 28 2019 Gwyn Ciesla <gwync@protonmail.com> - 1:1.16.4-1
|
||||||
- Fix incorrect Python version guess when building on Platform-Python
|
- 1.16.4
|
||||||
|
|
||||||
|
* Thu May 16 2019 Orion Poplawski <orion@nwra.com> - 1:1.16.3-2
|
||||||
|
- Build only with openblasp (bugz#1709161)
|
||||||
|
|
||||||
|
* Mon Apr 22 2019 Gwyn Ciesla <gwync@protonmail.com> - 1:1.16.3-1
|
||||||
|
- 1.16.3.
|
||||||
|
|
||||||
|
* Tue Feb 26 2019 Gwyn Ciesla <gwync@protonmail.com> - 1:1.16.2-1
|
||||||
|
- 1.16.2.
|
||||||
|
|
||||||
|
* Fri Feb 01 2019 Gwyn Ciesla <limburgher@gmail.com> - 1:1.16.1-1
|
||||||
|
- 1.16.1.
|
||||||
|
|
||||||
|
* Tue Jan 22 2019 Gwyn Ciesla <limburgher@gmail.com> - 1:1.16.0-1
|
||||||
|
- 1.16.0.
|
||||||
|
|
||||||
|
* Wed Aug 29 2018 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1:1.15.1-2
|
||||||
|
- Switch to pytest for running tests during check
|
||||||
|
- Stop ignoring failures when running tests
|
||||||
|
- Set PATH in check so that f2py tests work
|
||||||
|
- Update docs to match release
|
||||||
|
- Remove outdated workaround from rhbz#849713
|
||||||
|
|
||||||
|
* Wed Aug 22 2018 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1:1.15.1-1
|
||||||
|
- Update to latest version
|
||||||
|
|
||||||
|
* Sat Aug 11 2018 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1:1.15.0-2
|
||||||
|
- Fix broken build on s390x
|
||||||
|
- Remove bytecode produced by pytest
|
||||||
|
- Re-enable tests on s390x
|
||||||
|
|
||||||
|
* Tue Jul 24 2018 Gwyn Ciesla <limburgher@gmail.com> - 1:1.15.0-1
|
||||||
|
- 1.15.0
|
||||||
|
|
||||||
|
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.14.5-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Jun 15 2018 Miro Hrončok <mhroncok@redhat.com> - 1:1.14.5-2
|
||||||
|
- Rebuilt for Python 3.7
|
||||||
|
|
||||||
|
* Wed Jun 13 2018 Gwyn Ciesla <limburgher@gmail.com> - 1:1.14.5-1
|
||||||
|
- 1.14.5
|
||||||
|
|
||||||
|
* Tue May 01 2018 Gwyn Ciesla <limburgher@gmail.com> - 1:1.14.3-1
|
||||||
|
- 1.14.3
|
||||||
|
|
||||||
* Mon Mar 12 2018 Gwyn Ciesla <limburgher@gmail.com> - 1:1.14.2-1
|
* Mon Mar 12 2018 Gwyn Ciesla <limburgher@gmail.com> - 1:1.14.2-1
|
||||||
- 1.14.2
|
- 1.14.2
|
||||||
2
sources
Normal file
2
sources
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
SHA512 (numpy-1.17.3.tar.gz) = 587aace3807a657a8fe0c81d4ec75e43dd2d8d339475b0094214d7cf5a9fc4acd9ffb68ceb65f6fa5b392255fe011fb2b9c7ede8d3c4cb93fd676e3ca5944851
|
||||||
|
SHA512 (numpy-html-1.17.0.zip) = 83b0a780d87d1dbf2c32a5359a8b2251d4636d35f7398cb5f72159317943906684cfb7fc26f95a26872f0216ee1b66772ce83674f87a7a6faa4d5829c5e5cfe7
|
||||||
Loading…
Reference in New Issue
Block a user