From 5c54d45fa8d556964a2109173cb920cf47f99118c201e9029a1618af78f6387c Mon Sep 17 00:00:00 2001 From: Sebastian Wagner Date: Wed, 4 Jun 2025 15:16:51 +0000 Subject: [PATCH] Accepting request 1282802 from home:nkrapp:branches:devel:languages:python - fix usage of libalternatives OBS-URL: https://build.opensuse.org/request/show/1282802 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-certstream?expand=0&rev=20 --- python-certstream.changes | 5 +++++ python-certstream.spec | 16 ++++++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/python-certstream.changes b/python-certstream.changes index aa80fc9..3bee1fc 100644 --- a/python-certstream.changes +++ b/python-certstream.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Jun 4 14:42:57 UTC 2025 - Nico Krapp + +- fix usage of libalternatives + ------------------------------------------------------------------- Thu May 15 13:03:03 UTC 2025 - Markéta Machová diff --git a/python-certstream.spec b/python-certstream.spec index d0c1049..b6dab36 100644 --- a/python-certstream.spec +++ b/python-certstream.spec @@ -16,7 +16,7 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} +%bcond_without libalternatives Name: python-certstream Version: 1.12 Release: 0 @@ -30,10 +30,10 @@ BuildRequires: %{python_module wheel} #SECTION tests BuildRequires: %{python_module termcolor} BuildRequires: %{python_module websocket-client >= 0.58.0} +BuildRequires: alts BuildRequires: fdupes BuildRequires: python-rpm-macros -Requires(post): alts -Requires(postun): alts +Requires: alts # /SECTION Requires: python3-termcolor Requires: python3-websocket-client >= 0.48.0 @@ -47,7 +47,7 @@ Certstream is a library to connect to the certstream network (certstream.calidog It supports automatic reconnection when networks issues occur, and should be stable for long-running jobs. %prep -%setup -q -n certstream-%{version} +%autosetup -p1 -n certstream-%{version} # do not hardcode dependencies sed -i -e 's:==:>=:g' requirements.txt @@ -61,11 +61,11 @@ sed -i -e 's:==:>=:g' requirements.txt # there are no tests -%post -%python_install_alternative certstream +%pre +# If libalternatives is used: Removing old update-alternatives entries. +%python_libalternatives_reset_alternative certstream -%postun -%python_uninstall_alternative certstream +# post and postun macro call is not needed with only libalternatives %files %{python_files} %doc README.md