diff --git a/python-numpy.changes b/python-numpy.changes index 7296f32..24326cb 100644 --- a/python-numpy.changes +++ b/python-numpy.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Apr 6 21:42:29 UTC 2020 - Matej Cepl + +- Use update-alternatives for /usr/bin/f2py + ------------------------------------------------------------------- Sat Mar 28 16:39:11 UTC 2020 - Arun Persaud diff --git a/python-numpy.spec b/python-numpy.spec index 33de1fb..deda28c 100644 --- a/python-numpy.spec +++ b/python-numpy.spec @@ -113,6 +113,8 @@ BuildRequires: libopenblas%{?hpc_ext}-%{compiler_family}%{?c_f_ver}-hpc-devel BuildRequires: lua-lmod BuildRequires: suse-hpc Requires: libopenblas%{?hpc_ext}-%{compiler_family}%{?c_f_ver}-hpc +Requires(post): update-alternatives +Requires(postun): update-alternatives %endif %python_subpackages @@ -189,6 +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* %if 0%{?suse_version} %fdupes %{buildroot}%{p_prefix} @@ -252,13 +256,17 @@ pushd testing popd %endif +%post +%python_install_alternative f2py + +%postun +%python_uninstall_alternative f2py + %files %{python_files} %doc README.md THANKS.txt -%python3_only %{p_bindir}/f2py3* -%python3_only %{p_bindir}/f2py +%python_alternative %{p_bindir}/f2py %if %{without hpc} %{python_sitearch}/numpy/ -%{python_sitearch}/numpy/LICENSE.txt %{python_sitearch}/numpy-%{version}-py*.egg-info %license %{python_sitearch}/numpy/LICENSE.txt %exclude %{python_sitearch}/numpy/core/include/ @@ -267,7 +275,6 @@ popd %exclude %{python_sitearch}/numpy/core/lib/libnpymath.a %else %{p_python_sitearch}/numpy/ -%{p_python_sitearch}/numpy/LICENSE.txt %{p_python_sitearch}/numpy-%{version}-py*.egg-info %license %{p_python_sitearch}/numpy/LICENSE.txt %exclude %{p_python_sitearch}/numpy/core/include/