88 lines
2.7 KiB
RPMSpec
88 lines
2.7 KiB
RPMSpec
#
|
|
# spec file for package python-CairoSVG
|
|
#
|
|
# Copyright (c) 2018 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 http://bugs.opensuse.org/
|
|
|
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
%define skip_python2 1
|
|
Name: python-CairoSVG
|
|
Version: 2.1.3
|
|
Release: 0
|
|
License: LGPL-3.0+
|
|
Summary: A Simple SVG Converter for Cairo
|
|
Url: http://www.cairosvg.org/
|
|
Group: Development/Languages/Python
|
|
Source: https://files.pythonhosted.org/packages/source/C/CairoSVG/CairoSVG-%{version}.tar.gz
|
|
BuildRequires: %{python_module Pillow}
|
|
BuildRequires: %{python_module devel}
|
|
BuildRequires: %{python_module setuptools}
|
|
BuildRequires: %{python_module cairocffi}
|
|
BuildRequires: %{python_module cssselect2}
|
|
BuildRequires: %{python_module defusedxml}
|
|
BuildRequires: %{python_module tinycss2}
|
|
BuildRequires: fdupes
|
|
BuildRequires: python-rpm-macros
|
|
# SECTION test requirements
|
|
BuildRequires: %{python_module pytest}
|
|
BuildRequires: %{python_module pytest-cov}
|
|
BuildRequires: %{python_module pytest-flake8}
|
|
BuildRequires: %{python_module pytest-isort}
|
|
BuildRequires: %{python_module pytest-runner}
|
|
# /SECTION
|
|
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}
|
|
|
|
%build
|
|
%python_build
|
|
|
|
%install
|
|
%python_install
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
%python_clone -a %{buildroot}/%{_bindir}/cairosvg
|
|
|
|
%check
|
|
%python_exec setup.py test
|
|
|
|
%post
|
|
%python_install_alternative cairosvg
|
|
|
|
%postun
|
|
%python_uninstall_alternative cairosvg
|
|
|
|
%files %{python_files}
|
|
%doc NEWS.rst README.rst
|
|
%license COPYING
|
|
%python_alternative %{_bindir}/cairosvg
|
|
%{python_sitelib}/*
|
|
|
|
%changelog
|