Compare commits

..

39 commits

Author SHA1 Message Date
Fedora Release Engineering
9c933057a5 Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild 2026-07-17 08:44:20 +00:00
b1ddfc7a67 update to 69.0 2026-06-11 08:44:31 +02:00
Python Maint
cf76714eba Rebuilt for Python 3.15 2026-06-05 15:03:44 +02:00
c53d97d231 update to 68.1 2026-02-07 22:07:04 +01:00
f5ef1f00bc update to 68.0 2026-01-20 15:24:17 +01:00
Fedora Release Engineering
5d312000eb Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild 2026-01-17 20:10:01 +00:00
a81b0ff2a5 update to 67.0 2025-12-03 20:16:12 +01:00
Python Maint
b80060c09b Rebuilt for Python 3.14.0rc3 bytecode 2025-09-19 15:03:18 +02:00
Python Maint
92594aaf1f Rebuilt for Python 3.14.0rc2 bytecode 2025-08-15 15:22:49 +02:00
381e53f562 update to 66.0 2025-07-28 09:50:30 +02:00
Fedora Release Engineering
37cfa23b75 Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-25 20:20:25 +00:00
Python Maint
cb095e65e8 Rebuilt for Python 3.14 2025-06-03 16:43:46 +02:00
d5e7b20af5 update to 65.1 2025-04-14 14:23:36 +02:00
43736eea94 update to 65.0 2025-03-23 19:59:23 +01:00
2abf0e9719 update to 64.1 2025-03-05 20:51:12 +01:00
6c6b9f4fdb update to 64.0 2025-01-30 17:54:29 +01:00
Fedora Release Engineering
347ae0818f Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-19 14:51:17 +00:00
6a4d29d9b9 update to 63.1 2025-01-12 17:30:36 +01:00
Fedora Release Engineering
21e6514d49 Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-20 09:12:25 +00:00
21ced46f40 update to 62.3 2024-06-24 08:37:01 +02:00
Python Maint
d4a86ce346 Rebuilt for Python 3.13 2024-06-08 20:32:01 +02:00
577206b1f1 update to 62.2 2024-06-04 17:05:52 +02:00
02ea6e0f80 update to 62.1 2024-05-06 17:14:31 +02:00
59d62d5272 update to 62.0 2024-05-02 06:40:47 +02:00
44343664a8 update to 61.2 2024-03-09 09:49:10 +01:00
512f563c36 update to 61.1 2024-02-26 15:06:02 +01:00
2150d8fe9e update to 61.0 2024-02-12 22:07:34 +01:00
7b09dad3de use just flit-core as build dependency 2024-01-25 21:52:47 +01:00
4b6acaca0e update to 60.2 2023-12-12 13:53:47 +01:00
5c6be48647 parallelize test execution
On a 6 core AMD Ryzen 2600 (12 virtual cores) I was able to reduce the time to
run the complete test suite from 110s -> 20s
2023-10-06 14:29:23 +02:00
904cc25614 update to 60.1 2023-10-05 16:34:39 +02:00
Fedora Release Engineering
0365836691 Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-22 18:04:06 +00:00
e1713b0943 add missing sources 2023-07-09 08:45:34 +02:00
825d643da0 add patch so the test suite passes for Python 3.12 2023-07-09 07:50:31 +02:00
9e63eb3cb1 update to 59.0 2023-05-11 11:44:49 +02:00
20c9238945 make tests pass with pydyf 0.6 2023-04-15 09:52:51 +02:00
e7fa44c9d1 SPDX migration 2023-04-15 09:47:05 +02:00
66d7328fb2 update to 58.1 2023-03-07 15:14:55 +01:00
7b0a32ba25 update to 58.0 2023-02-17 18:05:31 +01:00
3 changed files with 109 additions and 182 deletions

View file

@ -1 +1 @@
SHA512 (weasyprint-58.1.tar.gz) = 75a3512ce02551c2e8247cf7982d3db683c8aef92215e5b4584ca20d5e3f6a4603c65f98e8fcf513b8aff82ebedf221da7dd243e344c9d3626eaa7907fdbd5c2
SHA512 (weasyprint-69.0.tar.gz) = fb56d7f6173f8a67f8ef4c31408c03625b0a774d0efde003f779e3da054737c88afe9f44ee40b6dda5fc92cfacfa5709d4d96bf1a112862d309eaf2d93881ef6

