Compare commits

...

No commits in common. 'c9' and 'i10cs' have entirely different histories.
c9 ... i10cs

2
.gitignore vendored

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

@ -1,2 +1,2 @@
4e928ed206e84d8c26182fbe52a9dd5485136546 SOURCES/numpy-1.20.1.tar.gz
035c72d0bb7430cebc242f229f5cc05a07caa5d9 SOURCES/numpy-html.zip
723d7540a691af4c93197565cb262dd87dcf4df0 SOURCES/numpy-1.26.4.tar.gz
343055ea74387b89c4c1c09410e20acfb76b3091 SOURCES/numpy-html.zip

@ -0,0 +1,15 @@
diff --git c/numpy/f2py/tests/test_compile_function.py i/numpy/f2py/tests/test_compile_function.py
index 3c16f3198..e38fed898 100644
--- c/numpy/f2py/tests/test_compile_function.py
+++ i/numpy/f2py/tests/test_compile_function.py
@@ -17,6 +17,10 @@ def setup_module():
pytest.skip("Needs C compiler")
if not util.has_f77_compiler():
pytest.skip("Needs FORTRAN 77 compiler")
+ if sys.version_info[:2] >= (3, 12):
+ pytest.skip(
+ "F2PY compilation tests do not work with meson."
+ )
# extra_args can be a list (since gh-11937) or string.

@ -0,0 +1,28 @@
From d9155244ea06705ebd9194cc7a621e82316b61ba Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
Date: Mon, 20 Nov 2023 11:36:36 +0100
Subject: [PATCH] MAINT: Replace deprecated ctypes.ARRAY(item_type, size) with
item_type * size
See https://github.com/python/cpython/issues/105733
---
numpy/core/tests/test_ufunc.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/numpy/core/tests/test_ufunc.py b/numpy/core/tests/test_ufunc.py
index a7401ff616f..fc1fd5af169 100644
--- a/numpy/core/tests/test_ufunc.py
+++ b/numpy/core/tests/test_ufunc.py
@@ -2985,9 +2985,9 @@ def test_resolve_dtypes_reduction_errors(self):
reason="`ctypes.pythonapi` required for capsule unpacking.")
def test_loop_access(self):
# This is a basic test for the full strided loop access
- data_t = ct.ARRAY(ct.c_char_p, 2)
- dim_t = ct.ARRAY(ct.c_ssize_t, 1)
- strides_t = ct.ARRAY(ct.c_ssize_t, 2)
+ data_t = ct.c_char_p * 2
+ dim_t = ct.c_ssize_t * 1
+ strides_t = ct.c_ssize_t * 2
strided_loop_t = ct.CFUNCTYPE(
ct.c_int, ct.c_void_p, data_t, dim_t, strides_t, ct.c_void_p)

