Compare commits

...

39 Commits

Author SHA1 Message Date
Gwyn Ciesla 4ad487d64c migrated to SPDX license 2023-03-08 15:21:14 -06:00
Yaakov Selkowitz fcc064a276 Disable tests by default in RHEL builds 2023-02-03 03:28:44 +00:00
Pavel Šimovec f24a8785f0 Generalize documentation Source link 2023-01-27 10:54:39 +01:00
Pavel Šimovec 3e29b2e597 update to 1.24.1 2023-01-26 10:12:05 +01:00
Fedora Release Engineering a289102afa Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-19 21:53:46 +00:00
Charalampos Stratakis bf76c423c4 Update to 1.23.5 2022-12-02 12:16:39 +01:00
Miro Hrončok 7c03db8b97 Use distutils from setuptools to build the package 2022-10-21 18:53:04 +02:00
Miro Hrončok e742cd26a5 Skip more tests on i686, they are too big 2022-10-21 18:53:04 +02:00
Miro Hrončok fbe6def60a Update to 1.23.4 2022-10-21 18:23:36 +02:00
Kalev Lember b8acd8cd2b Explicitly pass prefix to setup.py install
This fixes the flatpak module build which otherwise ends up installing
into the /usr prefix (instead of /app) in F37+.
2022-10-08 23:08:05 +02:00
Fedora Release Engineering b630888254 Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-22 00:56:18 +00:00
Miro Hrončok 1441f2b648 GenericAlias fixes for Python 3.11.0b4+ 2022-07-19 00:38:28 +02:00
Miro Hrončok aed47b48f7 Deselect 4 more tests on i686 2022-06-13 18:28:27 +02:00
Python Maint 089b901865 Rebuilt for Python 3.11 2022-06-13 17:26:59 +02:00
Tomáš Hrnčiar 87f4d04d95 Disable some tests so numpy builds with Python 3.11 2022-06-13 14:06:27 +02:00
Karolina Surma e0db7e60c0 Build numpy using Python's standard library distutils
We patch Python's distutils to exclude the standard paths from rpaths.
setuptools 60+ switches to its own copy of distutils by default,
which doesn't contain the patch and leads to the failed RPM build.
This behavior is overriden with the environment variable
SETUPTOOLS_USE_DISTUTILS=stdlib.
2022-03-10 09:17:49 +01:00
Karolina Surma fdc00013a1 Fix package build with setuptools >= 60.x 2022-03-07 09:57:21 +01:00
Elliott Sales de Andrade 6ba4762803 Skip rebuild when running tests
Instead use the build we just created.
2022-02-19 18:37:43 -05:00
Elliott Sales de Andrade 7c1e28760b Re-enable tests 2022-02-19 18:14:26 -05:00
Fedora Release Engineering bca3b09ec1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-20 21:31:11 +00:00
Gwyn Ciesla e144ce4bc1 1.22.0 2022-01-06 13:10:47 -06:00
Gwyn Ciesla 94f8ec0a11 1.21.5 2021-12-22 14:51:10 -06:00
Gwyn Ciesla 45b83b14c9 1.21.1 2021-08-05 11:30:46 -05:00
Fedora Release Engineering 483c5c9487 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-22 16:25:30 +00:00
Python Maint 1b604a85d1 Rebuilt for Python 3.10 2021-06-03 18:46:05 +02:00
Miro Hrončok 6135a94619 xfail TestCond.test_nan unconditionally to fix FTBFS 2021-05-08 17:30:35 +02:00
Gwyn Ciesla e0999a67ad Python 3.10 fix. 2021-05-07 13:21:45 -05:00
Miro Hrončok bd487d7d25 Fix for Python 3.10.0b1+
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1958052
2021-05-07 11:43:02 +02:00
Nikola Forró 837eabab5c Fix build requirements, hypothesis is a test dependency 2021-02-12 15:52:57 +01:00
Gwyn Ciesla c384ae4c92 1.20.1 2021-02-08 09:27:03 -06:00
Gwyn Ciesla 7706b2b2c1 Sources 2021-02-01 10:04:59 -06:00
Gwyn Ciesla d9d4c7ceaf 1.20.0 final. 2021-02-01 09:38:53 -06:00
Fedora Release Engineering 432691bcac - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-26 21:47:02 +00:00
Gwyn Ciesla a9f53565fc Fix release. 2021-01-04 11:53:06 -06:00
Gwyn Ciesla 1c6c512485 Comment out url. 2021-01-04 11:49:02 -06:00
Nikola Forró 06a1578991 Generate the main dispatcher config header into the build dir 2021-01-04 18:42:15 +01:00
Gwyn Ciesla 6479234f82 Sources. 2020-12-28 11:40:46 -06:00
Gwyn Ciesla dcf42cdb7a 1.20.0 rc2 2020-12-28 11:31:47 -06:00
Tomas Orsava 7ebadbd30e Label python3-hypothesis as a test build dependency
See INSTALL.rst.txt for confirmation
2020-12-21 20:03:40 +01:00
4 changed files with 120 additions and 154 deletions

