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.
This commit is contained in:
Karolina Surma 2022-03-10 09:09:15 +01:00
parent fdc00013a1
commit e0db7e60c0

View File

@ -121,6 +121,7 @@ EOF
env OPENBLAS=%{_libdir} \
BLAS=%{_libdir} \
LAPACK=%{_libdir} CFLAGS="%{optflags}" \
SETUPTOOLS_USE_DISTUTILS=stdlib
%{__python3} setup.py build
%install
@ -134,6 +135,7 @@ popd
env OPENBLAS=%{_libdir} \
FFTW=%{_libdir} BLAS=%{_libdir} \
LAPACK=%{_libdir} CFLAGS="%{optflags}" \
SETUPTOOLS_USE_DISTUTILS=stdlib
%{__python3} setup.py install --root %{buildroot}
pushd %{buildroot}%{_bindir} &> /dev/null
ln -s f2py3 f2py.numpy
@ -204,6 +206,7 @@ python3 runtests.py --no-build -- -ra -k 'not test_ppc64_ibm_double_double128'
* 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