@ -1,7 +1,12 @@
#uncomment next line for a release candidate or a beta
#%%global relc rc1
# Simple way to disable tests
%if 0%{?flatpak} || 0%{?rhel}
%bcond_with tests
%else
%bcond_without tests
%endif
%if 0%{?fedora} >= 33 || 0%{?rhel} >= 9
%global blaslib flexiblas
@ -14,16 +19,26 @@
%global modname numpy
Name: numpy
Version: 1.20.1
Version: 1.26.4
Release: 5%{?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
# Everything is BSD-3-Clause except...
# numpy/core/include/numpy/libdivide: Zlib OR BSL-1.0
# numpy/core/src/multiarray/dragon4.*: MIT
# numpy/random/src/mt19937/randomkit.h: MIT
# numpy/random/src/pcg64: MIT AND Apache-2.0
# numpy/random/src/sfc64: MIT
License: BSD-3-Clause AND MIT AND Apache-2.0 AND (Zlib OR BSL-1.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://numpy.org/doc/%(echo %{version} | cut -d. -f1-2)/numpy-html.zip
Patch0: f2py_test.patch
# Python 3.13: Replace deprecated ctypes.ARRAY(item_type, size) with item_type * size
# Upstream PR: https://github.com/numpy/numpy/pull/25198
Patch4: replace-deprecated-ctypes.ARRAY.patch
%description
NumPy is a general-purpose array-processing package designed to
@ -41,7 +56,6 @@ 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
%{?python_provide:%python_provide python3-numpy}
Provides: libnpymath-static = %{epoch}:%{version}-%{release}
Provides: libnpymath-static%{?_isa} = %{epoch}:%{version}-%{release}
@ -50,16 +64,24 @@ Provides: numpy%{?_isa} = %{epoch}:%{version}-%{release}
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
%if 0%{?fedora}
BuildRequires: libdivide-devel
%endif
BuildRequires: ninja-build
%if %{with tests}
BuildRequires: python3-hypothesis
BuildRequires: python3-pytest
BuildRequires: python3-test
BuildRequires: python3-typing-extensions
%endif
BuildRequires: %{blaslib}-devel
BuildRequires: chrpath
%if !0%{?fedora}
Provides: bundled(libdivide) = 3.0
%endif
%description -n python3-numpy
NumPy is a general-purpose array-processing package designed to
@ -99,8 +121,9 @@ This package provides the complete documentation for NumPy.
%prep
%autosetup -n %{name}-%{version} -p1
# Force re-cythonization (ifed for PKG-INFO presence in setup.py)
rm PKG-INFO
# Enable build with Python 3.13
# See: https://github.com/numpy/numpy/commit/82d7657ce39c97fcfd86e1a5acee8b5d00682169
sed -i 's/requires-python = ">=3.9,<3.13"/requires-python = ">=3.9"/' pyproject.toml
# openblas is provided by flexiblas by default; otherwise,
# Use openblas pthreads as recommended by upstream (see comment in site.cfg.example)
@ -110,13 +133,31 @@ libraries = %{blaslib}%{blasvar}
library_dirs = %{_libdir}
EOF
%if 0%{?fedora}
# Unbundle libdivide
sed -i 's,"numpy/libdivide/libdivide.h",<libdivide.h>,' \
numpy/core/src/umath/loops.c.src
%endif
%generate_buildrequires
%pyproject_buildrequires -R -Csetup-args=-Dblas=flexiblas -Csetup-args=-Dlapack=lapack
%build
%set_build_flags
# Allow libdivide to use vector instructions where possible
%ifarch x86_64
%if 0%{?eln} || 0%{?rhel} > 9
# x86_64-v3
sed -i '/libdivide\.h/i#define LIBDIVIDE_AVX2' numpy/core/src/umath/loops.c.src
%else
# x86_64-v1 or x86_64-v2
sed -i '/libdivide\.h/i#define LIBDIVIDE_SSE2' numpy/core/src/umath/loops.c.src
%endif
%elifarch aarch64
sed -i '/libdivide\.h/i#define LIBDIVIDE_NEON' numpy/core/src/umath/loops.c.src
%endif
env OPENBLAS=%{_libdir} \
BLAS=%{_libdir} \
LAPACK=%{_libdir} CFLAGS="%{optflags}" \
%{__python3} setup.py build
%pyproject_wheel -Csetup-args=-Dblas=flexiblas -Csetup-args=-Dlapack=lapack
%install
mkdir docs
@ -124,13 +165,10 @@ pushd docs
unzip %{SOURCE1}
popd
#%%{__python3} setup.py install -O1 --skip-build --root %%{buildroot}
# skip-build currently broken, this works around it for now
env OPENBLAS=%{_libdir} \
FFTW=%{_libdir} BLAS=%{_libdir} \
LAPACK=%{_libdir} CFLAGS="%{optflags}" \
%{__python3} setup.py install --root %{buildroot}
%pyproject_install
pushd %{buildroot}%{_bindir} &> /dev/null
ln -s f2py f2py3
ln -s f2py f2py%{python3_version}
ln -s f2py3 f2py.numpy
popd &> /dev/null
@ -138,15 +176,30 @@ popd &> /dev/null
mkdir -p %{buildroot}%{_includedir}
ln -s %{python3_sitearch}/%{name}/core/include/numpy/ %{buildroot}%{_includedir}/numpy
%if 0%{?fedora}
rm %{buildroot}%{python3_sitearch}/numpy/core/include/numpy/random/libdivide.h
%endif
%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
# test_deprecate_... fail on Python 3.13+ due to docstrings being dedented
# Upstream has removed the tests in git HEAD.
%if v"0%{python3_version}" >= v"3.13"
%global py313_k and not test_deprecate_help_indentation and not test_deprecate_preserve_whitespace
%endif
%ifnarch %{ix86}
python3 runtests.py --no-build -- -ra -k 'not test_ppc64_ibm_double_double128 %{?ix86_k} %{?py313_k}' \
-W "ignore:pkg_resources is deprecated as an API::pkg_resources"
%endif
%endif
@ -157,7 +210,6 @@ python3 runtests.py
%dir %{python3_sitearch}/%{name}
%{python3_sitearch}/%{name}/*.py*
%{python3_sitearch}/%{name}/core
%{python3_sitearch}/%{name}/distutils
%{python3_sitearch}/%{name}/doc
%{python3_sitearch}/%{name}/fft
%{python3_sitearch}/%{name}/lib
@ -169,13 +221,17 @@ python3 runtests.py
%{python3_sitearch}/%{name}/compat
%{python3_sitearch}/%{name}/matrixlib
%{python3_sitearch}/%{name}/polynomial
%{python3_sitearch}/%{name}-*.egg-info
%exclude %{python3_sitearch}/%{name}/LICENSE.txt
%{python3_sitearch}/%{name}-*.dist-info
%{_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}/_core/
%{python3_sitearch}/%{name}/_pyinstaller/
%{python3_sitearch}/%{name}/_typing/
%{python3_sitearch}/%{name}/_utils/
%files -n python3-numpy-f2py
%{_bindir}/f2py
@ -189,20 +245,123 @@ python3 runtests.py
%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
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 1:1.26.4-5
- Bump release for October 2024 mass rebuild:
Resolves: RHEL-64018
* Fri Oct 25 2024 MSVSphere Packaging Team <packager@msvsphere-os.ru> - 1:1.26.4-4
- Rebuilt for MSVSphere 10
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 1:1.26.4-4
- Bump release for June 2024 mass rebuild
* Wed Jun 05 2024 Lukáš Zaoral <lzaoral@redhat.com> - 1:1.26.4-3
- remove redundant patchelf dependency (RHEL-36334)
* Fri Mar 15 2024 Jerry James <loganjerry@gmail.com> - 1:1.26.4-2
- Unbundle libdivide in Fedora
- Let libdivide use vector instructions when possible
* Mon Feb 26 2024 Gwyn Ciesla <gwync@protonmail.com> - 1:1.26.4-1
- 1.26.4
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.26.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.26.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Mon Jan 15 2024 Miro Hrončok <mhroncok@redhat.com> - 1:1.26.2-2
- Add missing licenses to the License tag
* Tue Dec 26 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 1:1.26.2-1
- 1.26.2
* Mon Nov 20 2023 Gwyn Ciesla <gwync@protonmail.com> - 1:1.26.0-2
- Fix FTBFS with Python 3.13.
* Tue Sep 19 2023 Gwyn Ciesla <gwync@protonmail.com> - 1:1.26.0-1
- 1.26.0
* Mon Jul 31 2023 Miro Hrončok <mhroncok@redhat.com> - 1:1.24.4-2
- Backport support for Cython 3
* Tue Jul 18 2023 Gwyn Ciesla <gwync@protonmail.com> - 1:1.24.4-1
- 1.24.4
* Wed Jul 05 2023 Scott Talbert <swt@techie.net> - 1:1.24.3-4
- Fix FTBFS with Python 3.12
* Fri Jun 16 2023 Python Maint <python-maint@redhat.com> - 1:1.24.3-3
- Rebuilt for Python 3.12
* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 1:1.24.3-2
- Bootstrap for Python 3.12
* Mon Apr 24 2023 Gwyn Ciesla <gwync@protonmail.com> - 1:1.24.3-1
- 1.24.3
* 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
* 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
* Thu Jun 03 2021 Python Maint <python-maint@redhat.com> - 1:1.20.1-4
- Rebuilt for Python 3.10
* Fri Apr 16 2021 Nikola Forró <nforro@redhat.com> - 1:1.20.1-3
- Disable tests by default (#1928123)
* Fri May 07 2021 Gwyn Ciesla <gwync@protonmail.com> - 1:1.20.1-3
- Python 3.10 fix.
- Xfail TestCond.test_nan.
* 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
* 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

Loading…
Cancel
Save