From 5052572bf05db5345d0894023faa5a7947c1b61688d259adcb4ffc82bf0b010e Mon Sep 17 00:00:00 2001 From: Daniel Garcia Moreno Date: Thu, 23 Oct 2025 11:43:43 +0200 Subject: [PATCH] Convert to libalternatives, bsc#1245883 --- python-hypothesis.changes | 10 ++++++++++ python-hypothesis.spec | 17 +++++++++++++++-- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/python-hypothesis.changes b/python-hypothesis.changes index 481736b..c44ecb5 100644 --- a/python-hypothesis.changes +++ b/python-hypothesis.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Thu Aug 21 08:32:53 UTC 2025 - Markéta Machová + +- Convert to libalternatives on SLE-16-based and newer systems only + +------------------------------------------------------------------- +Thu Jul 10 13:17:31 UTC 2025 - Markéta Machová + +- Convert to libalternatives + ------------------------------------------------------------------- Thu Mar 6 10:05:55 UTC 2025 - Markéta Machová diff --git a/python-hypothesis.spec b/python-hypothesis.spec index 3a8dd8f..1203f62 100644 --- a/python-hypothesis.spec +++ b/python-hypothesis.spec @@ -23,6 +23,11 @@ %else %bcond_without complete_tests %endif +%if 0%{?suse_version} > 1500 +%bcond_without libalternatives +%else +%bcond_with libalternatives +%endif %bcond_with ringdisabled %if "%{flavor}" == "test" %define psuffix -test @@ -57,9 +62,14 @@ BuildRequires: python-rpm-macros Requires: python-attrs >= 19.2.0 Requires: (python-exceptiongroup >= 1.0.0 if python-base < 3.11) Requires: (python-sortedcontainers >= 2.1.0 with python-sortedcontainers < 3.0) -Requires(post): update-alternatives -Requires(preun): update-alternatives BuildArch: noarch +%if %{with libalternatives} +BuildRequires: alts +Requires: alts +%else +Requires(post): update-alternatives +Requires(postun): update-alternatives +%endif # SECTION requires_extra Recommends: (python-importlib_metadata >= 3.6 if python-base < 3.8) # consuming packages need to declare these optional dependencies explicitly @@ -144,6 +154,9 @@ sed -i 's/assert (arr == 0.0)/assert np.asarray(arr == 0.0)/' tests/numpy/test_g %postun %python_uninstall_alternative hypothesis +%pre +%python_libalternatives_reset_alternative hypothesis + %check %if %{with test} # theses tests try to write into global python_sitelib