From 8f29691a37d5ba5db1fce125db2b0605dbff2995b02fb2b5bbf533e0ce80f94e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Tue, 8 Jul 2025 14:05:06 +0000 Subject: [PATCH] - Convert to libalternatives OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-dill?expand=0&rev=36 --- python-dill.changes | 5 +++++ python-dill.spec | 13 ++++++------- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/python-dill.changes b/python-dill.changes index fc8fae0..129d03a 100644 --- a/python-dill.changes +++ b/python-dill.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +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..999a0a7 100644 --- a/python-dill.spec +++ b/python-dill.spec @@ -16,6 +16,7 @@ # +%bcond_without libalternatives %{?sle15_python_module_pythons} Name: python-dill Version: 0.4.0 @@ -30,11 +31,11 @@ BuildRequires: %{python_module objgraph >= 1.7.2} BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module wheel} +BuildRequires: alts BuildRequires: fdupes BuildRequires: python-rpm-macros BuildRequires: unzip -Requires(post): update-alternatives -Requires(postun): update-alternatives +Requires: alts Recommends: python-objgraph >= 1.7.2 BuildArch: noarch %python_subpackages @@ -65,6 +66,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 @@ -72,11 +74,8 @@ export PYTHONPATH=%{_builddir}/dill-%{version} # Creative; copied from tox.ini %python_exec dill/tests/__main__.py -%post -%{python_install_alternative undill get_objgraph get_gprof} - -%postun -%python_uninstall_alternative undill +%pre +%python_libalternatives_reset_alternative undill %files %{python_files} %doc README.md