1
0

2 Commits

Author SHA256 Message Date
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 40 additions and 8 deletions

View File

@@ -1,3 +1,11 @@
-------------------------------------------------------------------
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>

View File

@@ -1,7 +1,7 @@
#
# 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
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,20 +16,21 @@
#
%define skip_python2 1
%{?sle15_python_module_pythons}
Name: python-CairoSVG
Version: 2.7.1
Release: 0
Summary: A Python SVG converter based on Cairo
License: LGPL-3.0-or-later
Group: Development/Languages/Python
URL: http://www.cairosvg.org/
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 cairocffi}
BuildRequires: %{python_module cssselect2}
BuildRequires: %{python_module defusedxml}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module tinycss2}
@@ -41,7 +42,7 @@ Requires: python-cssselect2
Requires: python-defusedxml
Requires: python-tinycss2
Requires(post): update-alternatives
Requires(postun):update-alternatives
Requires(postun): update-alternatives
BuildArch: noarch
%python_subpackages
@@ -52,7 +53,7 @@ PostScript and PNG files.
For further information, please visit the CairoSVG website, http://www.cairosvg.org.
%prep
%setup -q -n CairoSVG-%{version}
%autosetup -p1 -n CairoSVG-%{version}
# remove needless pytest dependencies
sed -i setup.cfg \
-e '/pytest-runner/d' \
@@ -60,10 +61,10 @@ sed -i setup.cfg \
-e '/--isort/d'
%build
%python_build
%pyproject_wheel
%install
%python_install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%python_clone -a %{buildroot}/%{_bindir}/cairosvg
@@ -80,6 +81,7 @@ sed -i setup.cfg \
%doc README.rst
%license LICENSE
%python_alternative %{_bindir}/cairosvg
%{python_sitelib}/*
%{python_sitelib}/cairosvg
%{python_sitelib}/[Cc]airo[Ss][Vv][Gg]-%{version}.dist-info
%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]