diff --git a/python-pbr.changes b/python-pbr.changes index fced778..a0aa496 100644 --- a/python-pbr.changes +++ b/python-pbr.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Thu Aug 21 10:03:57 UTC 2025 - Markéta Machová + +- Convert to libalternatives on SLE-16-based and newer systems only + +------------------------------------------------------------------- +Thu Jul 17 12:12:02 UTC 2025 - Markéta Machová + +- Convert to libalternatives + ------------------------------------------------------------------- Wed Feb 12 10:34:46 UTC 2025 - John Paul Adrian Glaubitz diff --git a/python-pbr.spec b/python-pbr.spec index 0327ab2..4cc3181 100644 --- a/python-pbr.spec +++ b/python-pbr.spec @@ -16,7 +16,6 @@ # -%{?sle15_python_module_pythons} %global flavor @BUILD_FLAVOR@%{nil} %if "%{flavor}" == "test" %define psuffix -test @@ -25,6 +24,12 @@ %define psuffix %{nil} %bcond_with test %endif +%if 0%{?suse_version} > 1500 +%bcond_without libalternatives +%else +%bcond_with libalternatives +%endif +%{?sle15_python_module_pythons} Name: python-pbr%{psuffix} Version: 6.1.1 Release: 0 @@ -38,11 +43,16 @@ BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-setuptools >= 64.0.0 -Requires(post): update-alternatives -Requires(postun): update-alternatives Recommends: git-core Obsoletes: python-pbr-doc BuildArch: noarch +%if %{with libalternatives} +BuildRequires: alts +Requires: alts +%else +Requires(post): update-alternatives +Requires(postun): update-alternatives +%endif %if %{with test} # Package originates from OpenStack and depends on other OpenStack packages for testing. # These are only available for the primary python3 interpreter in TW, but optional. @@ -108,6 +118,9 @@ exclude+="test_handling_of_whitespace_in_data_files" %postun %python_uninstall_alternative pbr +%pre +%python_libalternatives_reset_alternative pbr + %files %{python_files} %license LICENSE %doc AUTHORS ChangeLog CONTRIBUTING.rst README.rst