diff --git a/python-Flask.changes b/python-Flask.changes index 58712f4..a9f9e03 100644 --- a/python-Flask.changes +++ b/python-Flask.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sun Aug 22 19:07:48 UTC 2021 - Stefan Schubert + +- Use libalternatives instead of update-alternatives. + ------------------------------------------------------------------- Sat Jun 19 07:28:01 UTC 2021 - Michael Ströder diff --git a/python-Flask.spec b/python-Flask.spec index 1408ffa..5a3c57f 100644 --- a/python-Flask.spec +++ b/python-Flask.spec @@ -16,6 +16,12 @@ # +%if 0%{?suse_version} > 1500 +%bcond_without libalternatives +%else +%bcond_with libalternatives +%endif + %define oldpython python %define skip_python2 1 %{?!python_module:%define python_module() python-%{**} python3-%{**}} @@ -35,13 +41,17 @@ BuildRequires: %{python_module itsdangerous >= 2.0} BuildRequires: %{python_module pytest >= 6.2.4} BuildRequires: %{python_module setuptools} BuildRequires: fdupes -BuildRequires: python-rpm-macros +BuildRequires: python-rpm-macros >= 20210929 Requires: python-Jinja2 >= 3.0 Requires: python-Werkzeug >= 2.0 Requires: python-click >= 7.1.2 Requires: python-itsdangerous >= 2.0 +%if %{with libalternatives} +Requires: alts +%else Requires(post): update-alternatives Requires(postun):update-alternatives +%endif BuildArch: noarch %if %{?suse_version} < 1500 BuildRequires: python @@ -71,13 +81,16 @@ reference for python-Flask. %install %python_install %python_clone -a %{buildroot}%{_bindir}/flask - %fdupes %{buildroot}%{python_sitelib} %check export LANG=en_US.UTF-8 %pytest +%pre +# If libalternatives is used: Removing old update-alternatives entries. +%python_libalternatives_reset_alternative flask + %post %python_install_alternative flask