Sync from SUSE:SLFO:Main python-charset-normalizer revision 4934f71b9a734ca6edfb6da0a5283007

This commit is contained in:
Adrian Schröter 2025-02-07 18:16:18 +01:00
parent 6582fa9b6d
commit 478b25aa9d
2 changed files with 19 additions and 0 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Wed Jan 15 12:43:19 UTC 2025 - Nico Krapp <nico.krapp@suse.com>
- Use libalternatives instead of update-alternatives, bsc#1235781
-------------------------------------------------------------------
Tue Oct 22 16:00:12 UTC 2024 - Dirk Müller <dmueller@suse.com>

View File

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