2021-11-22 15:46:32 +00:00
|
|
|
#
|
|
|
|
|
# spec file for package python-weasyprint
|
|
|
|
|
#
|
2024-01-11 11:06:14 +00:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2021-11-22 15:46:32 +00: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.
|
|
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
2023-06-19 13:33:01 +00:00
|
|
|
%global brotli_min_version 1.0.1
|
|
|
|
|
%global cffi_min_version 0.6
|
|
|
|
|
%global cssselect2_min_version 0.1
|
|
|
|
|
%global fonttools_min_version 4.0.0
|
|
|
|
|
%global html5lib_min_version 1.1
|
|
|
|
|
%global Pillow_min_version 9.1.0
|
2024-06-10 10:00:45 +00:00
|
|
|
%global pypdf_min_version 0.10.0
|
2023-06-19 13:33:01 +00:00
|
|
|
%global Pyphen_min_version 0.9.1
|
2024-06-10 10:00:45 +00:00
|
|
|
%global tinycss2_min_version 1.3.0
|
2023-06-19 13:33:01 +00:00
|
|
|
%global zopfli_min_version 0.1.4
|
|
|
|
|
|
2024-01-11 11:06:14 +00:00
|
|
|
%{?sle15_python_module_pythons}
|
2021-11-22 15:46:32 +00:00
|
|
|
Name: python-weasyprint
|
2024-06-30 08:16:49 +00:00
|
|
|
Version: 62.3
|
2021-11-22 15:46:32 +00:00
|
|
|
Release: 0
|
|
|
|
|
Summary: Python module to convert web documents to PDF
|
|
|
|
|
License: BSD-3-Clause
|
|
|
|
|
URL: https://github.com/Kozea/WeasyPrint
|
2022-09-08 15:13:59 +00:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/w/weasyprint/weasyprint-%{version}.tar.gz
|
2021-11-22 15:46:32 +00:00
|
|
|
Source100: python-weasyprint-rpmlintrc
|
2024-06-10 10:00:45 +00:00
|
|
|
BuildRequires: %{python_module base >= 3.9}
|
2021-12-26 20:27:22 +00:00
|
|
|
BuildRequires: %{python_module flit-core}
|
|
|
|
|
BuildRequires: %{python_module pip}
|
2021-11-22 15:46:32 +00:00
|
|
|
BuildRequires: %{python_module setuptools >= 39.2.0}
|
|
|
|
|
BuildRequires: fdupes
|
|
|
|
|
BuildRequires: python-rpm-macros
|
2021-12-26 20:27:22 +00:00
|
|
|
Requires(post): update-alternatives
|
2024-03-16 16:23:27 +00:00
|
|
|
Requires(postun): update-alternatives
|
2021-11-22 15:46:32 +00:00
|
|
|
Requires: libgobject-2_0-0
|
|
|
|
|
Requires: pango
|
2023-06-19 13:33:01 +00:00
|
|
|
Requires: python-Pillow >= %{Pillow_min_version}
|
|
|
|
|
Requires: python-Pyphen >= %{Pyphen_min_version}
|
2022-09-08 14:52:57 +00:00
|
|
|
Requires: python-base >= 3.7
|
2023-06-19 13:33:01 +00:00
|
|
|
Requires: python-cffi >= %{cffi_min_version}
|
|
|
|
|
Requires: python-cssselect2 >= %{cssselect2_min_version}
|
|
|
|
|
Requires: python-html5lib >= %{html5lib_min_version}
|
|
|
|
|
Requires: python-pydyf >= %{pypdf_min_version}
|
|
|
|
|
Requires: python-tinycss2 >= %{tinycss2_min_version}
|
2021-12-17 21:10:54 +00:00
|
|
|
# SECTION fonttools[woff]
|
2023-06-19 13:33:01 +00:00
|
|
|
Requires: python-FontTools >= %{fonttools_min_version}
|
|
|
|
|
Requires: python-Brotli >= %{brotli_min_version}
|
|
|
|
|
Requires: python-zopfli >= %{zopfli_min_version}
|
2021-12-17 21:10:54 +00:00
|
|
|
# /SECTION
|
2021-11-22 15:46:32 +00:00
|
|
|
BuildArch: noarch
|
|
|
|
|
# SECTION test requirements
|
2023-06-19 13:33:01 +00:00
|
|
|
BuildRequires: %{python_module FontTools >= %{fonttools_min_version}}
|
|
|
|
|
BuildRequires: %{python_module Brotli >= %{brotli_min_version}}
|
|
|
|
|
BuildRequires: %{python_module Pillow >= %{Pillow_min_version}}
|
|
|
|
|
BuildRequires: %{python_module Pyphen >= %{Pyphen_min_version}}
|
|
|
|
|
BuildRequires: %{python_module cffi >= %{cffi_min_version}}
|
|
|
|
|
BuildRequires: %{python_module cssselect2 >= %{cssselect2_min_version}}
|
|
|
|
|
BuildRequires: %{python_module html5lib >= %{html5lib_min_version}}
|
|
|
|
|
BuildRequires: %{python_module pydyf >= %{pypdf_min_version}}
|
2021-12-07 16:04:00 +00:00
|
|
|
BuildRequires: %{python_module pytest}
|
2023-06-19 13:33:01 +00:00
|
|
|
BuildRequires: %{python_module tinycss2 >= %{tinycss2_min_version}}
|
|
|
|
|
BuildRequires: %{python_module zopfli >= %{zopfli_min_version}}
|
2021-11-22 15:46:32 +00:00
|
|
|
BuildRequires: dejavu-fonts
|
|
|
|
|
BuildRequires: gs
|
|
|
|
|
BuildRequires: libgobject-2_0-0
|
|
|
|
|
BuildRequires: pango
|
|
|
|
|
BuildRequires: xorg-x11-server
|
|
|
|
|
# /SECTION
|
|
|
|
|
Provides: python-WeasyPrint = %{version}-%{release}
|
|
|
|
|
Obsoletes: python-WeasyPrint < %{version}-%{release}
|
|
|
|
|
%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.
|
|
|
|
|
|
|
|
|
|
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
|
2023-06-19 13:33:01 +00:00
|
|
|
%autosetup -p1 -n weasyprint-%{version}
|
2021-12-17 21:10:54 +00:00
|
|
|
sed -i '/addopts/d' pyproject.toml
|
2021-11-22 15:46:32 +00:00
|
|
|
|
|
|
|
|
%build
|
2021-12-26 20:27:22 +00:00
|
|
|
export PYTHONPATH=$PWD
|
|
|
|
|
%pyproject_wheel
|
2021-11-22 15:46:32 +00:00
|
|
|
|
|
|
|
|
%install
|
2021-12-26 20:27:22 +00:00
|
|
|
%pyproject_install
|
2021-11-22 15:46:32 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2021-12-26 20:27:22 +00:00
|
|
|
%python_clone -a %{buildroot}%{_bindir}/weasyprint
|
2021-11-22 15:46:32 +00:00
|
|
|
|
|
|
|
|
%check
|
2023-06-14 04:45:53 +00:00
|
|
|
%pytest -k 'not test_linear_gradients and (5 or 12)' tests
|
2021-11-22 15:46:32 +00:00
|
|
|
|
2021-12-26 20:27:22 +00:00
|
|
|
%post
|
|
|
|
|
%python_install_alternative weasyprint
|
|
|
|
|
|
|
|
|
|
%postun
|
|
|
|
|
%python_uninstall_alternative weasyprint
|
|
|
|
|
|
2021-11-22 15:46:32 +00:00
|
|
|
%files %{python_files}
|
|
|
|
|
%doc README.rst
|
|
|
|
|
%license LICENSE
|
2021-12-26 20:27:22 +00:00
|
|
|
%python_alternative %{_bindir}/weasyprint
|
2021-12-17 21:10:54 +00:00
|
|
|
%{python_sitelib}/weasyprint
|
2024-06-10 10:00:45 +00:00
|
|
|
%{python_sitelib}/weasyprint-%{version}.dist-info
|
2021-11-22 15:46:32 +00:00
|
|
|
|
|
|
|
|
%changelog
|