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.
This commit is contained in:
Miro Hrončok 2023-11-06 18:24:32 +01:00
parent 939d04bda8
commit 2d292fb79f

View File

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