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
|
Accepting request 1221470 from home:glaubitz:branches:devel:languages:python
- Update to 63.0
* #2252, #895: Handle page groups, with financial support from Code & Co.
* #1630, #2286: Support CSS Color Level 4
* #2192: Add PDF variant for debugging purpose
* #2208: Support submit inputs in PDF forms
* #2139: Support mask-border-* properties
* #1831, #2143: Support radio inputs in PDF forms
* #2262: Avoid integer overflows when converting units from/to doubles
* #2260: Avoid float collision with box establishing formatting context
* #2240, #2242: Handle svg tags with no size
* #2231, #1171, #2222, #1208: Fix several problems related to flex-direction: column
* #2239: Don’t fail when SVG markers are undefined references
* #2230, #2238: Set explicit flags when loading DLLs on Windows
* #2228, #1942: Store original and PDF stream images in different cache slots
* #2234: Apply stylesheet and other basic operations to SVG root tag
* #2054, #2233: Keep auto margins on flex layout boxes
* #1883: Don’t crash with empty list marker strings
* #2216: Fix vertical alignment of out-of-flow elements in tables
* #996, #2219: Don’t ignore absolutely positioned elements inside flex boxes
* #2217: Don’t crash with normal column gaps
* #1817: Don’t assume that lines break after spaces
* #1868: Don’t break rows with atomic cells
* #2166: Don’t display bottom border on cells in split rows
* 61852c4: Capture fontTools logs when subsetting fonts
* #2190: Don’t use a pattern when drawing backgrounds for no-repeat background images
* #2185: Check that Harfbuzz version is at least 4.1.0 to subset fonts
* #2180: Store width for all glyphs when font is not subset
* #2183: Respect break-inside: avoid for flex items
* #2055, #2058: Fix right-to-left tables with collapsed borders
* #2179, #1128: Handle buggy Adobe Photoshop CMYK JPEGs
OBS-URL: https://build.opensuse.org/request/show/1221470
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-weasyprint?expand=0&rev=34
2024-11-05 15:37:24 +00:00
|
|
|
%global tinyhtml5_min_version 2.0.0
|
2023-06-19 13:33:01 +00:00
|
|
|
%global Pillow_min_version 9.1.0
|
Accepting request 1221470 from home:glaubitz:branches:devel:languages:python
- Update to 63.0
* #2252, #895: Handle page groups, with financial support from Code & Co.
* #1630, #2286: Support CSS Color Level 4
* #2192: Add PDF variant for debugging purpose
* #2208: Support submit inputs in PDF forms
* #2139: Support mask-border-* properties
* #1831, #2143: Support radio inputs in PDF forms
* #2262: Avoid integer overflows when converting units from/to doubles
* #2260: Avoid float collision with box establishing formatting context
* #2240, #2242: Handle svg tags with no size
* #2231, #1171, #2222, #1208: Fix several problems related to flex-direction: column
* #2239: Don’t fail when SVG markers are undefined references
* #2230, #2238: Set explicit flags when loading DLLs on Windows
* #2228, #1942: Store original and PDF stream images in different cache slots
* #2234: Apply stylesheet and other basic operations to SVG root tag
* #2054, #2233: Keep auto margins on flex layout boxes
* #1883: Don’t crash with empty list marker strings
* #2216: Fix vertical alignment of out-of-flow elements in tables
* #996, #2219: Don’t ignore absolutely positioned elements inside flex boxes
* #2217: Don’t crash with normal column gaps
* #1817: Don’t assume that lines break after spaces
* #1868: Don’t break rows with atomic cells
* #2166: Don’t display bottom border on cells in split rows
* 61852c4: Capture fontTools logs when subsetting fonts
* #2190: Don’t use a pattern when drawing backgrounds for no-repeat background images
* #2185: Check that Harfbuzz version is at least 4.1.0 to subset fonts
* #2180: Store width for all glyphs when font is not subset
* #2183: Respect break-inside: avoid for flex items
* #2055, #2058: Fix right-to-left tables with collapsed borders
* #2179, #1128: Handle buggy Adobe Photoshop CMYK JPEGs
OBS-URL: https://build.opensuse.org/request/show/1221470
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-weasyprint?expand=0&rev=34
2024-11-05 15:37:24 +00:00
|
|
|
%global pypdf_min_version 0.11.0
|
2023-06-19 13:33:01 +00:00
|
|
|
%global Pyphen_min_version 0.9.1
|
Accepting request 1221470 from home:glaubitz:branches:devel:languages:python
- Update to 63.0
* #2252, #895: Handle page groups, with financial support from Code & Co.
* #1630, #2286: Support CSS Color Level 4
* #2192: Add PDF variant for debugging purpose
* #2208: Support submit inputs in PDF forms
* #2139: Support mask-border-* properties
* #1831, #2143: Support radio inputs in PDF forms
* #2262: Avoid integer overflows when converting units from/to doubles
* #2260: Avoid float collision with box establishing formatting context
* #2240, #2242: Handle svg tags with no size
* #2231, #1171, #2222, #1208: Fix several problems related to flex-direction: column
* #2239: Don’t fail when SVG markers are undefined references
* #2230, #2238: Set explicit flags when loading DLLs on Windows
* #2228, #1942: Store original and PDF stream images in different cache slots
* #2234: Apply stylesheet and other basic operations to SVG root tag
* #2054, #2233: Keep auto margins on flex layout boxes
* #1883: Don’t crash with empty list marker strings
* #2216: Fix vertical alignment of out-of-flow elements in tables
* #996, #2219: Don’t ignore absolutely positioned elements inside flex boxes
* #2217: Don’t crash with normal column gaps
* #1817: Don’t assume that lines break after spaces
* #1868: Don’t break rows with atomic cells
* #2166: Don’t display bottom border on cells in split rows
* 61852c4: Capture fontTools logs when subsetting fonts
* #2190: Don’t use a pattern when drawing backgrounds for no-repeat background images
* #2185: Check that Harfbuzz version is at least 4.1.0 to subset fonts
* #2180: Store width for all glyphs when font is not subset
* #2183: Respect break-inside: avoid for flex items
* #2055, #2058: Fix right-to-left tables with collapsed borders
* #2179, #1128: Handle buggy Adobe Photoshop CMYK JPEGs
OBS-URL: https://build.opensuse.org/request/show/1221470
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-weasyprint?expand=0&rev=34
2024-11-05 15:37:24 +00:00
|
|
|
%global tinycss2_min_version 1.4.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
|
Accepting request 1221470 from home:glaubitz:branches:devel:languages:python
- Update to 63.0
* #2252, #895: Handle page groups, with financial support from Code & Co.
* #1630, #2286: Support CSS Color Level 4
* #2192: Add PDF variant for debugging purpose
* #2208: Support submit inputs in PDF forms
* #2139: Support mask-border-* properties
* #1831, #2143: Support radio inputs in PDF forms
* #2262: Avoid integer overflows when converting units from/to doubles
* #2260: Avoid float collision with box establishing formatting context
* #2240, #2242: Handle svg tags with no size
* #2231, #1171, #2222, #1208: Fix several problems related to flex-direction: column
* #2239: Don’t fail when SVG markers are undefined references
* #2230, #2238: Set explicit flags when loading DLLs on Windows
* #2228, #1942: Store original and PDF stream images in different cache slots
* #2234: Apply stylesheet and other basic operations to SVG root tag
* #2054, #2233: Keep auto margins on flex layout boxes
* #1883: Don’t crash with empty list marker strings
* #2216: Fix vertical alignment of out-of-flow elements in tables
* #996, #2219: Don’t ignore absolutely positioned elements inside flex boxes
* #2217: Don’t crash with normal column gaps
* #1817: Don’t assume that lines break after spaces
* #1868: Don’t break rows with atomic cells
* #2166: Don’t display bottom border on cells in split rows
* 61852c4: Capture fontTools logs when subsetting fonts
* #2190: Don’t use a pattern when drawing backgrounds for no-repeat background images
* #2185: Check that Harfbuzz version is at least 4.1.0 to subset fonts
* #2180: Store width for all glyphs when font is not subset
* #2183: Respect break-inside: avoid for flex items
* #2055, #2058: Fix right-to-left tables with collapsed borders
* #2179, #1128: Handle buggy Adobe Photoshop CMYK JPEGs
OBS-URL: https://build.opensuse.org/request/show/1221470
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-weasyprint?expand=0&rev=34
2024-11-05 15:37:24 +00:00
|
|
|
Version: 63.0
|
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}}
|
Accepting request 1221470 from home:glaubitz:branches:devel:languages:python
- Update to 63.0
* #2252, #895: Handle page groups, with financial support from Code & Co.
* #1630, #2286: Support CSS Color Level 4
* #2192: Add PDF variant for debugging purpose
* #2208: Support submit inputs in PDF forms
* #2139: Support mask-border-* properties
* #1831, #2143: Support radio inputs in PDF forms
* #2262: Avoid integer overflows when converting units from/to doubles
* #2260: Avoid float collision with box establishing formatting context
* #2240, #2242: Handle svg tags with no size
* #2231, #1171, #2222, #1208: Fix several problems related to flex-direction: column
* #2239: Don’t fail when SVG markers are undefined references
* #2230, #2238: Set explicit flags when loading DLLs on Windows
* #2228, #1942: Store original and PDF stream images in different cache slots
* #2234: Apply stylesheet and other basic operations to SVG root tag
* #2054, #2233: Keep auto margins on flex layout boxes
* #1883: Don’t crash with empty list marker strings
* #2216: Fix vertical alignment of out-of-flow elements in tables
* #996, #2219: Don’t ignore absolutely positioned elements inside flex boxes
* #2217: Don’t crash with normal column gaps
* #1817: Don’t assume that lines break after spaces
* #1868: Don’t break rows with atomic cells
* #2166: Don’t display bottom border on cells in split rows
* 61852c4: Capture fontTools logs when subsetting fonts
* #2190: Don’t use a pattern when drawing backgrounds for no-repeat background images
* #2185: Check that Harfbuzz version is at least 4.1.0 to subset fonts
* #2180: Store width for all glyphs when font is not subset
* #2183: Respect break-inside: avoid for flex items
* #2055, #2058: Fix right-to-left tables with collapsed borders
* #2179, #1128: Handle buggy Adobe Photoshop CMYK JPEGs
OBS-URL: https://build.opensuse.org/request/show/1221470
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-weasyprint?expand=0&rev=34
2024-11-05 15:37:24 +00:00
|
|
|
BuildRequires: %{python_module tinyhtml5 >= %{tinyhtml5_min_version}}
|
2023-06-19 13:33:01 +00:00
|
|
|
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
|