File python-WeasyPrint.spec of Package python-WeasyPrint
#
# spec file for package python-WeasyPrint
#
# 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-%{**}}
Name: python-WeasyPrint
Version: 0.42.2
Release: 0
Summary: WeasyPrint converts web documents to PDF
License: BSD-3-Clause
Group: Development/Languages/Python
Url: http://weasyprint.org/
Source: https://pypi.python.org/packages/source/W/WeasyPrint/WeasyPrint-%{version}.tar.gz
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: cairo
Requires: pango >= 1.38
Requires: python-CairoSVG >= 1.0.2
Requires: python-Pyphen >= 0.8
Requires: python-cairocffi >= 0.5
Requires: python-cairocffi-pixbuf >= 0.5
Requires: python-cffi >= 0.6
Requires: python-cssselect2 >= 0.1
Requires: python-html5lib >= 0.999999999
Requires: python-pdfrw >= 0.4
Requires: python-setuptools
Requires: python-tinycss2 >= 0.5
Recommends: Gdk-Pixbuf
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildArch: noarch
%python_subpackages
%description
WeasyPrint is a visual rendering engine for HTML and CSS that can export
to PDF. It aims to support web standards for printing.
WeasyPrint is free software made available under a BSD license.
It is based on various libraries but *not* on a full rendering engine like
WebKit or Gecko. The CSS layout engine is written in Python, designed for
pagination, and meant to be easy to hack on.
%prep
%setup -q -n WeasyPrint-%{version}
%build
%python_build
%install
%python_install
%python_clone -a %{buildroot}%{_bindir}/weasyprint
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%post
%{python_install_alternative weasyprint}
%postun
%{python_uninstall_alternative weasyprint}
%files %{python_files}
%defattr(-,root,root,-)
%doc AUTHORS CHANGES LICENSE README.rst
%python_alternative %{_bindir}/weasyprint
%{python_sitelib}/*
%changelog