2018-05-24 22:56:21 +02:00
|
|
|
#
|
|
|
|
# spec file for package python-CairoSVG
|
|
|
|
#
|
2021-01-11 21:39:14 +01:00
|
|
|
# Copyright (c) 2021 SUSE LLC
|
2018-05-24 22:56:21 +02:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2018-12-04 14:18:38 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
|
|
#
|
2018-05-24 22:56:21 +02:00
|
|
|
|
|
|
|
|
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2019-02-13 15:58:11 +01:00
|
|
|
%define skip_python2 1
|
2018-05-24 22:56:21 +02:00
|
|
|
Name: python-CairoSVG
|
2021-01-11 21:39:14 +01:00
|
|
|
Version: 2.5.1
|
2018-05-24 22:56:21 +02:00
|
|
|
Release: 0
|
2018-12-05 20:21:23 +01:00
|
|
|
Summary: A Python SVG converter based on Cairo
|
2018-12-04 14:18:38 +01:00
|
|
|
License: LGPL-3.0-or-later
|
2018-05-24 22:56:21 +02:00
|
|
|
Group: Development/Languages/Python
|
2019-02-13 15:58:11 +01:00
|
|
|
URL: http://www.cairosvg.org/
|
2021-01-11 21:39:14 +01:00
|
|
|
Source: CairoSVG-%{version}.tar.xz
|
2018-05-24 22:56:21 +02:00
|
|
|
BuildRequires: %{python_module Pillow}
|
|
|
|
BuildRequires: %{python_module cairocffi}
|
|
|
|
BuildRequires: %{python_module cssselect2}
|
|
|
|
BuildRequires: %{python_module defusedxml}
|
2019-02-13 15:58:11 +01:00
|
|
|
BuildRequires: %{python_module pytest}
|
2018-12-04 14:18:38 +01:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2018-05-24 22:56:21 +02:00
|
|
|
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
|
2019-02-13 15:58:11 +01:00
|
|
|
Requires(post): update-alternatives
|
|
|
|
Requires(postun): update-alternatives
|
2018-05-24 22:56:21 +02:00
|
|
|
BuildArch: noarch
|
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
%description
|
|
|
|
CairoSVG is a SVG converter based on Cairo. It can export SVG files to PDF,
|
|
|
|
PostScript and PNG files.
|
|
|
|
|
2018-12-05 20:21:23 +01:00
|
|
|
For further information, please visit the CairoSVG website, http://www.cairosvg.org.
|
2018-05-24 22:56:21 +02:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n CairoSVG-%{version}
|
2019-02-13 15:58:11 +01:00
|
|
|
# remove needless pytest dependencies
|
|
|
|
sed -i setup.cfg \
|
|
|
|
-e '/pytest-runner/d' \
|
|
|
|
-e '/--flake8/d' \
|
|
|
|
-e '/--isort/d'
|
2018-05-24 22:56:21 +02:00
|
|
|
|
|
|
|
%build
|
|
|
|
%python_build
|
|
|
|
|
|
|
|
%install
|
|
|
|
%python_install
|
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
%python_clone -a %{buildroot}/%{_bindir}/cairosvg
|
|
|
|
|
|
|
|
%check
|
2019-09-24 10:48:09 +02:00
|
|
|
%pytest
|
2018-05-24 22:56:21 +02:00
|
|
|
|
|
|
|
%post
|
|
|
|
%python_install_alternative cairosvg
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%python_uninstall_alternative cairosvg
|
|
|
|
|
|
|
|
%files %{python_files}
|
2019-02-13 16:04:34 +01:00
|
|
|
%doc README.rst
|
|
|
|
%license LICENSE
|
2018-05-24 22:56:21 +02:00
|
|
|
%python_alternative %{_bindir}/cairosvg
|
|
|
|
%{python_sitelib}/*
|
|
|
|
|
|
|
|
%changelog
|