Accepting request 1238022 from devel:languages:python

- Use libalternatives instead of update-alternatives, bsc#1235781

OBS-URL: https://build.opensuse.org/request/show/1238022
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-charset-normalizer?expand=0&rev=26
This commit is contained in:
Ana Guerrero 2025-01-16 17:31:17 +00:00 committed by Git OBS Bridge
commit 93a74fa152
2 changed files with 20 additions and 0 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Wed Jan 15 10:26:52 UTC 2025 - Daniel Garcia <daniel.garcia@suse.com>
- Use libalternatives instead of update-alternatives, bsc#1235781
-------------------------------------------------------------------
Thu Jan 9 09:05:30 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>

View File

@ -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