9
.gitignore vendored
View File

@ -82,3 +82,12 @@ numpy-1.4.1.tar.gz
/numpy-html.zip
/numpy-1.19.3.tar.gz
/numpy-1.19.4.tar.gz
/numpy-1.20.0rc2.tar.gz
/numpy-1.20.0.tar.gz
/numpy-1.20.1.tar.gz
/numpy-1.21.1.tar.gz
/numpy-1.21.5.tar.gz
/numpy-1.22.0.tar.gz
/numpy-1.23.4.tar.gz
/numpy-1.23.5.tar.gz
/numpy-1.24.1.tar.gz

View File

@ -1,135 +0,0 @@
From f73d993bcb03701f4e9146005a65eb482689140a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nikola=20Forr=C3=B3?= <nforro@redhat.com>
Date: Mon, 26 Oct 2020 18:54:22 +0100
Subject: [PATCH] TST: Make test suite work in FIPS (140-2) Mode
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Tests using MD5 algorithms fail in FIPS Mode because MD5 is not FIPS
compliant.
Mark usages of MD5 in test suite as not being used for security
purposes to overcome that.
Signed-off-by: Nikola Forró <nforro@redhat.com>
---
numpy/core/tests/test_regression.py | 2 +-
numpy/random/tests/test_generator_mt19937.py | 10 +++++-----
numpy/random/tests/test_random.py | 4 ++--
numpy/random/tests/test_randomstate.py | 6 +++---
4 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/numpy/core/tests/test_regression.py b/numpy/core/tests/test_regression.py
index 2e731d4fa..4633174d9 100644
--- a/numpy/core/tests/test_regression.py
+++ b/numpy/core/tests/test_regression.py
@@ -1509,7 +1509,7 @@ class TestRegression:
from hashlib import md5
x = np.array([1, 2, 3], dtype=np.dtype('<i4'))
- assert_equal(md5(x).hexdigest(), '2a1dd1e1e59d0a384c26951e316cd7e6')
+ assert_equal(md5(x, usedforsecurity=False).hexdigest(), '2a1dd1e1e59d0a384c26951e316cd7e6')
def test_0d_string_scalar(self):
# Bug #1436; the following should succeed
diff --git a/numpy/random/tests/test_generator_mt19937.py b/numpy/random/tests/test_generator_mt19937.py
index 6be7d852b..9b166e3a2 100644
--- a/numpy/random/tests/test_generator_mt19937.py
+++ b/numpy/random/tests/test_generator_mt19937.py
@@ -507,14 +507,14 @@ class TestIntegers:
val = random.integers(0, 6 - endpoint, size=1000, endpoint=endpoint,
dtype=dt).byteswap()
- res = hashlib.md5(val).hexdigest()
+ res = hashlib.md5(val, usedforsecurity=False).hexdigest()
assert_(tgt[np.dtype(dt).name] == res)
# bools do not depend on endianness
random = Generator(MT19937(1234))
val = random.integers(0, 2 - endpoint, size=1000, endpoint=endpoint,
dtype=bool).view(np.int8)
- res = hashlib.md5(val).hexdigest()
+ res = hashlib.md5(val, usedforsecurity=False).hexdigest()
assert_(tgt[np.dtype(bool).name] == res)
def test_repeatability_broadcasting(self, endpoint):
@@ -910,7 +910,7 @@ class TestRandomDist:
actual = random.choice(10000, 5000, replace=False)
if sys.byteorder != 'little':
actual = actual.byteswap()
- res = hashlib.md5(actual.view(np.int8)).hexdigest()
+ res = hashlib.md5(actual.view(np.int8), usedforsecurity=False).hexdigest()
assert_(choice_hash == res)
def test_bytes(self):
@@ -2436,7 +2436,7 @@ def test_jumped(config):
key = mt19937.state["state"]["key"]
if sys.byteorder == 'big':
key = key.byteswap()
- md5 = hashlib.md5(key)
+ md5 = hashlib.md5(key, usedforsecurity=False)
assert mt19937.state["state"]["pos"] == config["initial"]["pos"]
assert md5.hexdigest() == config["initial"]["key_md5"]
@@ -2444,7 +2444,7 @@ def test_jumped(config):
key = jumped.state["state"]["key"]
if sys.byteorder == 'big':
key = key.byteswap()
- md5 = hashlib.md5(key)
+ md5 = hashlib.md5(key, usedforsecurity=False)
assert jumped.state["state"]["pos"] == config["jumped"]["pos"]
assert md5.hexdigest() == config["jumped"]["key_md5"]
diff --git a/numpy/random/tests/test_random.py b/numpy/random/tests/test_random.py
index 276b5bc81..e49251af3 100644
--- a/numpy/random/tests/test_random.py
+++ b/numpy/random/tests/test_random.py
@@ -233,13 +233,13 @@ class TestRandint:
else:
val = self.rfunc(0, 6, size=1000, dtype=dt).byteswap()
- res = hashlib.md5(val.view(np.int8)).hexdigest()
+ res = hashlib.md5(val.view(np.int8), usedforsecurity=False).hexdigest()
assert_(tgt[np.dtype(dt).name] == res)
# bools do not depend on endianness
np.random.seed(1234)
val = self.rfunc(0, 2, size=1000, dtype=bool).view(np.int8)
- res = hashlib.md5(val).hexdigest()
+ res = hashlib.md5(val, usedforsecurity=False).hexdigest()
assert_(tgt[np.dtype(bool).name] == res)
def test_int64_uint64_corner_case(self):
diff --git a/numpy/random/tests/test_randomstate.py b/numpy/random/tests/test_randomstate.py
index 23dbbed6a..aa53d9322 100644
--- a/numpy/random/tests/test_randomstate.py
+++ b/numpy/random/tests/test_randomstate.py
@@ -341,13 +341,13 @@ class TestRandint:
else:
val = self.rfunc(0, 6, size=1000, dtype=dt).byteswap()
- res = hashlib.md5(val.view(np.int8)).hexdigest()
+ res = hashlib.md5(val.view(np.int8), usedforsecurity=False).hexdigest()
assert_(tgt[np.dtype(dt).name] == res)
# bools do not depend on endianness
random.seed(1234)
val = self.rfunc(0, 2, size=1000, dtype=bool).view(np.int8)
- res = hashlib.md5(val).hexdigest()
+ res = hashlib.md5(val, usedforsecurity=False).hexdigest()
assert_(tgt[np.dtype(bool).name] == res)
@pytest.mark.skipif(np.iinfo('l').max < 2**32,
@@ -1987,7 +1987,7 @@ def test_integer_repeat(int_func):
val = f(*args, size=1000000)
if sys.byteorder != 'little':
val = val.byteswap()
- res = hashlib.md5(val.view(np.int8)).hexdigest()
+ res = hashlib.md5(val.view(np.int8), usedforsecurity=False).hexdigest()
assert_(res == md5)
--
2.26.2

View File

@ -1,8 +1,8 @@
#uncomment next line for a release candidate or a beta
##%global relc rc1
#%%global relc rc1
# Simple way to disable tests
%if 0%{?flatpak}
%if 0%{?flatpak} || 0%{?rhel}
%bcond_with tests
%else
%bcond_without tests
@ -19,18 +19,16 @@
%global modname numpy
Name: numpy
Version: 1.19.4
Release: 1%{?dist}
Version: 1.24.1
Release: 3%{?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
License: BSD-3-Clause AND Apache-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
Patch0: numpy-1.19.2-FIPS.patch
Source1: https://numpy.org/doc/%(echo %{version} | cut -d. -f1-2)/numpy-html.zip
%description
NumPy is a general-purpose array-processing package designed to
@ -48,7 +46,7 @@ this package is a version of f2py that works properly with NumPy.
%package -n python3-numpy
Summary: A fast multidimensional array facility for Python
License: BSD
License: BSD-3-Clause
%{?python_provide:%python_provide python3-numpy}
Provides: libnpymath-static = %{epoch}:%{version}-%{release}
Provides: libnpymath-static%{?_isa} = %{epoch}:%{version}-%{release}
@ -59,14 +57,16 @@ Obsoletes: numpy < 1:1.10.1-3
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-Cython
BuildRequires: gcc-gfortran gcc
BuildRequires: gcc-gfortran gcc gcc-c++
BuildRequires: lapack-devel
BuildRequires: python3-hypothesis
%if %{with tests}
BuildRequires: python3-hypothesis
BuildRequires: python3-pytest
BuildRequires: python3-test
BuildRequires: python3-typing-extensions
%endif
BuildRequires: %{blaslib}-devel
BuildRequires: chrpath
%description -n python3-numpy
NumPy is a general-purpose array-processing package designed to
@ -136,7 +136,7 @@ popd
env OPENBLAS=%{_libdir} \
FFTW=%{_libdir} BLAS=%{_libdir} \
LAPACK=%{_libdir} CFLAGS="%{optflags}" \
%{__python3} setup.py install --root %{buildroot}
%{__python3} setup.py install --root %{buildroot} --prefix=%{_prefix}
pushd %{buildroot}%{_bindir} &> /dev/null
ln -s f2py3 f2py.numpy
popd &> /dev/null
@ -145,15 +145,25 @@ popd &> /dev/null
mkdir -p %{buildroot}%{_includedir}
ln -s %{python3_sitearch}/%{name}/core/include/numpy/ %{buildroot}%{_includedir}/numpy
# distutils from setuptools don't have the patch that was created to avoid standard runpath here
# we strip it manually instead
# ERROR 0001: file '...' contains a standard runpath '/usr/lib64' in [/usr/lib64]
chrpath --delete %{buildroot}%{python3_sitearch}/%{name}/core/_multiarray_umath.*.so
chrpath --delete %{buildroot}%{python3_sitearch}/%{name}/linalg/lapack_lite.*.so
chrpath --delete %{buildroot}%{python3_sitearch}/%{name}/linalg/_umath_linalg.*.so
%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
export PYTHONPATH=%{buildroot}%{python3_sitearch}
# test_ppc64_ibm_double_double128 is unnecessary now that ppc64le has switched long doubles to IEEE format.
# https://github.com/numpy/numpy/issues/21094
%ifarch %{ix86}
# Weird RuntimeWarnings on i686, similar to https://github.com/numpy/numpy/issues/13173
# Some tests also overflow on 32bit
%global ix86_k and not test_vector_matrix_values and not test_matrix_vector_values and not test_identityless_reduction_huge_array and not (TestKind and test_all)
%endif
python3 runtests.py --no-build -- -ra -k 'not test_ppc64_ibm_double_double128 %{?ix86_k}'
%endif
@ -181,6 +191,11 @@ python3 runtests.py
%{_includedir}/numpy
%{python3_sitearch}/%{name}/__init__.pxd
%{python3_sitearch}/%{name}/__init__.cython-30.pxd
%{python3_sitearch}/%{name}/py.typed
%{python3_sitearch}/%{name}/typing/
%{python3_sitearch}/%{name}/array_api/
%{python3_sitearch}/%{name}/_pyinstaller/
%{python3_sitearch}/%{name}/_typing/
%files -n python3-numpy-f2py
%{_bindir}/f2py
@ -194,6 +209,83 @@ python3 runtests.py
%changelog
* Wed Mar 08 2023 Gwyn Ciesla <gwync@protonmail.com> - 1:1.24.1-3
- migrated to SPDX license
* Fri Jan 27 2023 Pavel Simovec <psimovec@redhat.com> - 1:1.24.1-2
- Generalize documentation Source link
- Add forgotten documentation file
* Thu Jan 26 2023 Pavel Simovec <psimovec@redhat.com> - 1:1.24.1-1
- Update to 1.24.1
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.23.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Fri Dec 02 2022 Charalampos Stratakis <cstratak@redhat.com> - 1:1.23.5-1
- Update to 1.23.5
* Fri Oct 21 2022 Miro Hrončok <mhroncok@redhat.com> - 1:1.23.4-1
- Update to 1.23.4
- Use distutils from setuptools to build the package
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.22.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Mon Jul 18 2022 Miro Hrončok <mhroncok@redhat.com> - 1:1.22.0-6
- GenericAlias fixes for Python 3.11.0b4+
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 1:1.22.0-5
- Rebuilt for Python 3.11
* Mon Mar 07 2022 Karolina Surma <ksurma@redhat.com> - 1:1.22.0-4
- Work around the test failures with setuptools >= 60.x by using the Python's
standard library distutils
- Build numpy using Python's standard library distutils
* Sat Feb 19 2022 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1:1.22.0-3
- Re-enable tests
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.22.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Thu Jan 06 2022 Gwyn Ciesla <gwync@protonmail.com> - 1:1.22.0-1
- 1.22.0
* Wed Dec 22 2021 Gwyn Ciesla <gwync@protonmail.com> - 1:1.21.5-1
- 1.21.5
* Thu Aug 05 2021 Gwyn Ciesla <gwync@protonmail.com> - 1:1.21.1-1
- 1.21.1, disabing tests as they depend on .coveragerc, not shipped.
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.20.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Thu Jun 03 2021 Python Maint <python-maint@redhat.com> - 1:1.20.1-4
- Rebuilt for Python 3.10
* Fri May 07 2021 Gwyn Ciesla <gwync@protonmail.com> - 1:1.20.1-3
- Python 3.10 fix.
- Xfail TestCond.test_nan.
* Fri Feb 12 2021 Nikola Forró <nforro@redhat.com> - 1:1.20.1-2
- Fix build requirements, hypothesis is a test dependency
* 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

View File

@ -1,2 +1,2 @@
SHA512 (numpy-1.19.4.tar.gz) = 50529dd1ae64e578c35ecfd19cb3a601b32fccdf88ca2c1161bc13e57e20bbbb58d3ac44e3afa80967c537338246425dfe9d57dd9f04d58346e5be605c529726
SHA512 (numpy-html.zip) = 4a421636523424a0703290b6a0ba53b85a9a9e8a6256363e2481f1c02ae278825c09f2f13d39e99f8aae21f57a4978723f3fc690693520f8c3b45a5b4c5a38ab
SHA512 (numpy-1.24.1.tar.gz) = 34cafe2b0776f47887e3fa01beb9f4d427deec650d0b1a2658674a9c304e6429fdbea10945ba515431ca3fca5e70c56344220b9f9055de6659666b2df272d0fb
SHA512 (numpy-html.zip) = 9c38a65fd33be28cec9a27d2b23b50cb215fe7fd775f467a78a21f4649466868a24b6004ebf1b31e0eca62c2e5582e89923ff2bb4b3ae70dfa9292672e7b1eca