From ca858f90a055dde329ab46b718249ace0accbd9af5379869ea5030a525ac2b2f Mon Sep 17 00:00:00 2001 From: Daniel Garcia Moreno Date: Thu, 23 Oct 2025 11:42:22 +0200 Subject: [PATCH] Convert to libalternatives, bsc#1245883 --- python-dill.changes | 15 +++++++++++++++ python-dill.spec | 18 ++++++++++++++++-- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/python-dill.changes b/python-dill.changes index fc8fae0..9ec2ac3 100644 --- a/python-dill.changes +++ b/python-dill.changes @@ -1,3 +1,18 @@ +------------------------------------------------------------------- +Tue Aug 19 14:30:27 UTC 2025 - Markéta Machová + +- Still use update-alternatives on SLE-15 + +------------------------------------------------------------------- +Thu Jul 10 15:29:34 UTC 2025 - Dirk Müller + +- do not depend on alts for sle15 + +------------------------------------------------------------------- +Tue Jul 8 13:59:14 UTC 2025 - Markéta Machová + +- Convert to libalternatives + ------------------------------------------------------------------- Mon May 5 02:47:52 UTC 2025 - Steve Kowalik diff --git a/python-dill.spec b/python-dill.spec index 7fe458d..cff0013 100644 --- a/python-dill.spec +++ b/python-dill.spec @@ -16,6 +16,11 @@ # +%if 0%{?suse_version} > 1500 +%bcond_without libalternatives +%else +%bcond_with libalternatives +%endif %{?sle15_python_module_pythons} Name: python-dill Version: 0.4.0 @@ -33,9 +38,14 @@ BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros BuildRequires: unzip +Recommends: python-objgraph >= 1.7.2 +%if %{with libalternatives} +BuildRequires: alts +Requires: alts +%else Requires(post): update-alternatives Requires(postun): update-alternatives -Recommends: python-objgraph >= 1.7.2 +%endif BuildArch: noarch %python_subpackages @@ -65,6 +75,7 @@ find dill -name '*.py' -exec sed -i '1{\@^#!%{_bindir}/env python@d}' {} \; %python_clone -a %{buildroot}%{_bindir}/undill %python_clone -a %{buildroot}%{_bindir}/get_gprof %python_clone -a %{buildroot}%{_bindir}/get_objgraph +%python_group_libalternatives undill get_gprof get_objgraph %check export PYTHONDONTWRITEBYTECODE=1 @@ -73,11 +84,14 @@ export PYTHONPATH=%{_builddir}/dill-%{version} %python_exec dill/tests/__main__.py %post -%{python_install_alternative undill get_objgraph get_gprof} +%python_install_alternative undill get_gprof get_objgraph %postun %python_uninstall_alternative undill +%pre +%python_libalternatives_reset_alternative undill + %files %{python_files} %doc README.md %license LICENSE