forked from pool/python-CairoSVG
Matej Cepl
844abfbe9d
- Update to version 2.5.1. * Security fix: When processing SVG files, CairoSVG was using two regular expressions which are vulnerable to Regular Expression Denial of Service (REDoS). If an attacker provided a malicious SVG, it could make CairoSVG get stuck processing the file for a very long time. * Fix marker positions for unclosed paths * Follow hint when only output_width or output_height is set * Handle opacity on raster images * Don’t crash when use tags reference unknown tags * Take care of the next letter when A/a is replaced by l * Fix misalignment in node.vertices - Updates for version 2.5.0. * Drop support of Python 3.5, add support of Python 3.9. * Add EPS export * Add background-color, negate-colors, and invert-images options * Improve support for font weights * Fix opacity of patterns and gradients * Support auto-start-reverse value for orient * Draw images contained in defs * Add Exif transposition support * Handle dominant-baseline * Support transform-origin - Add _service file to fetch required submodule. OBS-URL: https://build.opensuse.org/request/show/862141 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-CairoSVG?expand=0&rev=20
86 lines
2.4 KiB
RPMSpec
86 lines
2.4 KiB
RPMSpec
#
|
|
# spec file for package python-CairoSVG
|
|
#
|
|
# Copyright (c) 2021 SUSE LLC
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
%define skip_python2 1
|
|
Name: python-CairoSVG
|
|
Version: 2.5.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
|
|
BuildRequires: %{python_module Pillow}
|
|
BuildRequires: %{python_module cairocffi}
|
|
BuildRequires: %{python_module cssselect2}
|
|
BuildRequires: %{python_module defusedxml}
|
|
BuildRequires: %{python_module pytest}
|
|
BuildRequires: %{python_module setuptools}
|
|
BuildRequires: %{python_module tinycss2}
|
|
BuildRequires: fdupes
|
|
BuildRequires: python-rpm-macros
|
|
Requires: python-Pillow
|
|
Requires: python-cairocffi
|
|
Requires: python-cssselect2
|
|
Requires: python-defusedxml
|
|
Requires: python-tinycss2
|
|
Requires(post): update-alternatives
|
|
Requires(postun): update-alternatives
|
|
BuildArch: noarch
|
|
%python_subpackages
|
|
|
|
%description
|
|
CairoSVG is a SVG converter based on Cairo. It can export SVG files to PDF,
|
|
PostScript and PNG files.
|
|
|
|
For further information, please visit the CairoSVG website, http://www.cairosvg.org.
|
|
|
|
%prep
|
|
%setup -q -n CairoSVG-%{version}
|
|
# remove needless pytest dependencies
|
|
sed -i setup.cfg \
|
|
-e '/pytest-runner/d' \
|
|
-e '/--flake8/d' \
|
|
-e '/--isort/d'
|
|
|
|
%build
|
|
%python_build
|
|
|
|
%install
|
|
%python_install
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
%python_clone -a %{buildroot}/%{_bindir}/cairosvg
|
|
|
|
%check
|
|
%pytest
|
|
|
|
%post
|
|
%python_install_alternative cairosvg
|
|
|
|
%postun
|
|
%python_uninstall_alternative cairosvg
|
|
|
|
%files %{python_files}
|
|
%doc README.rst
|
|
%license LICENSE
|
|
%python_alternative %{_bindir}/cairosvg
|
|
%{python_sitelib}/*
|
|
|
|
%changelog
|