diff --git a/python-pygal.changes b/python-pygal.changes index 0425f59..9aca267 100644 --- a/python-pygal.changes +++ b/python-pygal.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Aug 25 09:51:21 UTC 2025 - Markéta Machová + +- Convert to libalternatives on SLE-16-based and newer systems + ------------------------------------------------------------------- Wed Jun 11 05:53:51 UTC 2025 - Steve Kowalik diff --git a/python-pygal.spec b/python-pygal.spec index a259231..b7c4a5d 100644 --- a/python-pygal.spec +++ b/python-pygal.spec @@ -1,7 +1,7 @@ # # spec file for package python-pygal # -# Copyright (c) 2025 SUSE LLC +# Copyright (c) 2025 SUSE LLC and contributors # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,6 +16,11 @@ # +%if 0%{?suse_version} > 1500 +%bcond_without libalternatives +%else +%bcond_with libalternatives +%endif %{?sle15_python_module_pythons} Name: python-pygal Version: 3.0.5 @@ -23,7 +28,7 @@ Release: 0 Summary: A python svg graph plotting library License: LGPL-3.0-or-later Group: Development/Languages/Python -URL: http://pygal.org/ +URL: https://pygal.org/ Source: https://files.pythonhosted.org/packages/source/p/pygal/pygal-%{version}.tar.gz BuildRequires: %{python_module CairoSVG} BuildRequires: %{python_module Flask} @@ -37,10 +42,15 @@ BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-importlib-metadata Requires: python-lxml -Requires(post): update-alternatives -Requires(postun): update-alternatives Recommends: python-CairoSVG BuildArch: noarch +%if %{with libalternatives} +BuildRequires: alts +Requires: alts +%else +Requires(post): update-alternatives +Requires(postun): update-alternatives +%endif # SECTION test requirements BuildRequires: %{python_module pytest} # /SECTION @@ -75,6 +85,9 @@ mv %{buildroot}%{_bindir}/pygal_gen.py %{buildroot}%{_bindir}/pygal_gen %postun %python_uninstall_alternative pygal_gen +%pre +%python_libalternatives_reset_alternative pygal_gen + %files %{python_files} %doc README %license COPYING