From c3f2e8472f3cd744e29e705b9f48644206d09ee499b6eb0618153cde72b8bf5c Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Sun, 3 Oct 2021 17:51:18 +0000 Subject: [PATCH] Accepting request 922594 from home:schubi2 - Use libalternatives instead of update-alternatives. OBS-URL: https://build.opensuse.org/request/show/922594 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-CherryPy?expand=0&rev=52 --- python-CherryPy.changes | 5 +++++ python-CherryPy.spec | 16 +++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/python-CherryPy.changes b/python-CherryPy.changes index ae4ad33..9093135 100644 --- a/python-CherryPy.changes +++ b/python-CherryPy.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sun Aug 22 11:56:04 UTC 2021 - Stefan Schubert + +- Use libalternatives instead of update-alternatives. + ------------------------------------------------------------------- Mon Aug 16 13:25:38 UTC 2021 - John Paul Adrian Glaubitz diff --git a/python-CherryPy.spec b/python-CherryPy.spec index a574236..f48e7b1 100644 --- a/python-CherryPy.spec +++ b/python-CherryPy.spec @@ -16,6 +16,12 @@ # +%if 0%{?suse_version} > 1500 +%bcond_without libalternatives +%else +%bcond_with libalternatives +%endif + %define skip_python2 1 %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-CherryPy @@ -28,14 +34,18 @@ Source: https://files.pythonhosted.org/packages/source/C/CherryPy/Cherry BuildRequires: %{python_module setuptools_scm} BuildRequires: %{python_module setuptools} BuildRequires: fdupes -BuildRequires: python-rpm-macros +BuildRequires: python-rpm-macros >= 20210929 Requires: python-cheroot >= 8.2.1 Requires: python-jaraco.collections Requires: python-more-itertools Requires: python-portend >= 2.1.1 Requires: python-zc.lockfile +%if %{with libalternatives} +Requires: alts +%else Requires(post): update-alternatives Requires(postun): update-alternatives +%endif Recommends: python-Routes >= 2.3.1 Recommends: python-flup Recommends: python-memcached >= 1.58 @@ -89,6 +99,10 @@ export TRAVIS="true" # testCombinedTools fails with trace in cheroot tests %pytest -k 'not testCombinedTools' +%pre +# If libalternatives is used: Removing old update-alternatives entries. +%python_libalternatives_reset_alternative cherryd + %post %python_install_alternative cherryd