14
0
Files
python-weasyprint/python-weasyprint.spec

123 lines
4.4 KiB
RPMSpec
Raw Normal View History

#
# spec file for package python-weasyprint
#
# Copyright (c) 2024 SUSE LLC
#
# 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/
#
%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
%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
%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
%global zopfli_min_version 0.1.4
%{?sle15_python_module_pythons}
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
Release: 0
Summary: Python module to convert web documents to PDF
License: BSD-3-Clause
URL: https://github.com/Kozea/WeasyPrint
Source: https://files.pythonhosted.org/packages/source/w/weasyprint/weasyprint-%{version}.tar.gz
Source100: python-weasyprint-rpmlintrc
BuildRequires: %{python_module base >= 3.9}
BuildRequires: %{python_module flit-core}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools >= 39.2.0}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires(post): update-alternatives
Requires(postun): update-alternatives
Requires: libgobject-2_0-0
Requires: pango
Requires: python-Pillow >= %{Pillow_min_version}
Requires: python-Pyphen >= %{Pyphen_min_version}
Requires: python-base >= 3.7
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}
# SECTION fonttools[woff]
Requires: python-FontTools >= %{fonttools_min_version}
Requires: python-Brotli >= %{brotli_min_version}
Requires: python-zopfli >= %{zopfli_min_version}
# /SECTION
BuildArch: noarch
# SECTION test requirements
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}}
BuildRequires: %{python_module pydyf >= %{pypdf_min_version}}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module tinycss2 >= %{tinycss2_min_version}}
BuildRequires: %{python_module zopfli >= %{zopfli_min_version}}
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
%autosetup -p1 -n weasyprint-%{version}
sed -i '/addopts/d' pyproject.toml
%build
export PYTHONPATH=$PWD
%pyproject_wheel
%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%python_clone -a %{buildroot}%{_bindir}/weasyprint
%check
- Update to 59.0: * New features: + a4fc7a1: Support image-orientation * Dependencies: + #1754: Pillow 9.1.0 is now needed * Bug fixes: + #1864: Handle overflow for svg and symbol tags in SVG images + #1867: Remove duplicate compression of attachments + d0ad5c1: Override use tag children instead of drawing their references + #1874: Drawn underline and overline behind text + #1822, #1823: Fix vertical positioning for absolute replaced elements + #1807: Don’t crash when out-of-flow box is split in out-of-flow parent + #1806: Don’t crash when fixed elements aren’t displayed yet in aborted line + #1809: Fix background drawing for out-of-the-page transformed boxes + #1764: Use reference instead of stream for annotation appearance stream + #1783: Fix multiple font weights for @font-face declarations + #1756: Fix rem font size for SVG images + #1755: Keep format when transposing images + #1753: Don’t use deprecated read_text function when files is available + #1741: Generate better manpage + #1747: Correctly set target counters in pages’ absolute elements + #1748: Always set font size when font is changed in line + #1739: Set baseline on all flex containers + #1740: Don’t crash when currentColor is set on root svg tag + #1718: Don’t crash with empty bitmap glyphs + #1736: Always use the font’s vector variant when possible + #1662: Use a stable key to store stream fonts + #1733: Don’t remove attachments when adding internal anchors * Performance: OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-weasyprint?expand=0&rev=19
2023-06-14 04:45:53 +00:00
%pytest -k 'not test_linear_gradients and (5 or 12)' tests
%post
%python_install_alternative weasyprint
%postun
%python_uninstall_alternative weasyprint
%files %{python_files}
%doc README.rst
%license LICENSE
%python_alternative %{_bindir}/weasyprint
%{python_sitelib}/weasyprint
%{python_sitelib}/weasyprint-%{version}.dist-info
%changelog