From 1fa0c10fbdb27a71c4295f571af25f262ae3f8646f3a3b840980c8185f29204b Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Sun, 3 Oct 2021 17:51:18 +0000 Subject: [PATCH 1/2] 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 From b1b660e7303af6bbc765f9855642c628e90b2183f918044a3a0449a7e47f2c60 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Wed, 6 Oct 2021 07:31:41 +0000 Subject: [PATCH 2/2] Accepting request 923252 from home:schubi2 - Added BuildRequires: alts OBS-URL: https://build.opensuse.org/request/show/923252 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-CherryPy?expand=0&rev=53 --- python-CherryPy.changes | 5 +++++ python-CherryPy.spec | 1 + 2 files changed, 6 insertions(+) diff --git a/python-CherryPy.changes b/python-CherryPy.changes index 9093135..3499723 100644 --- a/python-CherryPy.changes +++ b/python-CherryPy.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Oct 5 14:01:39 UTC 2021 - Stefan Schubert + +- Added BuildRequires: alts + ------------------------------------------------------------------- Sun Aug 22 11:56:04 UTC 2021 - Stefan Schubert diff --git a/python-CherryPy.spec b/python-CherryPy.spec index f48e7b1..15f9607 100644 --- a/python-CherryPy.spec +++ b/python-CherryPy.spec @@ -42,6 +42,7 @@ Requires: python-portend >= 2.1.1 Requires: python-zc.lockfile %if %{with libalternatives} Requires: alts +BuildRequires: alts %else Requires(post): update-alternatives Requires(postun): update-alternatives