diff --git a/python-CairoSVG.changes b/python-CairoSVG.changes index 1dc6eb2..4e74507 100644 --- a/python-CairoSVG.changes +++ b/python-CairoSVG.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed Apr 2 03:00:08 UTC 2025 - Steve Kowalik + +- 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 diff --git a/python-CairoSVG.spec b/python-CairoSVG.spec index a8564c9..309cf5e 100644 --- a/python-CairoSVG.spec +++ b/python-CairoSVG.spec @@ -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 diff --git a/use-underscore-in-setup.cfg.patch b/use-underscore-in-setup.cfg.patch new file mode 100644 index 0000000..a401827 --- /dev/null +++ b/use-underscore-in-setup.cfg.patch @@ -0,0 +1,22 @@ +From 8ecb0806c4ed0813eb5dc6f27b36d9005acfa725 Mon Sep 17 00:00:00 2001 +From: Guillaume Ayoub +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]