The package rpms/numpy.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/numpy.git/commit/?id=18863dbf28d6....
Change:
+%ifarch x86_64
Thanks.
Full change:
============
commit a21559218ebd7271e8932070c553796be14bdf0b
Author: Benjamin A. Beasley <code(a)musicinmybrain.net>
Date: Wed Apr 17 11:54:50 2024 -0400
Do not upper-bound the meson-python version
diff --git a/26301.patch b/26301.patch
new file mode 100644
index 0000000..39dee12
--- /dev/null
+++ b/26301.patch
@@ -0,0 +1,23 @@
+From 43f9f1b59ef64c7797816fcb7fa6925963fbdcf9 Mon Sep 17 00:00:00 2001
+From: "Benjamin A. Beasley" <code(a)musicinmybrain.net>
+Date: Wed, 17 Apr 2024 11:40:12 -0400
+Subject: [PATCH] BLD: In 1.26.x, do not upper-bound the meson-python version
+
+Allows building with the just-released meson-python 0.16.0.
+---
+ pyproject.toml | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/pyproject.toml b/pyproject.toml
+index b9a032ce2861..154385639c1a 100644
+--- a/pyproject.toml
++++ b/pyproject.toml
+@@ -2,7 +2,7 @@
+ build-backend = "mesonpy"
+ requires = [
+ "Cython>=0.29.34,<3.1",
+- "meson-python>=0.15.0,<0.16.0",
++ "meson-python>=0.15.0",
+ ]
+
+ [project]
diff --git a/numpy.spec b/numpy.spec
index 3f0ef02..882e6e7 100644
--- a/numpy.spec
+++ b/numpy.spec
@@ -20,7 +20,7 @@
Name: numpy
Version: 1.26.4
-Release: 2%{?dist}
+Release: 3%{?dist}
Epoch: 1
Summary: A fast multidimensional array facility for Python
@@ -38,6 +38,9 @@ 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
+# BLD: In 1.26.x, do not upper-bound the meson-python version
+# Upstream PR:
https://github.com/numpy/numpy/pull/26301
+Patch5:
https://github.com/numpy/numpy/pull/26301.patch
%description
@@ -246,6 +249,9 @@ python3 runtests.py --no-build -- -ra -k 'not
test_ppc64_ibm_double_double128 %{
%changelog
+* Wed Apr 17 2024 Benjamin A. Beasley <code(a)musicinmybrain.net> - 1:1.26.4-3
+- Do not upper-bound the meson-python version
+
* Fri Mar 15 2024 Jerry James <loganjerry(a)gmail.com> - 1:1.26.4-2
- Unbundle libdivide in Fedora
- Let libdivide use vector instructions when possible
commit 18863dbf28d6375f94dce9b6899a359f9388c691
Author: Jerry James <loganjerry(a)gmail.com>
Date: Mon Mar 18 15:54:14 2024 -0600
Unbundle libdivide in Fedora
- Let libdivide use vector instructions when possible
diff --git a/numpy.spec b/numpy.spec
index 352d267..3f0ef02 100644
--- a/numpy.spec
+++ b/numpy.spec
@@ -20,17 +20,17 @@
Name: numpy
Version: 1.26.4
-Release: 1%{?dist}
+Release: 2%{?dist}
Epoch: 1
Summary: A fast multidimensional array facility for Python
# Everything is BSD-3-Clause except...
-# numpy/core/include/numpy/libdivide: Zlib
+# 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
+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}-...
Source1:
https://numpy.org/doc/%(echo %{version} | cut -d. -f1-2)/numpy-html.zip
@@ -66,6 +66,9 @@ Obsoletes: numpy < 1:1.10.1-3
BuildRequires: python3-devel
BuildRequires: gcc-gfortran gcc gcc-c++
BuildRequires: lapack-devel
+%if 0%{?fedora}
+BuildRequires: libdivide-devel
+%endif
BuildRequires: ninja-build
BuildRequires: patchelf
%if %{with tests}
@@ -77,6 +80,10 @@ BuildRequires: python3-typing-extensions
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
efficiently manipulate large multi-dimensional arrays of arbitrary
@@ -127,11 +134,29 @@ 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
%pyproject_wheel -Csetup-args=-Dblas=flexiblas -Csetup-args=-Dlapack=lapack
@@ -152,6 +177,9 @@ 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}
@@ -218,6 +246,10 @@ python3 runtests.py --no-build -- -ra -k 'not
test_ppc64_ibm_double_double128 %{
%changelog
+* Fri Mar 15 2024 Jerry James <loganjerry(a)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(a)protonmail.com> - 1:1.26.4-1
- 1.26.4