1 Commits

Author SHA256 Message Date
df22236f74 Convert to libalternatives, bsc#1245883 2025-11-03 15:01:20 +01:00
2 changed files with 34 additions and 7 deletions

View File

@@ -1,3 +1,14 @@
-------------------------------------------------------------------
Mon Aug 25 09:51:21 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Convert to libalternatives on SLE-16-based and newer systems
-------------------------------------------------------------------
Wed Jun 11 05:53:51 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
- Switch to pyproject macros.
- No more greedy globs in %files.
-------------------------------------------------------------------
Sat Aug 31 11:57:50 UTC 2024 - Dirk Müller <dmueller@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-pygal
#
# Copyright (c) 2024 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,22 +28,29 @@ 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}
BuildRequires: %{python_module importlib-metadata}
BuildRequires: %{python_module lxml}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pyquery}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
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
@@ -55,10 +67,10 @@ It supports various chart types and CSS styling.
sed -Ei 's:.pytest-runner.,?::' setup.py
%build
%python_build
%pyproject_wheel
%install
%python_install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
mv %{buildroot}%{_bindir}/pygal_gen.py %{buildroot}%{_bindir}/pygal_gen
@@ -73,10 +85,14 @@ 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
%python_alternative %{_bindir}/pygal_gen
%{python_sitelib}/*
%{python_sitelib}/pygal
%{python_sitelib}/pygal-%{version}.dist-info
%changelog