forked from pool/python-CairoSVG
2ce715b3b5
* Fix race condition in tests * Fix scale for images with no viewBox OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-CairoSVG?expand=0&rev=18
86 lines
2.5 KiB
RPMSpec
86 lines
2.5 KiB
RPMSpec
#
|
|
# spec file for package python-CairoSVG
|
|
#
|
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
|
#
|
|
# 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.4.2
|
|
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: https://files.pythonhosted.org/packages/source/C/CairoSVG/CairoSVG-%{version}.tar.gz
|
|
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
|