diff --git a/python-charset-normalizer.changes b/python-charset-normalizer.changes index 4d09ab4..8311ca5 100644 --- a/python-charset-normalizer.changes +++ b/python-charset-normalizer.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Jan 15 10:26:52 UTC 2025 - Daniel Garcia + +- Use libalternatives instead of update-alternatives, bsc#1235781 + ------------------------------------------------------------------- Thu Jan 9 09:05:30 UTC 2025 - John Paul Adrian Glaubitz diff --git a/python-charset-normalizer.spec b/python-charset-normalizer.spec index de319cc..e9cf096 100644 --- a/python-charset-normalizer.spec +++ b/python-charset-normalizer.spec @@ -16,6 +16,12 @@ # +%if 0%{?suse_version} > 1500 +%bcond_without libalternatives +%else +%bcond_with libalternatives +%endif + %{?sle15_python_module_pythons} Name: python-charset-normalizer Version: 3.4.1 @@ -30,8 +36,13 @@ BuildRequires: %{python_module setuptools} BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros +%if %{with libalternatives} +Requires: alts +BuildRequires: alts +%else Requires(post): update-alternatives Requires(postun): update-alternatives +%endif Suggests: python-unicodedata2 BuildArch: noarch # SECTION test requirements @@ -56,6 +67,10 @@ Python Universal Charset detector. %check %pytest +%pre +# If libalternatives is used: Removing old update-alternatives entries. +%python_libalternatives_reset_alternative normalizer + %post %python_install_alternative normalizer