From 2d292fb79f5e88d81cba659734e1f99640ca9fed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 6 Nov 2023 18:24:32 +0100 Subject: [PATCH] Use %pyproject_buildrequires Manually listing the dependencies for %pyproject_wheel is not supported. Note that the vendored mesonpy build backend does not support generating runtime metadata, so we use -R (no runtime requires). We could use -w instead, but that would build the wheel too many times. The dependency on patchelf is added for mesonpy. When /usr/bin/patchelf does not exist, it tries to generate a dependency on python3dist(patchelf), see the comment in pyproject.toml. --- numpy.spec | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/numpy.spec b/numpy.spec index 1b5c4f8..fc5c9b4 100644 --- a/numpy.spec +++ b/numpy.spec @@ -58,14 +58,10 @@ Provides: numpy%{?_isa} = %{epoch}:%{version}-%{release} Obsoletes: numpy < 1:1.10.1-3 BuildRequires: python3-devel -BuildRequires: python3-setuptools -BuildRequires: python3-pip -BuildRequires: python3-Cython -BuildRequires: python3-pyproject-metadata -BuildRequires: pyproject-rpm-macros BuildRequires: gcc-gfortran gcc gcc-c++ BuildRequires: lapack-devel BuildRequires: ninja-build +BuildRequires: patchelf %if %{with tests} BuildRequires: python3-hypothesis BuildRequires: python3-pytest @@ -121,6 +117,9 @@ libraries = %{blaslib}%{blasvar} library_dirs = %{_libdir} EOF +%generate_buildrequires +%pyproject_buildrequires -R -Csetup-args=-Dblas=flexiblas -Csetup-args=-Dlapack=lapack + %build %set_build_flags