15
0

4 Commits

2 changed files with 26 additions and 3 deletions

View File

@@ -1,3 +1,13 @@
-------------------------------------------------------------------
Tue Aug 12 08:09:49 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Make the libalternatives transition conditional
-------------------------------------------------------------------
Wed Jun 25 11:45:06 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Convert to libalternatives
-------------------------------------------------------------------
Mon Oct 2 07:16:32 UTC 2023 - Dirk Müller <dmueller@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-cchardet
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,6 +18,11 @@
%define skip_python2 1
%define modname faust-cchardet
%if 0%{?suse_version} > 1500
%bcond_without libalternatives
%else
%bcond_with libalternatives
%endif
%{?sle15_python_module_pythons}
Name: python-cchardet
Version: 2.1.19
@@ -25,7 +30,7 @@ Release: 0
Summary: CChardet is high speed universal character encoding detector
License: GPL-2.0-or-later OR LGPL-2.1-or-later OR MPL-1.1
URL: https://github.com/faust-streaming/cChardet
Source: https://files.pythonhosted.org/packages/source/f/%{modname}/%{modname}-%{version}.tar.gz
Source: https://files.pythonhosted.org/packages/source/f/faust-cchardet/%{modname}-%{version}.tar.gz
BuildRequires: %{python_module Cython}
BuildRequires: %{python_module devel}
BuildRequires: %{python_module pip}
@@ -36,8 +41,13 @@ BuildRequires: gcc-c++
BuildRequires: pkgconfig
BuildRequires: python-rpm-macros
BuildRequires: pkgconfig(uchardet)
%if %{with libalternatives}
BuildRequires: alts
Requires: alts
%else
Requires(post): update-alternatives
Requires(postun):update-alternatives
Requires(postun): update-alternatives
%endif
%python_subpackages
%description
@@ -57,6 +67,9 @@ cChardet is high speed universal character encoding detector. - binding to `ucha
%check
%pytest_arch src/tests
%pre
%python_libalternatives_reset_alternative cchardetect
%post
%python_install_alternative cchardetect