diff --git a/python-jupyter-core.changes b/python-jupyter-core.changes index 48acf5c..e009745 100644 --- a/python-jupyter-core.changes +++ b/python-jupyter-core.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Oct 5 15:35:48 UTC 2021 - Stefan Schubert + +- Use libalternatives instead of update-alternatives. + ------------------------------------------------------------------- Wed Feb 3 22:46:22 UTC 2021 - Benjamin Greiner diff --git a/python-jupyter-core.spec b/python-jupyter-core.spec index a3968a5..8ed8e44 100644 --- a/python-jupyter-core.spec +++ b/python-jupyter-core.spec @@ -1,5 +1,5 @@ # -# spec file for package python-jupyter-core-test +# spec file for package python-jupyter-core # # Copyright (c) 2021 SUSE LLC # @@ -16,6 +16,13 @@ # +# +%if 0%{?suse_version} > 1500 +%bcond_without libalternatives +%else +%bcond_with libalternatives +%endif + %global flavor @BUILD_FLAVOR@%{nil} %if "%{flavor}" == "test" %define psuffix -test @@ -40,11 +47,16 @@ BuildRequires: %{python_module setuptools} BuildRequires: %{python_module traitlets} BuildRequires: fdupes BuildRequires: jupyter-jupyter_core-filesystem -BuildRequires: python-rpm-macros +BuildRequires: python-rpm-macros >= 20210929 Requires: jupyter-jupyter_core-filesystem Requires: python-traitlets +%if %{with libalternatives} +BuildRequires: alts +Requires: alts +%else Requires(post): update-alternatives Requires(postun):update-alternatives +%endif Recommends: python-ipython Provides: python-jupyter_core = %{version}-%{release} Obsoletes: python-jupyter_core < %{version}-%{release} @@ -101,6 +113,11 @@ pushd jupyter_core/tests popd %endif +%pre +# removing old update-alternatives entries +# If libalternatives is used: Removing old update-alternatives entries. +%python_libalternatives_reset_alternative jupyter + %post %python_install_alternative jupyter jupyter-migrate jupyter-troubleshoot