Compare commits
No commits in common. "c8-stream-2.7" and "c8" have entirely different histories.
c8-stream-
...
c8
4
.gitignore
vendored
4
.gitignore
vendored
@ -1,2 +1,2 @@
|
||||
SOURCES/numpy-1.14.2.tar.gz
|
||||
SOURCES/numpy-html-1.13.0.zip
|
||||
SOURCES/numpy-1.14.3.tar.gz
|
||||
SOURCES/numpy-html-1.14.2.zip
|
||||
|
||||
@ -1,2 +1,2 @@
|
||||
c00e70468703830a26ee9173ba1cf4aedf08718f SOURCES/numpy-1.14.2.tar.gz
|
||||
b23d66880bba5f56baa81ce02eb5a55de046c0a7 SOURCES/numpy-html-1.13.0.zip
|
||||
05965f90f839562802e16d2e02feba6289f5d72e SOURCES/numpy-1.14.3.tar.gz
|
||||
c120eb681b296bf771ee015b37bbd950ca087055 SOURCES/numpy-html-1.14.2.zip
|
||||
|
||||
17
SOURCES/f2py-setup.patch
Normal file
17
SOURCES/f2py-setup.patch
Normal file
@ -0,0 +1,17 @@
|
||||
diff --git a/numpy/f2py/setup.py b/numpy/f2py/setup.py
|
||||
index 3204129..0d47580 100644
|
||||
--- a/numpy/f2py/setup.py
|
||||
+++ b/numpy/f2py/setup.py
|
||||
@@ -55,9 +55,9 @@ def configuration(parent_package='', top_path=None):
|
||||
config.make_svn_version_py()
|
||||
|
||||
def generate_f2py_py(build_dir):
|
||||
- f2py_exe = 'f2py' + os.path.basename(sys.executable)[6:]
|
||||
- if f2py_exe[-4:] == '.exe':
|
||||
- f2py_exe = f2py_exe[:-4] + '.py'
|
||||
+ f2py_exe = 'f2py' + str(sys.version_info.major)
|
||||
+ if sys.executable.endswith('.exe'):
|
||||
+ f2py_exe = f2py_exe + '.py'
|
||||
if 'bdist_wininst' in sys.argv and f2py_exe[-3:] != '.py':
|
||||
f2py_exe = f2py_exe + '.py'
|
||||
target = os.path.join(build_dir, f2py_exe)
|
||||
@ -1,4 +1,4 @@
|
||||
From 0fcfa065d900040c80628b31b8b6ea606c131086 Mon Sep 17 00:00:00 2001
|
||||
From b272ff74ae319a82e4d3e3de1348b2a6115f6501 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
|
||||
@ -15,7 +15,7 @@ see also https://nvd.nist.gov/vuln/detail/CVE-2019-6446
|
||||
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
|
||||
index 52793d453..b144aec17 100644
|
||||
--- a/numpy/core/tests/test_regression.py
|
||||
+++ b/numpy/core/tests/test_regression.py
|
||||
@@ -96,7 +96,7 @@ class TestRegression(object):
|
||||
@ -28,7 +28,7 @@ index a3b0114..2be6bf3 100644
|
||||
|
||||
def test_noncontiguous_fill(self):
|
||||
diff --git a/numpy/lib/format.py b/numpy/lib/format.py
|
||||
index 363bb21..b91142c 100644
|
||||
index 363bb2101..e6144b3a6 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):
|
||||
@ -47,14 +47,14 @@ index 363bb21..b91142c 100644
|
||||
- Whether to allow reading pickled data. Default: True
|
||||
+ Whether to allow writing pickled data. Default: False
|
||||
+
|
||||
+ .. versionchanged:: 1.14.2
|
||||
+ .. versionchanged:: 1.14.3
|
||||
+ 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
|
||||
index 76b135cc2..ef84d68fd 100644
|
||||
--- a/numpy/lib/npyio.py
|
||||
+++ b/numpy/lib/npyio.py
|
||||
@@ -130,7 +130,11 @@ class NpzFile(object):
|
||||
@ -64,7 +64,7 @@ index 76b135c..c6522f5 100644
|
||||
- Allow loading pickled data. Default: True
|
||||
+ Allow loading pickled data. Default: False
|
||||
+
|
||||
+ .. versionchanged:: 1.14.2
|
||||
+ .. versionchanged:: 1.14.3
|
||||
+ Made default False in response to CVE-2019-6446.
|
||||
+
|
||||
pickle_kwargs : dict, optional
|
||||
@ -96,14 +96,14 @@ index 76b135c..c6522f5 100644
|
||||
- Default: True
|
||||
+ arrays will fail. Default: False
|
||||
+
|
||||
+ .. versionchanged:: 1.14.2
|
||||
+ .. versionchanged:: 1.14.3
|
||||
+ 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
|
||||
index 2d2b4cea2..04e090ca7 100644
|
||||
--- a/numpy/lib/tests/test_format.py
|
||||
+++ b/numpy/lib/tests/test_format.py
|
||||
@@ -426,7 +426,7 @@ def roundtrip(arr):
|
||||
@ -149,7 +149,7 @@ index 2d2b4ce..04e090c 100644
|
||||
|
||||
def test_pickle_disallow():
|
||||
diff --git a/numpy/lib/tests/test_io.py b/numpy/lib/tests/test_io.py
|
||||
index 2daa015..bde2567 100644
|
||||
index 2daa0153b..bde256741 100644
|
||||
--- a/numpy/lib/tests/test_io.py
|
||||
+++ b/numpy/lib/tests/test_io.py
|
||||
@@ -87,7 +87,7 @@ class RoundtripTest(object):
|
||||
@ -1,6 +1,6 @@
|
||||
From 85ed88218164ceecb360bd9b8539e55076df9d19 Mon Sep 17 00:00:00 2001
|
||||
From 5c6a1415c8b227f10f388f2b2632afa96287fb49 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Nikola=20Forr=C3=B3?= <nforro@redhat.com>
|
||||
Date: Thu, 30 May 2019 15:52:23 +0200
|
||||
Date: Wed, 20 Mar 2019 15:52:48 +0100
|
||||
Subject: [PATCH] Fix broken float128 on all arches except x86_64
|
||||
|
||||
Backport of the following upstream commits:
|
||||
@ -36,7 +36,7 @@ ec843c700 BUG: Fix undefined functions on big-endian systems.
|
||||
14 files changed, 1277 insertions(+), 654 deletions(-)
|
||||
|
||||
diff --git a/numpy/core/include/numpy/npy_cpu.h b/numpy/core/include/numpy/npy_cpu.h
|
||||
index 84653ea..1109426 100644
|
||||
index 84653ea18..1109426da 100644
|
||||
--- a/numpy/core/include/numpy/npy_cpu.h
|
||||
+++ b/numpy/core/include/numpy/npy_cpu.h
|
||||
@@ -17,6 +17,7 @@
|
||||
@ -97,7 +97,7 @@ index 84653ea..1109426 100644
|
||||
#error Unknown CPU, please report this to numpy maintainers with \
|
||||
information about your platform (OS, CPU and compiler)
|
||||
diff --git a/numpy/core/include/numpy/npy_endian.h b/numpy/core/include/numpy/npy_endian.h
|
||||
index 1a42121..44cdffd 100644
|
||||
index 1a42121db..44cdffd14 100644
|
||||
--- a/numpy/core/include/numpy/npy_endian.h
|
||||
+++ b/numpy/core/include/numpy/npy_endian.h
|
||||
@@ -37,27 +37,31 @@
|
||||
@ -153,7 +153,7 @@ index 1a42121..44cdffd 100644
|
||||
#define NPY_BYTE_ORDER NPY_BIG_ENDIAN
|
||||
#else
|
||||
diff --git a/numpy/core/setup.py b/numpy/core/setup.py
|
||||
index 371df5b..cc1bb5b 100644
|
||||
index 371df5bec..cc1bb5ba7 100644
|
||||
--- a/numpy/core/setup.py
|
||||
+++ b/numpy/core/setup.py
|
||||
@@ -452,17 +452,8 @@ def configuration(parent_package='',top_path=None):
|
||||
@ -177,7 +177,7 @@ index 371df5b..cc1bb5b 100644
|
||||
# Py3K check
|
||||
if sys.version_info[0] == 3:
|
||||
diff --git a/numpy/core/setup_common.py b/numpy/core/setup_common.py
|
||||
index bd093c5..343318c 100644
|
||||
index bd093c5c8..343318cd3 100644
|
||||
--- a/numpy/core/setup_common.py
|
||||
+++ b/numpy/core/setup_common.py
|
||||
@@ -333,9 +333,9 @@ _MOTOROLA_EXTENDED_12B = ['300', '031', '000', '000', '353', '171',
|
||||
@ -226,7 +226,7 @@ index bd093c5..343318c 100644
|
||||
if read[16:-8] == _IEEE_DOUBLE_LE:
|
||||
return 'IEEE_DOUBLE_LE'
|
||||
diff --git a/numpy/core/src/multiarray/dragon4.c b/numpy/core/src/multiarray/dragon4.c
|
||||
index e005234..e3da79f 100644
|
||||
index e005234a0..e3da79f40 100644
|
||||
--- a/numpy/core/src/multiarray/dragon4.c
|
||||
+++ b/numpy/core/src/multiarray/dragon4.c
|
||||
@@ -42,6 +42,18 @@
|
||||
@ -2478,7 +2478,7 @@ index e005234..e3da79f 100644
|
||||
+
|
||||
+#undef DEBUG_ASSERT
|
||||
diff --git a/numpy/core/src/multiarray/dragon4.h b/numpy/core/src/multiarray/dragon4.h
|
||||
index 5559c51..2b8b4ce 100644
|
||||
index 5559c5157..2b8b4cef4 100644
|
||||
--- a/numpy/core/src/multiarray/dragon4.h
|
||||
+++ b/numpy/core/src/multiarray/dragon4.h
|
||||
@@ -40,6 +40,48 @@
|
||||
@ -2563,7 +2563,7 @@ index 5559c51..2b8b4ce 100644
|
||||
PyObject *
|
||||
Dragon4_Positional(PyObject *obj, DigitMode digit_mode, CutoffMode cutoff_mode,
|
||||
diff --git a/numpy/core/src/multiarray/scalartypes.c.src b/numpy/core/src/multiarray/scalartypes.c.src
|
||||
index 9fc6e17..be2516d 100644
|
||||
index c2d4bde66..42d613c90 100644
|
||||
--- a/numpy/core/src/multiarray/scalartypes.c.src
|
||||
+++ b/numpy/core/src/multiarray/scalartypes.c.src
|
||||
@@ -432,6 +432,7 @@ gentype_format(PyObject *self, PyObject *args)
|
||||
@ -2590,7 +2590,7 @@ index 9fc6e17..be2516d 100644
|
||||
sign, trim, pad_left, pad_right);
|
||||
}
|
||||
diff --git a/numpy/core/src/npymath/ieee754.c.src b/numpy/core/src/npymath/ieee754.c.src
|
||||
index 0370ea6..170471f 100644
|
||||
index 0370ea6c7..170471f19 100644
|
||||
--- a/numpy/core/src/npymath/ieee754.c.src
|
||||
+++ b/numpy/core/src/npymath/ieee754.c.src
|
||||
@@ -183,6 +183,7 @@ static npy_longdouble _nextl(npy_longdouble x, int p)
|
||||
@ -2618,7 +2618,7 @@ index 0370ea6..170471f 100644
|
||||
if((hx==0xffefffffffffffffLL)&&(lx==0xfc8ffffffffffffeLL))
|
||||
return x+x; /* overflow, return -inf */
|
||||
diff --git a/numpy/core/src/npymath/npy_math_private.h b/numpy/core/src/npymath/npy_math_private.h
|
||||
index d75b9e9..e4a919d 100644
|
||||
index d75b9e991..e4a919db6 100644
|
||||
--- a/numpy/core/src/npymath/npy_math_private.h
|
||||
+++ b/numpy/core/src/npymath/npy_math_private.h
|
||||
@@ -287,8 +287,7 @@ do { \
|
||||
@ -2652,7 +2652,7 @@ index d75b9e9..e4a919d 100644
|
||||
/*
|
||||
* Those unions are used to convert a pointer of npy_cdouble to native C99
|
||||
diff --git a/numpy/core/src/private/npy_config.h b/numpy/core/src/private/npy_config.h
|
||||
index 107b3cb..8143e77 100644
|
||||
index 107b3cb5b..8143e7719 100644
|
||||
--- a/numpy/core/src/private/npy_config.h
|
||||
+++ b/numpy/core/src/private/npy_config.h
|
||||
@@ -15,7 +15,8 @@
|
||||
@ -2666,7 +2666,7 @@ index 107b3cb..8143e77 100644
|
||||
#else
|
||||
#define NPY_MAX_COPY_ALIGNMENT 16
|
||||
diff --git a/numpy/core/src/private/npy_fpmath.h b/numpy/core/src/private/npy_fpmath.h
|
||||
index 86b9cf3..dbb3fb2 100644
|
||||
index 86b9cf3da..dbb3fb23d 100644
|
||||
--- a/numpy/core/src/private/npy_fpmath.h
|
||||
+++ b/numpy/core/src/private/npy_fpmath.h
|
||||
@@ -7,45 +7,24 @@
|
||||
@ -2726,20 +2726,21 @@ index 86b9cf3..dbb3fb2 100644
|
||||
+
|
||||
#endif
|
||||
diff --git a/numpy/core/tests/test_scalarprint.py b/numpy/core/tests/test_scalarprint.py
|
||||
index d57f1a8..e04de61 100644
|
||||
index 61774617d..10fbb8b74 100644
|
||||
--- a/numpy/core/tests/test_scalarprint.py
|
||||
+++ b/numpy/core/tests/test_scalarprint.py
|
||||
@@ -5,7 +5,8 @@
|
||||
@@ -5,8 +5,9 @@
|
||||
from __future__ import division, absolute_import, print_function
|
||||
|
||||
import numpy as np
|
||||
-from numpy.testing import assert_, assert_equal, run_module_suite
|
||||
+from numpy.testing import assert_, assert_equal, run_module_suite, dec
|
||||
import sys, tempfile
|
||||
+import platform
|
||||
|
||||
|
||||
class TestRealScalars(object):
|
||||
@@ -201,6 +202,66 @@ class TestRealScalars(object):
|
||||
@@ -217,6 +218,66 @@ class TestRealScalars(object):
|
||||
"1.2" if tp != np.float16 else "1.2002")
|
||||
assert_equal(fpos(tp('1.'), trim='-'), "1")
|
||||
|
||||
@ -2807,7 +2808,7 @@ index d57f1a8..e04de61 100644
|
||||
# gh-9360
|
||||
x = np.float32(1024 - 2**-14)
|
||||
diff --git a/numpy/core/tests/test_umath.py b/numpy/core/tests/test_umath.py
|
||||
index bebeddc..09d1bbe 100644
|
||||
index bebeddc92..09d1bbeaf 100644
|
||||
--- a/numpy/core/tests/test_umath.py
|
||||
+++ b/numpy/core/tests/test_umath.py
|
||||
@@ -2515,8 +2515,10 @@ def test_nextafter():
|
||||
@ -2837,7 +2838,7 @@ index bebeddc..09d1bbe 100644
|
||||
return _test_spacing(np.longdouble)
|
||||
|
||||
diff --git a/numpy/ma/tests/test_core.py b/numpy/ma/tests/test_core.py
|
||||
index 708c12e..1b47021 100644
|
||||
index 708c12e8f..1b4702142 100644
|
||||
--- a/numpy/ma/tests/test_core.py
|
||||
+++ b/numpy/ma/tests/test_core.py
|
||||
@@ -3278,18 +3278,13 @@ class TestMaskedArrayMethods(object):
|
||||
@ -2863,5 +2864,5 @@ index 708c12e..1b47021 100644
|
||||
def test_argsort(self):
|
||||
# Test argsort
|
||||
--
|
||||
2.21.0
|
||||
2.17.2
|
||||
|
||||
299
SPECS/numpy.spec
299
SPECS/numpy.spec
@ -1,33 +1,20 @@
|
||||
%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
|
||||
#%%global relc rc1
|
||||
|
||||
%global modname numpy
|
||||
|
||||
Name: numpy
|
||||
Version: 1.14.2
|
||||
Release: 16%{?dist}
|
||||
Version: 1.14.3
|
||||
Release: 10%{?dist}
|
||||
Epoch: 1
|
||||
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
|
||||
License: BSD and Python
|
||||
URL: http://www.numpy.org/
|
||||
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
|
||||
Patch0: numpy-1.14.2-float128.patch
|
||||
Patch1: numpy-1.14.2-CVE-2019-6446.patch
|
||||
Source1: https://docs.scipy.org/doc/numpy/numpy-html-1.14.2.zip
|
||||
Patch0: f2py-setup.patch
|
||||
Patch1: numpy-1.14.3-float128.patch
|
||||
Patch2: numpy-1.14.3-CVE-2019-6446.patch
|
||||
|
||||
BuildRequires: python2-devel lapack-devel python2-setuptools gcc-gfortran python2-nose
|
||||
BuildRequires: /usr/bin/sed
|
||||
BuildRequires: python2-Cython
|
||||
BuildRequires: python3-devel python3-setuptools python3-nose python3-Cython
|
||||
BuildRequires: lapack-devel gcc-gfortran
|
||||
%ifarch %{openblas_arches}
|
||||
BuildRequires: openblas-devel
|
||||
%else
|
||||
@ -48,55 +35,10 @@ 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
|
||||
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
|
||||
|
||||
Group: Development/Languages
|
||||
License: BSD
|
||||
%{?python_provide:%python_provide python3-numpy}
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-setuptools
|
||||
BuildRequires: python3-nose
|
||||
|
||||
|
||||
%description -n python3-numpy
|
||||
NumPy is a general-purpose array-processing package designed to
|
||||
@ -110,33 +52,43 @@ 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 python3-numpy-f2py
|
||||
Summary: f2py for numpy
|
||||
Group: Development/Libraries
|
||||
Requires: python3-numpy = %{epoch}:%{version}-%{release}
|
||||
Requires: python3-devel
|
||||
Requires: python3-libs-devel
|
||||
|
||||
# Require alternatives version that implements the --keep-foreign flag
|
||||
Requires(postun): alternatives >= 1.19.1-1
|
||||
# For alternatives
|
||||
Requires: python36
|
||||
Requires(post): python36
|
||||
Requires(postun): python36
|
||||
|
||||
Provides: python3-f2py = %{version}-%{release}
|
||||
Obsoletes: python3-f2py <= 2.45.241_1927
|
||||
%{?python_provide:%python_provide python3-numpy-f2py}
|
||||
|
||||
|
||||
%description -n python3-numpy-f2py
|
||||
This package includes a version of f2py that works properly with NumPy.
|
||||
|
||||
|
||||
%package -n python3-numpy-doc
|
||||
Summary: Documentation for numpy
|
||||
Requires: python3-numpy = %{epoch}:%{version}-%{release}
|
||||
BuildArch: noarch
|
||||
|
||||
|
||||
%description -n python3-numpy-doc
|
||||
This package provides the complete documentation for NumPy.
|
||||
|
||||
%endif # with python3
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-%{version}%{?relc}
|
||||
#%setup -q -n numpy-cc2b04
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
|
||||
# workaround for rhbz#849713
|
||||
# http://mail.scipy.org/pipermail/numpy-discussion/2012-July/063530.html
|
||||
@ -160,15 +112,8 @@ EOF
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%if %{with python3}
|
||||
rm -rf %{py3dir}
|
||||
cp -a . %{py3dir}
|
||||
%endif
|
||||
|
||||
%build
|
||||
%set_build_flags
|
||||
%if %{with python3}
|
||||
pushd %{py3dir}
|
||||
%ifarch %{openblas_arches}
|
||||
env OPENBLAS=%{_libdir} \
|
||||
%else
|
||||
@ -177,17 +122,7 @@ env ATLAS=%{_libdir} \
|
||||
BLAS=%{_libdir} \
|
||||
LAPACK=%{_libdir} CFLAGS="%{optflags}" \
|
||||
%{__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
|
||||
mkdir docs
|
||||
@ -195,11 +130,6 @@ pushd docs
|
||||
unzip %{SOURCE1}
|
||||
popd
|
||||
|
||||
# first install python3 so the binaries are overwritten by the python2 ones
|
||||
%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
|
||||
@ -208,106 +138,36 @@ env ATLAS=%{_libdir} \
|
||||
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
|
||||
%ifarch %{openblas_arches}
|
||||
env OPENBLAS=%{_libdir} \
|
||||
%else
|
||||
env ATLAS=%{_libdir} \
|
||||
%endif
|
||||
FFTW=%{_libdir} BLAS=%{_libdir} \
|
||||
LAPACK=%{_libdir} CFLAGS="%{optflags}" \
|
||||
%{__python2} setup.py install --root %{buildroot}
|
||||
|
||||
pushd %{buildroot}%{_bindir} &> /dev/null
|
||||
# symlink for anyone who was using f2py.numpy
|
||||
mv f2py{2,-%{python2_version}}
|
||||
ln -s f2py-%{python2_version} f2py-2
|
||||
ln -s f2py-%{python2_version} f2py2
|
||||
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
|
||||
|
||||
|
||||
mv %{buildroot}%{_bindir}/f2py3 %{buildroot}%{_bindir}/f2py%{python3_version}
|
||||
# All ghost files controlled by alternatives need to exist for the files
|
||||
# section check to succeed
|
||||
touch %{buildroot}%{_bindir}/f2py3
|
||||
|
||||
%check
|
||||
# Having LDFLAGS set in the environment (for Flatpak builds, in particular), breaks
|
||||
# f2py Makefiles which use that variable like: 'LDFLAGS = -s -shared'
|
||||
unset LDFLAGS
|
||||
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)" \
|
||||
PATH="%{buildroot}%{_bindir}:${PATH}" PYTHONPATH="%{buildroot}%{python3_sitearch}" %{__python3} -c "import pkg_resources, numpy ; numpy.test(verbose=2)" \
|
||||
%ifarch s390 s390x
|
||||
|| :
|
||||
%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
|
||||
# don't remove this comment
|
||||
popd &> /dev/null
|
||||
|
||||
%endif # with python3
|
||||
%post -n python3-numpy-f2py
|
||||
alternatives --add-slave python3 %{_bindir}/python%{python3_version} \
|
||||
%{_bindir}/f2py3 \
|
||||
f2py3 \
|
||||
%{_bindir}/f2py%{python3_version}
|
||||
|
||||
%postun -n python3-numpy-f2py
|
||||
# Do this only during uninstall process (not during update)
|
||||
if [ $1 -eq 0 ]; then
|
||||
alternatives --keep-foreign --remove-slave python3 \
|
||||
%{_bindir}/python%{python3_version} f2py3
|
||||
fi
|
||||
|
||||
|
||||
%files -n python2-numpy
|
||||
%license LICENSE.txt
|
||||
%doc THANKS.txt site.cfg.example
|
||||
%dir %{python2_sitearch}/%{name}
|
||||
%{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
|
||||
@ -330,72 +190,57 @@ popd &> /dev/null
|
||||
%{python3_sitearch}/%{name}-*.egg-info
|
||||
%exclude %{python3_sitearch}/%{name}/LICENSE.txt
|
||||
|
||||
|
||||
%files -n python3-numpy-f2py
|
||||
%{_bindir}/f2py3
|
||||
%ghost %{_bindir}/f2py3
|
||||
%{_bindir}/f2py%{python3_version}
|
||||
%{python3_sitearch}/%{name}/f2py
|
||||
|
||||
|
||||
%files -n python3-numpy-doc
|
||||
%doc docs/*
|
||||
|
||||
%endif # with python3
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Jan 08 2021 Nikola Forró <nforro@redhat.com> - 1:1.14.2-16
|
||||
- Fix include path
|
||||
- Related: rhbz#1907601
|
||||
* Fri Jul 30 2021 Tomas Orsava <torsava@redhat.com> - 1:1.14.3-10
|
||||
- Adjusted the postun scriptlets to enable upgrading to RHEL 9
|
||||
- Resolves: rhbz#1933055
|
||||
|
||||
* Wed Dec 16 2020 Nikola Forró <nforro@redhat.com> - 1:1.14.2-15
|
||||
- Fix %check
|
||||
- Related: rhbz#1907601
|
||||
|
||||
* Tue Dec 15 2020 Nikola Forró <nforro@redhat.com> - 1:1.14.2-14
|
||||
- Use macros rather than hardcoded paths
|
||||
- Resolves: rhbz#1907601
|
||||
|
||||
* Wed Jun 05 2019 Nikola Forró <nforro@redhat.com> - 1:1.14.2-13
|
||||
* Wed Jun 05 2019 Nikola Forró <nforro@redhat.com> - 1:1.14.3-9
|
||||
- Fix CVE-2019-6446
|
||||
- Resolves: rhbz#1668829
|
||||
resolves: #1668466
|
||||
|
||||
* Thu May 30 2019 Charalampos Stratakis <cstratak@redhat.com> - 1.14.2-12
|
||||
- Set proper build flags for https://fedoraproject.org/wiki/Changes/Python_Extension_Flags
|
||||
- Resolves: rhbz#1715036
|
||||
* Mon Jun 03 2019 Nikola Forró <nforro@redhat.com> - 1:1.14.3-8
|
||||
- Rebuild with fixed gating.yaml
|
||||
related: #1687873
|
||||
|
||||
* Thu May 30 2019 Nikola Forró <nforro@redhat.com> - 1.14.2-11
|
||||
* Wed Mar 20 2019 Nikola Forró <nforro@redhat.com> - 1:1.14.3-7
|
||||
- Fix broken float128 on all arches except x86_64
|
||||
- Resolves: rhbz#1688709
|
||||
resolves: #1687873
|
||||
|
||||
* Thu Apr 25 2019 Tomas Orsava <torsava@redhat.com> - 1.14.2-10
|
||||
- Bumping due to problems with modular RPM upgrade path
|
||||
- Resolves: rhbz#1695587
|
||||
* Mon Oct 01 2018 Lumír Balhar <lbalhar@redhat.com> - 1:1.14.3-6
|
||||
- Add alternatives for the f2py exacutable
|
||||
- Resolves: rhbz#1633548
|
||||
|
||||
* Tue Oct 09 2018 Lumír Balhar <lbalhar@redhat.com> - 1:1.14.2-9
|
||||
- Remove unversioned provides
|
||||
- Resolves: rhbz#1628242
|
||||
* Tue Aug 21 2018 Tomas Orsava <torsava@redhat.com> - 1:1.14.3-5
|
||||
- Switch runtime dependency of the python3-numpy-f2py package from
|
||||
python3-devel (that's now buildroot-only) to python3-libs-devel
|
||||
Resolves: rhbz#1610863
|
||||
|
||||
* Tue Oct 02 2018 Lumír Balhar <lbalhar@redhat.com> - 1:1.14.2-8
|
||||
- Fix unversioned requires/buildrequires
|
||||
- Resolves: rhbz#1628242
|
||||
* Mon Aug 06 2018 Petr Viktorin <pviktori@redhat.com> - 1:1.14.3-4
|
||||
- Remove f2py3 executable (only f2py3.6 should be provided)
|
||||
|
||||
* Tue Aug 14 2018 Lumír Balhar <lbalhar@redhat.com> - 1:1.14.2-7
|
||||
- Bring symlink f2py2 back for symlink modules
|
||||
- Resolves: rhbz#1615727
|
||||
* Wed Jul 18 2018 Nikola Forró <nforro@redhat.com> - 1:1.14.3-3
|
||||
- Build only python3 subpackages
|
||||
- Use proper upstream release tarball
|
||||
resolves: #1594350
|
||||
|
||||
* Wed Aug 08 2018 Lumír Balhar <lbalhar@redhat.com> - 1:1.14.2-6
|
||||
- Remove unversioned binaries from python2 subpackage
|
||||
- Resolves: rhbz#1613343
|
||||
* Wed May 23 2018 Nikola Forró <nforro@redhat.com> - 1:1.14.3-2
|
||||
- Make f2py script name generation work with platform-python
|
||||
related: #1580828
|
||||
|
||||
* Tue Jul 31 2018 Lumír Balhar <lbalhar@redhat.com> - 1:1.14.2-5
|
||||
- Switch python3 coditions to bcond
|
||||
|
||||
* Mon Jun 25 2018 Tomas Orsava <torsava@redhat.com> - 1:1.14.2-4
|
||||
- Use python2 macros instead of unversioned python macros
|
||||
|
||||
* Sat Apr 28 2018 Tomas Orsava <torsava@redhat.com> - 1:1.14.2-3
|
||||
- Change the shebang of f2py to the versioned /usr/bin/python2
|
||||
|
||||
* Fri Apr 27 2018 Tomas Orsava <torsava@redhat.com> - 1:1.14.2-2
|
||||
- Fix incorrect Python version guess when building on Platform-Python
|
||||
* 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
|
||||
- 1.14.2
|
||||
|
||||
Loading…
Reference in New Issue
Block a user