1
0

6 Commits

Author SHA256 Message Date
62046f9c58 Accepting request 1298892 from devel:languages:python
- Make the libalternatives transition conditional

OBS-URL: https://build.opensuse.org/request/show/1298892
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-CairoSVG?expand=0&rev=16
2025-08-13 14:22:44 +00:00
4f217df794 - Make the libalternatives transition conditional
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-CairoSVG?expand=0&rev=37
2025-08-11 15:18:38 +00:00
1e2f1f412e Accepting request 1286312 from devel:languages:python
- Convert to libalternatives

OBS-URL: https://build.opensuse.org/request/show/1286312
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-CairoSVG?expand=0&rev=15
2025-06-18 17:29:55 +00:00
0205c68092 - Convert to libalternatives
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-CairoSVG?expand=0&rev=35
2025-06-17 09:23:40 +00:00
3b57becf71 Accepting request 1266348 from devel:languages:python
- Switch to autosetup and pyproject macros.
- Add patch use-underscore-in-setup.cfg.patch:
  * Use 'console_scripts' in setup.cfg.
- No more greedy globs in %files.

OBS-URL: https://build.opensuse.org/request/show/1266348
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-CairoSVG?expand=0&rev=14
2025-04-11 14:45:18 +00:00
9e7b3781a0 - Switch to autosetup and pyproject macros.
- Add patch use-underscore-in-setup.cfg.patch:
  * Use 'console_scripts' in setup.cfg.
- No more greedy globs in %files.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-CairoSVG?expand=0&rev=33
2025-04-02 03:01:31 +00:00
3 changed files with 63 additions and 8 deletions

View File

@@ -1,3 +1,21 @@
-------------------------------------------------------------------
Mon Aug 11 15:17:37 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Make the libalternatives transition conditional
-------------------------------------------------------------------
Tue Jun 17 09:23:10 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Convert to libalternatives
-------------------------------------------------------------------
Wed Apr 2 03:00:08 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
- Switch to autosetup and pyproject macros.
- Add patch use-underscore-in-setup.cfg.patch:
* Use 'console_scripts' in setup.cfg.
- No more greedy globs in %files.
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Sep 6 10:08:53 UTC 2023 - Daniel Garcia <daniel.garcia@suse.com> Wed Sep 6 10:08:53 UTC 2023 - Daniel Garcia <daniel.garcia@suse.com>

View File

@@ -1,7 +1,7 @@
# #
# spec file for package python-CairoSVG # spec file for package python-CairoSVG
# #
# Copyright (c) 2023 SUSE LLC # Copyright (c) 2025 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@@ -16,20 +16,26 @@
# #
%define skip_python2 1 %if 0%{?suse_version} > 1500
%bcond_without libalternatives
%else
%bcond_with libalternatives
%endif
%{?sle15_python_module_pythons} %{?sle15_python_module_pythons}
Name: python-CairoSVG Name: python-CairoSVG
Version: 2.7.1 Version: 2.7.1
Release: 0 Release: 0
Summary: A Python SVG converter based on Cairo Summary: A Python SVG converter based on Cairo
License: LGPL-3.0-or-later License: LGPL-3.0-or-later
Group: Development/Languages/Python
URL: http://www.cairosvg.org/ URL: http://www.cairosvg.org/
Source: CairoSVG-%{version}.tar.xz Source: CairoSVG-%{version}.tar.xz
# PATCH-FIX-UPSTREAM gh#Kozea/CairoSVG#8ecb0806c4ed0813eb5dc6f27b36d9005acfa725
Patch0: use-underscore-in-setup.cfg.patch
BuildRequires: %{python_module Pillow} BuildRequires: %{python_module Pillow}
BuildRequires: %{python_module cairocffi} BuildRequires: %{python_module cairocffi}
BuildRequires: %{python_module cssselect2} BuildRequires: %{python_module cssselect2}
BuildRequires: %{python_module defusedxml} BuildRequires: %{python_module defusedxml}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pytest} BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools} BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module tinycss2} BuildRequires: %{python_module tinycss2}
@@ -40,8 +46,13 @@ Requires: python-cairocffi
Requires: python-cssselect2 Requires: python-cssselect2
Requires: python-defusedxml Requires: python-defusedxml
Requires: python-tinycss2 Requires: python-tinycss2
%if %{with libalternatives}
BuildRequires: alts
Requires: alts
%else
Requires(post): update-alternatives Requires(post): update-alternatives
Requires(postun): update-alternatives Requires(postun): update-alternatives
%endif
BuildArch: noarch BuildArch: noarch
%python_subpackages %python_subpackages
@@ -52,7 +63,7 @@ PostScript and PNG files.
For further information, please visit the CairoSVG website, http://www.cairosvg.org. For further information, please visit the CairoSVG website, http://www.cairosvg.org.
%prep %prep
%setup -q -n CairoSVG-%{version} %autosetup -p1 -n CairoSVG-%{version}
# remove needless pytest dependencies # remove needless pytest dependencies
sed -i setup.cfg \ sed -i setup.cfg \
-e '/pytest-runner/d' \ -e '/pytest-runner/d' \
@@ -60,16 +71,19 @@ sed -i setup.cfg \
-e '/--isort/d' -e '/--isort/d'
%build %build
%python_build %pyproject_wheel
%install %install
%python_install %pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib} %python_expand %fdupes %{buildroot}%{$python_sitelib}
%python_clone -a %{buildroot}/%{_bindir}/cairosvg %python_clone -a %{buildroot}/%{_bindir}/cairosvg
%check %check
%pytest %pytest
%pre
%python_libalternatives_reset_alternative cairosvg
%post %post
%python_install_alternative cairosvg %python_install_alternative cairosvg
@@ -80,6 +94,7 @@ sed -i setup.cfg \
%doc README.rst %doc README.rst
%license LICENSE %license LICENSE
%python_alternative %{_bindir}/cairosvg %python_alternative %{_bindir}/cairosvg
%{python_sitelib}/* %{python_sitelib}/cairosvg
%{python_sitelib}/[Cc]airo[Ss][Vv][Gg]-%{version}.dist-info
%changelog %changelog

View File

@@ -0,0 +1,22 @@
From 8ecb0806c4ed0813eb5dc6f27b36d9005acfa725 Mon Sep 17 00:00:00 2001
From: Guillaume Ayoub <guillaume@courtbouillon.org>
Date: Sat, 5 Aug 2023 11:03:35 +0200
Subject: [PATCH] Use underscore in setup.cfg instead of deprecated dash
---
setup.cfg | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/setup.cfg b/setup.cfg
index 05fa3742..c624e583 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -52,7 +52,7 @@ install_requires =
python_requires = >= 3.5
[options.entry_points]
-console-scripts =
+console_scripts =
cairosvg = cairosvg.__main__:main
[options.package_data]