From 478b25aa9d417574b45abd88e6f542fbc954df9af338c69dd8bfbf9cfdf235fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Fri, 7 Feb 2025 18:16:18 +0100 Subject: [PATCH] Sync from SUSE:SLFO:Main python-charset-normalizer revision 4934f71b9a734ca6edfb6da0a5283007 --- python-charset-normalizer.changes | 5 +++++ python-charset-normalizer.spec | 14 ++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/python-charset-normalizer.changes b/python-charset-normalizer.changes index 254dfbe..69116e2 100644 --- a/python-charset-normalizer.changes +++ b/python-charset-normalizer.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Jan 15 12:43:19 UTC 2025 - Nico Krapp + +- Use libalternatives instead of update-alternatives, bsc#1235781 + ------------------------------------------------------------------- Tue Oct 22 16:00:12 UTC 2024 - Dirk Müller diff --git a/python-charset-normalizer.spec b/python-charset-normalizer.spec index 5e2a14a..c9dc2ba 100644 --- a/python-charset-normalizer.spec +++ b/python-charset-normalizer.spec @@ -15,6 +15,11 @@ # Please submit bugfixes or comments via https://bugs.opensuse.org/ # +%if 0%{?suse_version} > 1500 +%bcond_without libalternatives +%else +%bcond_with libalternatives +%endif %{?sle15_python_module_pythons} Name: python-charset-normalizer @@ -28,8 +33,13 @@ BuildRequires: %{python_module base >= 3.7} BuildRequires: %{python_module setuptools} 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 +66,10 @@ sed -i '/addopts/d' setup.cfg %check %pytest +%pre +# If libalternatives is used: Removing old update-alternatives entries. +%python_libalternatives_reset_alternative normalizer + %post %python_install_alternative normalizer