Compare commits

..

1 commit

Author SHA1 Message Date
Miro Hrončok
b5e877e09c Require proper library (#1331566) 2018-12-12 07:37:12 +01:00
4 changed files with 105 additions and 282 deletions

6
.gitignore vendored
View file

@ -1,9 +1,3 @@
/v0.19.2.tar.gz
/v0.21.tar.gz
/v0.22.tar.gz
/WeasyPrint-*
/WeasyPrint-*.tar.gz
/weasyprint-*.tar.gz
/*.src.rpm
/results_weasyprint
/weasyprint-??.?

View file

@ -1 +1 @@
SHA512 (weasyprint-69.0.tar.gz) = fb56d7f6173f8a67f8ef4c31408c03625b0a774d0efde003f779e3da054737c88afe9f44ee40b6dda5fc92cfacfa5709d4d96bf1a112862d309eaf2d93881ef6
99d7fb057a78e531a3a08fc730b6a820 v0.22.tar.gz

View file

@ -0,0 +1,18 @@
diff -up WeasyPrint-0.19.2/weasyprint.py.shebang WeasyPrint-0.19.2/weasyprint.py
--- WeasyPrint-0.19.2/weasyprint.py.shebang 2013-07-28 19:13:45.490801164 -0600
+++ WeasyPrint-0.19.2/weasyprint.py 2013-07-28 19:14:55.996795521 -0600
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python
from weasyprint.__main__ import main
if __name__ == '__main__':
diff -up WeasyPrint-0.19.2/weasyprint/tests/test_web/run.py.shebang WeasyPrint-0.19.2/weasyprint/tests/test_web/run.py
--- WeasyPrint-0.19.2/weasyprint/tests/test_web/run.py.shebang 2013-07-28 19:14:29.492797642 -0600
+++ WeasyPrint-0.19.2/weasyprint/tests/test_web/run.py 2013-07-28 19:14:48.339796134 -0600
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python
# coding: utf8
"""
weasyprint.tests.test_web.run

View file

@ -1,45 +1,68 @@
%global modname weasyprint
%global srcname weasyprint
%if 0%{?fedora} > 12
%global with_python3 1
%else
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())")}
%endif
Name: weasyprint
Version: 69.0
Release: 2%{?dist}
Version: 0.22
Release: 14%{?dist}
Group: Applications/File
Summary: Utility to render HTML and CSS to PDF
License: BSD-3-Clause
URL: https://weasyprint.org
Source0: %{pypi_source weasyprint}
License: BSD
URL: http://weasyprint.org/
BuildArch: noarch
Source0: https://github.com/Kozea/WeasyPrint/archive/v%{version}.tar.gz
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: 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)
# Fedora specific patch to remove use of /usr/bin/env in shebang in scripts
Patch0: weasyprint-0.19.2-shebang.patch
BuildRequires: python2-devel python2-setuptools
Requires: python3-weasyprint = %{version}-%{release}
%if 0%{?with_python3}
BuildRequires: python3-devel python3-setuptools
%endif # if with_python3
%description
WeasyPrint can render HTML and CSS to PDF. It aims to support web standards
for printing.
%package -n python3-weasyprint
%package -n python2-weasyprint
%{?python_provide:%python_provide python2-weasyprint}
Group: Development/Libraries
Summary: Python library to render HTML and CSS to PDF
Requires: pango >= 1.44.0
# other Python dependencies will be picked up automatically
Requires: python2-tinycss python2-cssselect python2-pyphen
Requires: python2-html5lib >= 1:0.999
Requires: python2-cairocffi python2-cairosvg
Requires: python2-setuptools
Requires: python2-lxml
Requires: hyphen pango
# Weasyprint will fail if no fonts are installed. There's no way to know
# what fonts the user would actually want, but require a few common ones
# that might be useful:
Requires: dejavu-fonts-common
Requires: dejavu-sans-fonts
Requires: dejavu-sans-mono-fonts
Requires: dejavu-serif-fonts
%description -n python2-weasyprint
The WeasyPrint Python library is a rendering engine for HTML and CSS that
can export to PDF. It aims to support web standards for printing.
%if 0%{?with_python3}
%package -n python3-weasyprint
Group: Development/Libraries
Summary: Python library to render HTML and CSS to PDF
Requires: python3-tinycss python3-cssselect python3-pyphen
Requires: python3-html5lib >= 0.99
Requires: python3-cairocffi python3-CairoSVG
Requires: python3-setuptools
Requires: python3-lxml
Requires: hyphen pango
# Weasyprint will fail if no fonts are installed. There's no way to know
# what fonts the user would actually want, but require a few common ones
# that might be useful:
Requires: dejavu-fonts-common
Requires: dejavu-sans-fonts
Requires: dejavu-sans-mono-fonts
Requires: dejavu-serif-fonts
@ -47,270 +70,58 @@ Requires: dejavu-serif-fonts
%description -n python3-weasyprint
The WeasyPrint Python library is a rendering engine for HTML and CSS that
can export to PDF. It aims to support web standards for printing.
%endif # if with_python3
%prep
%autosetup -p1 -n %{srcname}-%{version}
%setup -q -n WeasyPrint-%{version}
%patch0 -p1 -b .shebang
%generate_buildrequires
%pyproject_buildrequires -r
%if 0%{?with_python3}
rm -rf %{py3dir}
cp -a . %{py3dir}
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!/usr/bin/python|#!%{__python3}|'
%endif # with_python3
%build
%pyproject_wheel
%py2_build
%if 0%{?with_python3}
pushd %{py3dir}
# rpmbuild defaults to exporting LANG="C", which screws up Python 3's
# default encoidng, and breaks setup.py reading cairocffi/__init__.py,
# even though that file has an explicit tag of being UTF-8.
LANG="en_US.UTF-8" %{__python3} setup.py build
popd
%endif # with_python3
%install
%pyproject_install
%py2_install
chmod +x %{buildroot}%{python2_sitelib}/weasyprint/tests/test_web/run.py
%check
%pytest -n auto
# do not ship tests
rm -rf %{buildroot}%{python3_sitelib}/%{modname}/tests
%if 0%{?with_python3}
pushd %{py3dir}
LANG="en_US.UTF-8" %{__python3} setup.py install --skip-build --prefix=%{_prefix} --root %{buildroot}
chmod +x %{buildroot}%{python3_sitelib}/weasyprint/tests/test_web/run.py
popd
%endif # with_python3
%files
%license LICENSE
%doc README.rst
%doc AUTHORS LICENSE README
%{_bindir}/weasyprint
%files -n python2-weasyprint
%doc AUTHORS CHANGES LICENSE README
%{python2_sitelib}/*
%if 0%{?with_python3}
%files -n python3-weasyprint
%license LICENSE
%doc README.rst
%{python3_sitelib}/%{modname}-%{version}.dist-info/
%{python3_sitelib}/%{modname}/
%doc AUTHORS CHANGES LICENSE README
%{python3_sitelib}/*
%endif # with_python3
%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
* Tue Mar 07 2023 Felix Schwarz <fschwarz@fedoraproject.org> - 58.1-1
- update to 58.1
* Fri Feb 17 2023 Felix Schwarz <fschwarz@fedoraproject.org> - 58.0-1
- update to 58.0
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 57.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Tue Dec 27 2022 Felix Schwarz <fschwarz@fedoraproject.org> - 57.2-1
- update to 57.2
* Sat Nov 05 2022 Felix Schwarz <fschwarz@fedoraproject.org> - 57.1-1
- update to 57.1
* Mon Jul 25 2022 Felix Schwarz <fschwarz@fedoraproject.org> - 56.1-1
- update to 56.1
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 56.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Thu Jul 07 2022 Felix Schwarz <fschwarz@fedoraproject.org> - 56.0-1
- update to 56.0
* Mon Jun 20 2022 Python Maint <python-maint@redhat.com> - 55.0-2
- Rebuilt for Python 3.11
* Thu May 12 2022 Felix Schwarz <fschwarz@fedoraproject.org> - 55.0-1
- update to 55.0
* Mon Apr 04 2022 Felix Schwarz <fschwarz@fedoraproject.org> - 54.3-1
- update to 54.3
* Tue Mar 01 2022 Felix Schwarz <fschwarz@fedoraproject.org> - 54.2-1
- update to 54.2
* Mon Jan 31 2022 Felix Schwarz <fschwarz@fedoraproject.org> - 54.1-1
- update to 54.1
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 54.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Sat Jan 08 2022 Felix Schwarz <fschwarz@fedoraproject.org> - 54.0-1
- update to 54.0
* Sun Nov 14 2021 Felix Schwarz <fschwarz@fedoraproject.org> - 53.4-1
- update to 53.4
* Fri Sep 10 2021 Felix Schwarz <fschwarz@fedoraproject.org> - 53.3-1
- update to 53.3
* Fri Aug 27 2021 Felix Schwarz <fschwarz@fedoraproject.org> - 53.2-1
- update to 53.2
* Sun Aug 22 2021 Felix Schwarz <fschwarz@fedoraproject.org> - 53.1-1
- update to 53.1
* Sun Aug 01 2021 Felix Schwarz <fschwarz@fedoraproject.org> - 53.0-1
- update to 53.0
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 52.5-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 52.5-2
- Rebuilt for Python 3.10
* Sun Apr 18 2021 Felix Schwarz <fschwarz@fedoraproject.org> - 52.5-1
- update to 52.5
* Tue Mar 23 2021 Felix Schwarz <fschwarz@fedoraproject.org> - 52.4-2
- add patch for pango 1.48.3
* Fri Mar 12 2021 Felix Schwarz <fschwarz@fedoraproject.org> - 52.4-1
- update to 52.4
* Tue Mar 02 2021 Felix Schwarz <fschwarz@fedoraproject.org> - 52.3-1
- update to 52.3
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 52.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Sun Dec 6 2020 Felix Schwarz <fschwarz@fedoraproject.org> - 52.2-1
- update to 52.2
* Sun Nov 08 2020 Felix Schwarz <fschwarz@fedoraproject.org> - 52.1-1
- update to 52.1
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 51-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 51-4
- Rebuilt for Python 3.9
* Wed Mar 04 2020 Felix Schwarz <fschwarz@fedoraproject.org> - 51-3
- drop runtime requirement on "dejavu-fonts-common" (#1810150)
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 51-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Wed Dec 25 2019 Felix Schwarz <fschwarz@fedoraproject.org> 51-1
- update to upstream version 51
* Sun Dec 01 2019 Felix Schwarz <fschwarz@fedoraproject.org> 50-1
- update to new upstream version
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 0.39-5
- Rebuilt for Python 3.8.0rc1 (#1748018)
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 0.39-4
- Rebuilt for Python 3.8
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.39-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Tue May 28 2019 Felix Schwarz <fschwarz@fedoraproject.org> 0.39-2
- avoid dependency on Python 3.3
- require python3-xcffib directly (#1685654)
* Tue Apr 30 2019 Eric Smith <brouhaha@fedoraproject.org> 0.39-1
- Update to newer (but not latest) upstream.
* Tue Apr 30 2019 Eric Smith <brouhaha@fedoraproject.org> 0.22-16
- Update requirements, use license macro, and other minor changes from
Felix Schwarz <fschwarz@fedoraproject.org>.
- Use better github tarball naming.
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.22-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Tue Oct 09 2018 Miro Hrončok <mhroncok@redhat.com> - 0.22-14
- Remove python2 subpackage (#1631306)
* Wed Dec 12 2018 Miro Hrončok <mhroncok@redhat.com> - 0.22-14
- Require proper library (#1331566)
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.22-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
@ -351,7 +162,7 @@ rm -rf %{buildroot}%{python3_sitelib}/%{modname}/tests
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Thu Aug 28 2014 Eric Smith <brouhaha@fedoraproject.org> 0.22-1
- Update to latest upstream.
- Update to lastest upstream.
- No Python 3 in EL7.
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.21-5