Blob Blame History Raw
Name:           weasyprint
Version:        0.39
Release:        1%{?dist}
Summary:        Utility to render HTML and CSS to PDF
License:        BSD
URL:            http://weasyprint.org/
BuildArch:      noarch
Source0:        %pypi_source

# Fedora specific patch to remove use of /usr/bin/env in shebang in scripts
Patch0:         weasyprint-0.39-shebang.patch

Requires:       python3-weasyprint = %{version}-%{release}
BuildRequires:  python3-devel python3-setuptools

%description
WeasyPrint can render HTML and CSS to PDF. It aims to support web standards
for printing.

%package -n python3-weasyprint
Summary:        Python library to render HTML and CSS to PDF
Requires:       hyphen
Requires:       pango
Requires:       python3-cairocffi >= 0.5
Requires:       python3-cairosvg >= 0.4.1
Requires:       python3-cssselect >= 0.6
Requires:       python3-html5lib >= 0.999
Requires:       python3-lxml >= 3.0
Requires:       python3-pyphen >= 0.8
Requires:       python3-setuptools
Requires:       python3-tinycss2 >= 0.5
# 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 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.

%prep
%autosetup -p1 -n WeasyPrint-%{version}
find . -name '*.py' | xargs sed -i '1s|^#!/usr/bin/python|#!%{__python3}|'

%build
%py3_build

%install
%py3_install
chmod +x %{buildroot}%{python3_sitelib}/weasyprint/tests/test_web/run.py

%files
%license LICENSE
%doc AUTHORS CHANGES README.rst
%{_bindir}/weasyprint

%files -n python3-weasyprint
%license LICENSE
%doc AUTHORS CHANGES README.rst
%{python3_sitelib}/WeasyPrint-*/
%{python3_sitelib}/weasyprint/

%changelog
* 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)

* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.22-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 0.22-12
- Rebuilt for Python 3.7

* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.22-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Mon Feb 05 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.22-10
- Update Python 2 dependency declarations to new packaging standards
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)

* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.22-9
- Python 2 binary package renamed to python2-weasyprint
  See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3

* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.22-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.22-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 0.22-6
- Rebuild for Python 3.6

* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.22-5
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages

* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.22-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.22-3
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5

* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.22-2
- 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.
- No Python 3 in EL7.

* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.21-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Wed May 28 2014 Kalev Lember <kalevlember@gmail.com> - 0.21-4
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4

* Thu Mar 20 2014 Eric Smith <brouhaha@fedoraproject.org> 0.21-3
- Add Python 3 support.
- Require python-html5lib 0.999, which has epoch 1 because
  that is newer than upstream 1.0b2.

* Fri Mar 14 2014 Eric Smith <brouhaha@fedoraproject.org> 0.21-2
- Add some missing Requires (#1076734).

* Mon Mar 10 2014 Eric Smith <brouhaha@fedoraproject.org> 0.21-1
- Update to lastest upstream.

* Sun Jul 28 2013 Eric Smith <brouhaha@fedoraproject.org> 0.19.2-3
- Remove /usr/bin/env from Python script shebang lines.

* Sun Jul 21 2013 Eric Smith <brouhaha@fedoraproject.org> 0.19.2-2
- Fixed dependencies.

* Sat Jul 20 2013 Eric Smith <brouhaha@fedoraproject.org> 0.19.2-1
- initial version