Compare commits

...

No commits in common. 'c9' and 'i8c-stream-3.8_bootstrap' have entirely different histories.

4
.gitignore vendored

@ -1,2 +1,2 @@
SOURCES/numpy-1.20.1.tar.gz
SOURCES/numpy-html.zip
SOURCES/numpy-1.17.3.tar.gz
SOURCES/numpy-html-1.17.0.zip

@ -1,2 +1,2 @@
4e928ed206e84d8c26182fbe52a9dd5485136546 SOURCES/numpy-1.20.1.tar.gz
035c72d0bb7430cebc242f229f5cc05a07caa5d9 SOURCES/numpy-html.zip
7b088aa858c4616a681f2a81cb2ebbc7dfee5dc6 SOURCES/numpy-1.17.3.tar.gz
da515ef07b679cd02b43f659420733c51e84e3c5 SOURCES/numpy-html-1.17.0.zip

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

@ -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,29 +1,30 @@
#uncomment next line for a release candidate or a beta
#%%global relc rc1
%bcond_with tests
%if 0%{?fedora} >= 33 || 0%{?rhel} >= 9
%global blaslib flexiblas
%global blasvar %{nil}
%else
%global blaslib openblas
%global blasvar p
%endif
# Simple way to disable tests
%bcond_without tests
%global modname numpy
Name: numpy
Version: 1.20.1
Release: 5%{?dist}
Epoch: 1
Version: 1.17.3
Release: 7%{?dist}
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
Source1: https://numpy.org/doc/1.19/numpy-html.zip
Source1: https://docs.scipy.org/doc/numpy/numpy-html-1.17.0.zip
# Upstream issue: https://github.com/numpy/numpy/issues/13173
Patch0: 0001-Remove-failing-test-from-linalg-module.patch
# Upstream PR: https://github.com/numpy/numpy/pull/18943
Patch1: 0002-xfail-TestCond.test_nan_unonditionally.patch
# 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
NumPy is a general-purpose array-processing package designed to
@ -38,30 +39,30 @@ 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
%package -n python%{python3_pkgversion}-numpy
Summary: A fast multidimensional array facility for Python
License: BSD
%{?python_provide:%python_provide python3-numpy}
Provides: libnpymath-static = %{epoch}:%{version}-%{release}
Provides: libnpymath-static%{?_isa} = %{epoch}:%{version}-%{release}
Provides: numpy = %{epoch}:%{version}-%{release}
Provides: numpy%{?_isa} = %{epoch}:%{version}-%{release}
Obsoletes: numpy < 1:1.10.1-3
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-Cython
%{?python_provide:%python_provide python%{python3_pkgversion}-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: python3-hypothesis
BuildRequires: python3-pytest
BuildRequires: python3-test
BuildRequires: python%{python3_pkgversion}-pytest
%endif
BuildRequires: %{blaslib}-devel
%ifarch %{openblas_arches}
BuildRequires: openblas-devel
%else
BuildRequires: atlas-devel
%endif
Requires: python%{python3_pkgversion}-setuptools
%description -n python3-numpy
%description -n python%{python3_pkgversion}-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
@ -73,47 +74,64 @@ 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
%package -n python%{python3_pkgversion}-numpy-f2py
Summary: f2py for numpy
Requires: python3-numpy%{?_isa} = %{epoch}:%{version}-%{release}
Requires: python3-devel
Provides: python3-f2py = %{version}-%{release}
Obsoletes: python3-f2py <= 2.45.241_1927
%{?python_provide:%python_provide python3-numpy-f2py}
Provides: f2py = %{epoch}:%{version}-%{release}
Provides: numpy-f2py = %{epoch}:%{version}-%{release}
Obsoletes: numpy-f2py < 1:1.10.1-3
%description -n python3-numpy-f2py
Requires: python%{python3_pkgversion}-numpy%{?_isa} = %{version}-%{release}
Requires: python%{python3_pkgversion}-devel
Provides: python%{python3_pkgversion}-f2py = %{version}-%{release}
%{?python_provide:%python_provide python%{python3_pkgversion}-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.
%package -n python3-numpy-doc
%package -n python%{python3_pkgversion}-numpy-doc
Summary: Documentation for numpy
Requires: python3-numpy = %{epoch}:%{version}-%{release}
Requires: python%{python3_pkgversion}-numpy = %{version}-%{release}
BuildArch: noarch
%description -n python3-numpy-doc
%description -n python%{python3_pkgversion}-numpy-doc
This package provides the complete documentation for NumPy.
%prep
%autosetup -n %{name}-%{version} -p1
%autosetup -n %{name}-%{version}%{?relc} -p1
# Force re-cythonization (ifed for PKG-INFO presence in setup.py)
rm PKG-INFO
# openblas is provided by flexiblas by default; otherwise,
%ifarch %{openblas_arches}
# Use openblas pthreads as recommended by upstream (see comment in site.cfg.example)
cat >> site.cfg <<EOF
[openblas]
libraries = %{blaslib}%{blasvar}
libraries = openblasp
library_dirs = %{_libdir}
EOF
%else
# Atlas 3.10 library names
%if 0%{?fedora} >= 21 || 0%{?rhel} > 7
cat >> site.cfg <<EOF
[atlas]
library_dirs = %{_libdir}/atlas
atlas_libs = satlas
EOF
%endif
%endif
%build
%set_build_flags
%ifarch %{openblas_arches}
env OPENBLAS=%{_libdir} \
%else
env ATLAS=%{_libdir} \
%endif
BLAS=%{_libdir} \
LAPACK=%{_libdir} CFLAGS="%{optflags}" \
%{__python3} setup.py build
@ -126,34 +144,51 @@ popd
#%%{__python3} 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
ln -s f2py3 f2py.numpy
# Remove unversioned binaries
rm f2py
rm f2py3
popd &> /dev/null
#symlink for includes, BZ 185079
mkdir -p %{buildroot}%{_includedir}
ln -s %{python3_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
%if %{with tests}
%ifarch ppc64le
# https://github.com/numpy/numpy/issues/14357
python3 runtests.py -- -k 'not test_einsum_sums_cfloat64'
%else
python3 runtests.py
%if "%{_arch}" != "s390x" && "%{_arch}" != "ppc64le"
%{__python3} runtests.py -v
%endif
%endif
%files -n python3-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
%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
@ -171,114 +206,41 @@ python3 runtests.py
%{python3_sitearch}/%{name}/polynomial
%{python3_sitearch}/%{name}-*.egg-info
%exclude %{python3_sitearch}/%{name}/LICENSE.txt
%{_includedir}/numpy
%{python3_sitearch}/%{name}/__init__.pxd
%{python3_sitearch}/%{name}/__init__.cython-30.pxd
%{python3_sitearch}/%{name}/py.typed
%{python3_sitearch}/%{name}/typing/
%files -n python3-numpy-f2py
%{_bindir}/f2py
%{_bindir}/f2py3
%{_bindir}/f2py.numpy
%files -n python%{python3_pkgversion}-numpy-f2py
%{_bindir}/f2py%{python3_version}
%ghost %{_bindir}/f2py3
%{python3_sitearch}/%{name}/f2py
%files -n python3-numpy-doc
%files -n python%{python3_pkgversion}-numpy-doc
%doc docs/*
%changelog
* Tue Feb 08 2022 Tomas Orsava <torsava@redhat.com> - 1.20.1-5
- Add automatically generated Obsoletes tag with the python39- prefix
for smoother upgrade from RHEL8
- Related: rhbz#1990421
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 1:1.20.1-4
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Fri Apr 16 2021 Nikola Forró <nforro@redhat.com> - 1:1.20.1-3
- Disable tests by default (#1928123)
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1:1.20.1-2
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Mon Feb 08 2021 Gwyn Ciesla <gwync@protonmail.com> 1:1.20.1-1
- 1.21.1
* Mon Feb 01 2021 Gwyn Ciesla <gwync@protonmail.com> - 1:1.20.0-1
- 1.20.0 final.
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.20.0-0.2.rc2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Mon Jan 04 2021 Nikola Forró <nforro@redhat.com> - 1:1.20.0-0.1.rc2
- Generate the main dispatcher config header into the build dir
* Mon Dec 28 2020 Gwyn Ciesla <gwync@protonmail.com> - 1:1.20.0-0.rc2
- 1.20.0 rc2
* Tue Nov 03 2020 Gwyn Ciesla <gwync@protonmail.com> - 1:1.19.4-1
- 1.19.4
* Thu Oct 29 2020 Gwyn Ciesla <gwync@protonmail.com> - 1:1.19.3-1
- 1.19.3
* Tue Oct 27 2020 Nikola Forró <nforro@redhat.com> - 1:1.19.2-2
- Make test suite work in FIPS (140-2) Mode
* Thu Sep 10 2020 Gwyn Ciesla <gwync@protonmail.com> - 1:1.19.2-1
- 1.19.2
* Sun Aug 16 2020 Iñaki Úcar <iucar@fedoraproject.org> - 1:1.19.1-3
- https://fedoraproject.org/wiki/Changes/FlexiBLAS_as_BLAS/LAPACK_manager
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.19.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Wed Jul 22 2020 Gwyn Ciesla <gwync@protonmail.com> - 1:1.19.1-1
- 1.19.1
* Thu Jul 16 2020 Gwyn Ciesla <gwync@protonmail.com> - 1:1.19.0-2
- Assume old-style numpy provides from python2-numpy
* Mon Jun 22 2020 Gwyn Ciesla <gwync@protonmail.com> - 1:1.19.0-1
- 1.19.0 final.
* Mon Jun 01 2020 Gwyn Ciesla <gwync@protonmail.com> - 1:1.19.0-0.rc2
- 1.19.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
* Fri May 24 2024 MSVSphere Packaging Team <packager@msvsphere-os.ru> - 1.17.3-7
- Rebuilt for MSVSphere 8.10
* Wed Mar 18 2020 Gwyn Ciesla <gwync@protonmail.com> - 1:1.18.2-1
- 1.18.2
* Mon Jul 17 2023 Charalampos Stratakis <cstratak@redhat.com> - 1.17.3-7
- Skip TestCond.test_nan
- Resolves: rhbz#2217862
* 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 Aug 02 2021 Tomas Orsava <torsava@redhat.com> - 1.17.3-6
- Adjusted the postun scriptlets to enable upgrading to RHEL 9
- Resolves: rhbz#1933055
* Mon Jan 06 2020 Gwyn Ciesla <gwync@protonmail.com> - 1:1.18.1-1
- 1.18.1
* Mon Mar 09 2020 Tomas Orsava <torsava@redhat.com> - 1.17.3-5
- Implement the alternatives system for the executables
- Resolves: rhbz#1807041
* Mon Dec 30 2019 Gwyn Ciesla <gwync@protonmail.com> - 1:1.18.0-1
- 1.18.0
* Thu Dec 12 2019 Tomas Orsava <torsava@redhat.com> - 1.17.3-4
- Exclude unsupported i686 arch
* 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
* Mon Nov 25 2019 Lumír Balhar <lbalhar@redhat.com> - 1.17.3-3
- Removed test which fails due to outdated openblas
* Mon Nov 11 2019 Gwyn Ciesla <gwync@protonmail.com> - 1:1.17.4-1
- 1.17.4
* Wed Nov 20 2019 Lumír Balhar <lbalhar@redhat.com> - 1.17.3-2
- Adjusted for Python 3.8 module in RHEL 8
- Removed the Epoch from Fedora
* Fri Oct 18 2019 Gwyn Ciesla <gwync@protonmail.com> - 1:1.17.3-1
- 1.17.3

Loading…
Cancel
Save