diff --git a/python-numpy.changes b/python-numpy.changes index 18543d9..c474002 100644 --- a/python-numpy.changes +++ b/python-numpy.changes @@ -1,8 +1,3 @@ -------------------------------------------------------------------- -Sun Aug 22 16:28:30 UTC 2021 - Stefan Schubert - -- Use libalternatives instead of update-alternatives. - ------------------------------------------------------------------- Fri Jul 16 15:14:36 UTC 2021 - Ben Greiner diff --git a/python-numpy.spec b/python-numpy.spec index 1fe6b38..e6b4aff 100644 --- a/python-numpy.spec +++ b/python-numpy.spec @@ -1,5 +1,5 @@ # -# spec file for package python-numpy +# spec file # # Copyright (c) 2021 SUSE LLC # @@ -16,12 +16,6 @@ # -%if 0%{?suse_version} > 1500 -%bcond_without libalternatives -%else -%bcond_with libalternatives -%endif - %global flavor @BUILD_FLAVOR@%{nil} %define ver 1.21.0 %define _ver 1_21_0 @@ -125,13 +119,9 @@ 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 -%if %{with libalternatives} -Requires: alts -%else Requires(post): update-alternatives Requires(postun):update-alternatives %endif -%endif %python_subpackages %description @@ -204,14 +194,7 @@ export CFLAGS="%{optflags} -fno-strict-aliasing" %python_exec setup.py install --prefix=%{p_prefix} --root=%{buildroot} %if !%{with hpc} -%if ! %{with libalternatives} - %python_clone -a %{buildroot}%{_bindir}/f2py -%else - %python_clone %{buildroot}%{_bindir}/f2py - ln -sf %{_bindir}/alts %{buildroot}%{_bindir}/f2py - mkdir -p %{buildroot}%{_datadir}/libalternatives/f2py - %python_expand echo "binary=%{_bindir}/f2py-%{$python_version}" > %{buildroot}%{_datadir}/libalternatives/f2py/10%{$python_version_nodots}.conf -%endif +%python_clone -a %{buildroot}%{_bindir}/f2py %endif %if 0%{?suse_version} @@ -300,33 +283,17 @@ popd %endif %if %{without hpc} -%if %{with libalternatives} -%pre -# removing old update-alternatives entries -if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ] ; then - %python_uninstall_alternative f2py -fi -%else %post %python_install_alternative f2py %postun %python_uninstall_alternative f2py %endif -%endif %files %{python_files} %doc README.md THANKS.txt %if %{without hpc} -%if ! 0%{with libalternatives} %python_alternative %{_bindir}/f2py -%else -%dir %{_datadir}/libalternatives -%dir %{_datadir}/libalternatives/f2py -%{_datadir}/libalternatives/f2py/10%python_version_nodots.conf -%{_bindir}/f2py -%{_bindir}/f2py-%python_version -%endif %if "%{python_flavor}" == "python3" || "%{python_provides}" == "python3" %{_bindir}/f2py3 %endif