From 4a25d3a4dc5e0d644fc3aa614d1ef2d29853c5b9fdd5cbaa7fb1202bab019ba4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Tue, 7 Apr 2020 11:56:09 +0000 Subject: [PATCH] - Also still install f2py that is used by many other depending software OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-numpy?expand=0&rev=51 --- python-numpy.changes | 6 ++++++ python-numpy.spec | 15 ++++++++++----- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/python-numpy.changes b/python-numpy.changes index 24326cb..c933362 100644 --- a/python-numpy.changes +++ b/python-numpy.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Apr 7 11:55:43 UTC 2020 - Tomáš Chvátal + +- Also still install f2py that is used by many other + depending software + ------------------------------------------------------------------- Mon Apr 6 21:42:29 UTC 2020 - Matej Cepl diff --git a/python-numpy.spec b/python-numpy.spec index deda28c..5bab68c 100644 --- a/python-numpy.spec +++ b/python-numpy.spec @@ -191,8 +191,8 @@ export CFLAGS="%{optflags} -fno-strict-aliasing" %{?with_hpc:module load openblas} %python_exec setup.py install --prefix=%{p_prefix} --root=%{buildroot} -%python_clone -a %{buildroot}%{p_prefix}/bin/f2py -rm -v %{buildroot}%{p_prefix}/bin/f2py3* + +%prepare_alternative f2py %if 0%{?suse_version} %fdupes %{buildroot}%{p_prefix} @@ -257,14 +257,19 @@ popd %endif %post -%python_install_alternative f2py +# can't use `python_install_alternative` because it also installs f2py3 +PRIO=$(echo %{python_version} | tr -d .) +%install_alternative f2py %{_bindir}/f2py%{python_version} $PRIO %postun -%python_uninstall_alternative f2py +%uninstall_alternative f2py %{_bindir}/f2py%{python_version} %files %{python_files} %doc README.md THANKS.txt -%python_alternative %{p_bindir}/f2py +%ghost %{_sysconfdir}/alternatives/f2py +%{p_bindir}/f2py +%{p_bindir}/f2py%{python_version} +%python3_only %{p_bindir}/f2py3 %if %{without hpc} %{python_sitearch}/numpy/ %{python_sitearch}/numpy-%{version}-py*.egg-info