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