View file

@ -1,173 +0,0 @@
From e49d9555090ecec4f76b31f7beba18975f471211 Mon Sep 17 00:00:00 2001
From: Guillaume Ayoub <guillaume@courtbouillon.org>
Date: Tue, 21 Mar 2023 14:58:47 +0100
Subject: [PATCH] Make tests pass with pydyf 0.6.0
---
docs/first_steps.rst | 2 +-
pyproject.toml | 2 +-
tests/test_pdf.py | 40 ++++++++++++++++++++--------------------
3 files changed, 22 insertions(+), 22 deletions(-)
diff --git a/docs/first_steps.rst b/docs/first_steps.rst
index 85c3ec857..e2aacefe8 100644
--- a/docs/first_steps.rst
+++ b/docs/first_steps.rst
@@ -11,7 +11,7 @@ WeasyPrint |version| depends on:
* Python_ ≥ 3.7.0
* Pango_ ≥ 1.44.0
-* pydyf_ ≥ 0.5.0
+* pydyf_ ≥ 0.6.0
* CFFI_ ≥ 0.6
* html5lib_ ≥ 1.1
* tinycss2_ ≥ 1.0.0
diff --git a/pyproject.toml b/pyproject.toml
index 1c1495473..570aef8af 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -12,7 +12,7 @@ requires-python = '>=3.7'
readme = {file = 'README.rst', content-type = 'text/x-rst'}
license = {file = 'LICENSE'}
dependencies = [
- 'pydyf >=0.5.0',
+ 'pydyf >=0.6.0',
'cffi >=0.6',
'html5lib >=1.1',
'tinycss2 >=1.0.0',
diff --git a/tests/test_pdf.py b/tests/test_pdf.py
index 3bcc360ac..3d4dcdd0a 100644
--- a/tests/test_pdf.py
+++ b/tests/test_pdf.py
@@ -26,7 +26,7 @@
def test_page_size_zoom(zoom):
pdf = FakeHTML(string='<style>@page{size:3in 4in').write_pdf(zoom=zoom)
width, height = int(216 * zoom), int(288 * zoom)
- assert f'/MediaBox [ 0 0 {width} {height} ]'.encode() in pdf
+ assert f'/MediaBox [0 0 {width} {height}]'.encode() in pdf
@assert_no_logs
@@ -57,7 +57,7 @@ def test_bookmarks_2():
@assert_no_logs
def test_bookmarks_3():
pdf = FakeHTML(string='<h1>a nbsp…</h1>').write_pdf()
- assert re.findall(b'/Title <(.*)>', pdf) == [
+ assert re.findall(b'/Title <(\\w*)>', pdf) == [
b'feff006100a0006e0062007300702026']
@@ -327,11 +327,11 @@ def test_links():
''', base_url=resource_filename('<inline HTML>')).write_pdf()
uris = re.findall(b'/URI \\((.*)\\)', pdf)
- types = re.findall(b'/S (.*)', pdf)
- subtypes = re.findall(b'/Subtype (.*)', pdf)
+ types = re.findall(b'/S (/\\w*)', pdf)
+ subtypes = re.findall(b'/Subtype (/\\w*)', pdf)
rects = [
[float(number) for number in match.split()] for match in re.findall(
- b'/Rect \\[ ([\\d\\.]+ [\\d\\.]+ [\\d\\.]+ [\\d\\.]+) \\]', pdf)]
+ b'/Rect \\[([\\d\\.]+ [\\d\\.]+ [\\d\\.]+ [\\d\\.]+)\\]', pdf)]
# 30pt wide (like the image), 20pt high (like line-height)
assert uris.pop(0) == b'https://weasyprint.org'
@@ -349,7 +349,7 @@ def test_links():
assert subtypes.pop(0) == b'/Link'
assert b'/Dest (lipsum)' in pdf
link = re.search(
- b'\\(lipsum\\) \\[ \\d+ 0 R /XYZ ([\\d\\.]+ [\\d\\.]+ [\\d\\.]+) ]',
+ b'\\(lipsum\\) \\[\\d+ 0 R /XYZ ([\\d\\.]+ [\\d\\.]+ [\\d\\.]+)]',
pdf).group(1)
assert [float(number) for number in link.split()] == [0, TOP, 0]
assert rects.pop(0) == [10, TOP - 100, 10 + 32, TOP - 100 - 20]
@@ -362,7 +362,7 @@ def test_links():
assert subtypes.pop(0) == b'/Link'
assert b'/Dest (hello)' in pdf
link = re.search(
- b'\\(hello\\) \\[ \\d+ 0 R /XYZ ([\\d\\.]+ [\\d\\.]+ [\\d\\.]+) ]',
+ b'\\(hello\\) \\[\\d+ 0 R /XYZ ([\\d\\.]+ [\\d\\.]+ [\\d\\.]+)]',
pdf).group(1)
assert [float(number) for number in link.split()] == [0, TOP - 200, 0]
assert rects.pop(0) == [0, TOP, RIGHT, TOP - 30]
@@ -387,7 +387,7 @@ def test_relative_links_no_height():
string='<a href="../lipsum" style="display: block"></a>a',
base_url='https://weasyprint.org/foo/bar/').write_pdf()
assert b'/S /URI\n/URI (https://weasyprint.org/foo/lipsum)'
- assert f'/Rect [ 0 {TOP} {RIGHT} {TOP} ]'.encode() in pdf
+ assert f'/Rect [0 {TOP} {RIGHT} {TOP}]'.encode() in pdf
@assert_no_logs
@@ -397,7 +397,7 @@ def test_relative_links_missing_base():
string='<a href="../lipsum" style="display: block"></a>a',
base_url=None).write_pdf()
assert b'/S /URI\n/URI (../lipsum)'
- assert f'/Rect [ 0 {TOP} {RIGHT} {TOP} ]'.encode() in pdf
+ assert f'/Rect [0 {TOP} {RIGHT} {TOP}]'.encode() in pdf
@assert_no_logs
@@ -421,11 +421,11 @@ def test_relative_links_internal():
base_url=None).write_pdf()
assert b'/Dest (lipsum)' in pdf
link = re.search(
- b'\\(lipsum\\) \\[ \\d+ 0 R /XYZ ([\\d\\.]+ [\\d\\.]+ [\\d\\.]+) ]',
+ b'\\(lipsum\\) \\[\\d+ 0 R /XYZ ([\\d\\.]+ [\\d\\.]+ [\\d\\.]+)]',
pdf).group(1)
assert [float(number) for number in link.split()] == [0, TOP, 0]
rect = re.search(
- b'/Rect \\[ ([\\d\\.]+ [\\d\\.]+ [\\d\\.]+ [\\d\\.]+) \\]',
+ b'/Rect \\[([\\d\\.]+ [\\d\\.]+ [\\d\\.]+ [\\d\\.]+)\\]',
pdf).group(1)
assert [float(number) for number in rect.split()] == [0, TOP, RIGHT, TOP]
@@ -437,11 +437,11 @@ def test_relative_links_anchors():
base_url=None).write_pdf()
assert b'/Dest (lipsum)' in pdf
link = re.search(
- b'\\(lipsum\\) \\[ \\d+ 0 R /XYZ ([\\d\\.]+ [\\d\\.]+ [\\d\\.]+) ]',
+ b'\\(lipsum\\) \\[\\d+ 0 R /XYZ ([\\d\\.]+ [\\d\\.]+ [\\d\\.]+)]',
pdf).group(1)
assert [float(number) for number in link.split()] == [0, TOP, 0]
rect = re.search(
- b'/Rect \\[ ([\\d\\.]+ [\\d\\.]+ [\\d\\.]+ [\\d\\.]+) \\]',
+ b'/Rect \\[([\\d\\.]+ [\\d\\.]+ [\\d\\.]+ [\\d\\.]+)\\]',
pdf).group(1)
assert [float(number) for number in rect.split()] == [0, TOP, RIGHT, TOP]
@@ -474,11 +474,11 @@ def test_missing_links():
assert b'/Dest (lipsum)' in pdf
assert len(logs) == 1
link = re.search(
- b'\\(lipsum\\) \\[ \\d+ 0 R /XYZ ([\\d\\.]+ [\\d\\.]+ [\\d\\.]+) ]',
+ b'\\(lipsum\\) \\[\\d+ 0 R /XYZ ([\\d\\.]+ [\\d\\.]+ [\\d\\.]+)]',
pdf).group(1)
assert [float(number) for number in link.split()] == [0, TOP - 15, 0]
rect = re.search(
- b'/Rect \\[ ([\\d\\.]+ [\\d\\.]+ [\\d\\.]+ [\\d\\.]+) \\]',
+ b'/Rect \\[([\\d\\.]+ [\\d\\.]+ [\\d\\.]+ [\\d\\.]+)\\]',
pdf).group(1)
assert [float(number) for number in rect.split()] == [
0, TOP, RIGHT, TOP - 15]
@@ -495,8 +495,8 @@ def test_anchor_multiple_pages():
<a href="#lipsum"></a>
</div>
''', base_url=None).write_pdf()
- first_page, = re.findall(b'/Kids \\[ (\\d+) 0 R', pdf)
- assert b'/Names [ (lipsum) [ ' + first_page in pdf
+ first_page, = re.findall(b'/Kids \\[(\\d+) 0 R', pdf)
+ assert b'/Names [(lipsum) [' + first_page in pdf
@assert_no_logs
@@ -717,6 +717,6 @@ def test_bleed(style, media, bleed, trim):
<style>@page { %s }</style>
<body>test
''' % style).write_pdf()
- assert '/MediaBox [ {} {} {} {} ]'.format(*media).encode() in pdf
- assert '/BleedBox [ {} {} {} {} ]'.format(*bleed).encode() in pdf
- assert '/TrimBox [ {} {} {} {} ]'.format(*trim).encode() in pdf
+ assert '/MediaBox [{} {} {} {}]'.format(*media).encode() in pdf
+ assert '/BleedBox [{} {} {} {}]'.format(*bleed).encode() in pdf
+ assert '/TrimBox [{} {} {} {}]'.format(*trim).encode() in pdf

View file

@ -2,15 +2,13 @@
%global srcname weasyprint
Name: weasyprint
Version: 58.1
Version: 69.0
Release: 2%{?dist}
Summary: Utility to render HTML and CSS to PDF
License: BSD-3-Clause
URL: https://weasyprint.org/
Source0: %pypi_source
# commit present in upstream git for WeasyPrint 59+
Patch0: %{name}-make-tests-pass-with-pydyf-06.patch
URL: https://weasyprint.org
Source0: %{pypi_source weasyprint}
BuildArch: noarch
@ -18,12 +16,15 @@ BuildRequires: python3-devel
BuildRequires: pyproject-rpm-macros
# used as "build-backend" in pyproject.toml but not detected by Fedora's
# macros to generate build requirements
BuildRequires: python3-flit
BuildRequires: python3dist(flit-core)
# requirements for testing
BuildRequires: dejavu-fonts-all
BuildRequires: google-noto-emoji-fonts
BuildRequires: ghostscript
# https://doc.courtbouillon.org/weasyprint/latest/first_steps.html
BuildRequires: pango >= 1.44.0
BuildRequires: python3dist(pytest)
BuildRequires: python3dist(pytest-xdist)
Requires: python3-weasyprint = %{version}-%{release}
@ -51,7 +52,7 @@ can export to PDF. It aims to support web standards for printing.
%autosetup -p1 -n %{srcname}-%{version}
%generate_buildrequires
%pyproject_buildrequires -r -x test
%pyproject_buildrequires -r
%build
%pyproject_wheel
@ -60,7 +61,7 @@ can export to PDF. It aims to support web standards for printing.
%pyproject_install
%check
%pytest
%pytest -n auto
# do not ship tests
rm -rf %{buildroot}%{python3_sitelib}/%{modname}/tests
@ -76,6 +77,105 @@ rm -rf %{buildroot}%{python3_sitelib}/%{modname}/tests
%{python3_sitelib}/%{modname}/
%changelog
* Fri Jul 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 69.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
* Thu Jun 11 2026 Felix Schwarz <fschwarz@fedoraproject.org> - 69.0-1
- update to 69.0
* Fri Jun 05 2026 Python Maint <python-maint@redhat.com> - 68.1-2
- Rebuilt for Python 3.15
* Sat Feb 07 2026 Felix Schwarz <fschwarz@fedoraproject.org> - 68.1-1
- update to 68.1
* Tue Jan 20 2026 Felix Schwarz <fschwarz@fedoraproject.org> - 68.0-1
- update to 68.0
* Sat Jan 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 67.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
* Wed Dec 03 2025 Felix Schwarz <fschwarz@fedoraproject.org> - 67.0-1
- update to 67.0
* Fri Sep 19 2025 Python Maint <python-maint@redhat.com> - 66.0-3
- Rebuilt for Python 3.14.0rc3 bytecode
* Fri Aug 15 2025 Python Maint <python-maint@redhat.com> - 66.0-2
- Rebuilt for Python 3.14.0rc2 bytecode
* Mon Jul 28 2025 Felix Schwarz <fschwarz@fedoraproject.org> - 66.0-1
- update to 66.0
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 65.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Tue Jun 03 2025 Python Maint <python-maint@redhat.com> - 65.1-2
- Rebuilt for Python 3.14
* Mon Apr 14 2025 Felix Schwarz <fschwarz@fedoraproject.org> - 65.1-1
- update to 65.1
* Sun Mar 23 2025 Felix Schwarz <fschwarz@fedoraproject.org> - 65.0-1
- update to 65.0
* Wed Mar 05 2025 Felix Schwarz <fschwarz@fedoraproject.org> - 64.1-1
- update to 64.1
* Thu Jan 30 2025 Felix Schwarz <fschwarz@fedoraproject.org> - 64.0-1
- update to 64.0
* Sun Jan 19 2025 Fedora Release Engineering <releng@fedoraproject.org> - 63.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Sat Jan 11 2025 Felix Schwarz <fschwarz@fedoraproject.org> - 63.1-1
- update to 63.1
* Sat Jul 20 2024 Fedora Release Engineering <releng@fedoraproject.org> - 62.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Mon Jun 24 2024 Felix Schwarz <fschwarz@fedoraproject.org> - 62.3-1
- update to 62.3
* Sat Jun 08 2024 Python Maint <python-maint@redhat.com> - 62.2-2
- Rebuilt for Python 3.13
* Tue Jun 04 2024 Felix Schwarz <fschwarz@fedoraproject.org> - 62.2-1
- update to 62.2
* Mon May 06 2024 Felix Schwarz <fschwarz@fedoraproject.org> - 62.1-1
- update to 62.1
* Thu May 02 2024 Felix Schwarz <fschwarz@fedoraproject.org> - 62.0-1
- update to 62.0
* Sat Mar 09 2024 Felix Schwarz <fschwarz@fedoraproject.org> - 61.2-1
- update to 61.2
* Mon Feb 26 2024 Felix Schwarz <fschwarz@fedoraproject.org> - 61.1-1
- update to 61.1
* Mon Feb 12 2024 Felix Schwarz <fschwarz@fedoraproject.org> - 61.0-1
- update to 61.0
* Thu Jan 25 2024 Felix Schwarz <fschwarz@fedoraproject.org> - 60.2-2
- use just flit-core as build dependency
* Tue Dec 12 2023 Felix Schwarz <fschwarz@fedoraproject.org> - 60.2-1
- update to 60.2
* Thu Oct 05 2023 Felix Schwarz <fschwarz@fedoraproject.org> - 60.1-1
- update to 60.1
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 59.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Sun Jul 09 2023 Felix Schwarz <fschwarz@fedoraproject.org> - 59.0-2
- add patch so the test suite passes for Python 3.12
* Thu May 11 2023 Felix Schwarz <fschwarz@fedoraproject.org> - 59.0-1
- update to 59.0
* Sat Apr 15 2023 Felix Schwarz <fschwarz@fedoraproject.org> - 58.1-2
- SPDX migration
- make tests pass with pydyf 0.6